Commit bf0c39da authored by 黄奎's avatar 黄奎

11

parent 091c9fa1
......@@ -34,40 +34,18 @@
showLogin: true,
canIUseGetUserProfile: false,
msg: {},
isOpenAuth: 0, //是否开启强制授权
};
},
created() {
// this.pageinfo = uni.getStorageSync("basedata") ?
// uni.getStorageSync("basedata").auth_page : {};
// if (wx.getUserProfile) {
// this.canIUseGetUserProfile = true;
// }
// // #ifdef MP-ALIPAY
// this.canIUseGetUserProfile = true;
// // #endif
// let x = this.pageinfo.hotspot;
// let y = this.pageinfo.hotspot_cancel;
// this.sureStyle = `height:${x.height}rpx;width:${x.width}rpx;left:${x.left}rpx;top:${x.top}rpx;`;
// this.cancelStyle = `height:${y.height}rpx;width:${y.width}rpx;left:${y.left}rpx;top:${y.top}rpx;`;
let mallConfig = uni.getStorageSync("basedata");
if (mallConfig && mallConfig.mall && mallConfig.mall.setting && mallConfig.mall.setting.is_show_auth) {
this.isOpenAuth = mallConfig.mall.setting.is_show_auth;
}
this.getUserInfo()
},
methods: {
getoldUser() {
//旧的 兼容电脑端
//4.27注释掉 给予新的提示不能在电脑端登录
// var that = this;
// uni.login({
// provider: 'weixin',
// success: function (loginRes) {
// // 获取用户信息
// uni.getUserInfo({
// provider: 'weixin',
// success: function (infoRes) {
// that.getUserInfo(infoRes)
// }
// });
// }
// });
uni.showToast({
title: "电脑端暂时不能获取用户信息,请转到手机端使用!",
icon: "none",
......@@ -114,47 +92,13 @@
that.getCode(obj);
},
fail() {
that.showDialog=false
that.showDialog = false
uni.showToast({
title:'微信登录失败'
title: '微信登录失败'
})
}
})
// uni.getProvider({
// service: "oauth",
// success: function(res) {
// if (~res.provider.indexOf("weixin")) {
// uni.login({
// provider: "weixin",
// success: (res) => {
// //这里请求接口
// let obj = {
// Source: 1,
// OpenId: "",
// Name: info.userInfo.nickName,
// Photo: info.userInfo.avatarUrl,
// Gender: info.userInfo.gender,
// Moblie: "",
// SuperiorId: 0,
// code: res.code,
// };
// that.getCode(obj);
// },
// fail: () => {
// uni.showToast({
// title: "微信登录授权失败",
// icon: "none",
// });
// },
// });
// } else {
// uni.showToast({
// title: "请先安装微信或升级版本",
// icon: "none",
// });
// }
// },
// });
},
close() {
this.showDialog = false;
......@@ -164,7 +108,7 @@
getCode(obj) {
var that = this;
uni.showLoading({
title: "登录中",
title: "登录中.",
});
//这里请求接口
var OpenId = "";
......@@ -210,7 +154,6 @@
CounponPassword: CounponPassword,
KeyWord: KeyWord,
}
console.log("loginMsg", loginMsg);
that.request2({
url: "/api/AppletLogin/Login",
data: loginMsg,
......@@ -240,14 +183,16 @@
that.msg.Id = uid;
//HK 2023-10-31 新增
let b2bLoginParam = {
OpenId: loginMsg.OpenId
OpenId: res.data.OpenId
}
let b2bResult = {
accountId: 0,
customerId: 0,
customerInfoChildrenId:0,
realNameAuthentication: 0,
account: "",
name: mallUserName,
customerName: "",
photo: "",
secretKey: "",
token: "",
......@@ -261,47 +206,25 @@
customerType: 1, //直客,2-同行
directCustomerId: 0, //直客Id
}
//erp判断是否是同行
that.apipost("b2b_post_Login", b2bLoginParam, (erpRes) => {
if (erpRes.resultCode == 1) {
var tempdata = erpRes.data;
b2bResult.accountId = tempdata.accountId;
b2bResult.customerId = tempdata.customerId;
b2bResult.realNameAuthentication = tempdata.realNameAuthentication;
b2bResult.account = tempdata.account;
b2bResult.name = tempdata.name;
b2bResult.photo = tempdata.photo;
b2bResult.secretKey = tempdata.secretKey;
b2bResult.token = tempdata.token;
b2bResult.groupId = tempdata.groupId;
b2bResult.isMember = tempdata.isMember;
b2bResult.createBy = tempdata.createBy;
b2bResult.EmLoginMobile = tempdata.EmLoginMobile;
b2bResult.contactNumber = tempdata.contactNumber;
b2bResult.salesBaseInfo = tempdata.salesBaseInfo;
b2bResult.count = tempdata.count;
b2bResult.customerType = 2;
}
uni.setStorageSync('b2b_user', b2bResult)
}, (failed) => {
that.apipost("LvXiaoYouLogin_post", b2bLoginParam, b2cRes => {
var b2cData = b2cRes.data;
if (b2cRes.resultCode == 1) {
b2bResult.directCustomerId = b2cData.directCustomerId;
b2bResult.name = b2cData.name;
b2bResult.customerType = 1;
b2bResult.token = b2cData.token;
b2bResult.photo = b2cData.photo;
b2bResult.contactNumber=b2cData.moblie;
that.apipost("LvXiaoYou_post_GetLvXiaoYouCustomerLogin", b2bLoginParam, b2bRes => {
var b2bData = b2bRes.data;
if (b2bRes.resultCode == 1) {
b2bResult.accountId = b2bData.accountId;
b2bResult.customerId = b2bData.customerId;
b2bResult.customerInfoChildrenId=b2bData.customerInfoChildrenId;
b2bResult.name = b2bData.name;
b2bResult.customerName = b2bData.customerName;
uni.setStorageSync('b2b_user', b2bResult)
}
}, (error2) => {
});
}, (error) => {
console.log("error", error);
if (that.isOpenAuth == 1) {
//未绑定的用户强制跳转到登录页面
uni.redirectTo({
url: '/pages/jiuzhai/bind_Customer'
})
}
});
}
}
);
},
......@@ -361,7 +284,7 @@
getCodeAli(obj) {
var that = this;
uni.showLoading({
title: "登录中",
title: "登录中..",
});
//这里请求接口
that.request2({
......
<template>
<view class="couponStyle" :style="{ height: contentHeight }">
<u-tabs
:list="list"
:is-scroll="false"
:current="currentIndex"
@change="change"
:active-color="mainColor"
:show-bar="showBar"
height="100"
></u-tabs>
<u-tabs :list="list" :is-scroll="false" :current="currentIndex" @change="change" :active-color="mainColor" :show-bar="showBar"
height="100"></u-tabs>
<u-empty v-if="g.length == 0 && !loading" text="暂无相关优惠券" mode="coupon"></u-empty>
<view
v-if="g.length > 0"
style="
<view v-if="g.length > 0" style="
height: calc(100vh - 50px);
width: calc(100vw);
overflow: hidden;
padding-bottom: 50px;
"
>
<scroll-view
:scroll-y="true"
:enable-back-to-top="true"
:enable-flex="true"
@scrolltolower="lower"
:style="{ height: '100%' }"
>
">
<scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @scrolltolower="lower" :style="{ height: '100%' }">
<view class="couponList">
<view class="item" v-for="(x, i) in g" :key="i" @click="godetails(x)">
<view :class="{'ticket':msg.useState == 1,'ticket2':msg.useState != 1}">
......@@ -35,17 +19,13 @@
<!-- <text style="font-size: 44px;">{{x.sub_price.toString().split('.')[0]}}</text>
<text v-if="x.coupon.type==1"></text> -->
<text class="small" style="font-family: microsoft yahei ui light;" v-if="x.couponsType == 1"></text>
<Text style="font-size: 44px;font-family: nav-font;"
>{{ Number(x.denomination) }}
<Text style="font-size: 44px;font-family: nav-font;">{{ Number(x.denomination) }}
</Text>
<Text class="small" style="font-family: microsoft yahei ui light;" >{{ x.couponsType != 1? "折" : "" }}</Text>
<Text class="small" style="font-family: microsoft yahei ui light;">{{ x.couponsType != 1? "折" : "" }}</Text>
</view>
<view class="tiaojian"
>{{ Number(x.useCondition) }}元可用</view
>
<view class="tiaojian">{{ Number(x.useCondition) }}元可用</view>
</view>
<view
style="
<view style="
width: 10px;
height: 10px;
border-radius: 5px;
......@@ -53,10 +33,8 @@
position: absolute;
right: -5px;
top: -5px;
"
></view>
<view
style="
"></view>
<view style="
width: 10px;
height: 10px;
border-radius: 5px;
......@@ -64,8 +42,7 @@
position: absolute;
right: -5px;
bottom: -5px;
"
></view>
"></view>
</view>
<view class="detail">
<view class="coupond">
......@@ -81,14 +58,7 @@
</view>
</view>
<u-loadmore
:status="status"
:load-text="loadText"
:font-size="24"
:margin-top="20"
:margin-bottom="20"
bg-color="#f3f4f6"
/>
<u-loadmore :status="status" :load-text="loadText" :font-size="24" :margin-top="20" :margin-bottom="20" bg-color="#f3f4f6" />
</scroll-view>
</view>
<!-- <view
......@@ -114,17 +84,13 @@
</view>
<!-- 取消提示 -->
<u-toast ref="uToast" />
<auth
v-if="showAuth"
@changeuserinfo="reloadUserinfo"
@gbAuth="gbAuth"
></auth>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
</view>
</template>
<script>
import auth from "../../../components/auth/index.vue";
export default {
import auth from "../../../components/auth/index.vue";
export default {
components: {
auth,
},
......@@ -133,21 +99,25 @@ export default {
pageTitle: "我的优惠券",
showAuth: false,
U: {},
list: [{ name: "未使用" }, { name: "已过期" }],
list: [{
name: "未使用"
}, {
name: "已过期"
}],
mainColor: "",
contentHeight: 0,
currentIndex:0,
currentIndex: 0,
msg: {
"pageIndex":1,
"pageSize":8,
"useState":1,
"lineId":0,
"lineteamId":0,
"couponsName":"",
"couponsType":0,
"couponStatus":1,
"couponEffectStatus":1, //1 有效;3 无效
"couponsUseScope":0,
"pageIndex": 1,
"pageSize": 8,
"useState": 1,
"lineId": 0,
"lineteamId": 0,
"couponsName": "",
"couponsType": 0,
"couponStatus": 1,
"couponEffectStatus": 1, //1 有效;3 无效
"couponsUseScope": 0,
},
page_count: 1,
g: [],
......@@ -171,9 +141,9 @@ export default {
mounted() {
let currentPages = getCurrentPages();
let u = "/" + currentPages[currentPages.length - 1].route;
let pages = wx.getStorageSync("basedata")
? wx.getStorageSync("basedata").bar_title
: [];
let pages = wx.getStorageSync("basedata") ?
wx.getStorageSync("basedata").bar_title :
[];
pages.forEach((x) => {
if (x.value == u) {
this.pageTitle = x.new_name ? x.new_name : x.name;
......@@ -183,7 +153,7 @@ export default {
title: this.pageTitle,
});
},
onLoad: function (option) {
onLoad: function(option) {
// this.u = uni.getStorageSync("mall_UserInfo");
// if (!this.u) {
// this.u = {
......@@ -194,14 +164,14 @@ export default {
// } else {
// this.init();
// }
this.loading=true
this.loading = true
this.init()
},
methods: {
change(index) {
this.currentIndex=index
this.msg.useState = index==0?1:3;
this.currentIndex = index
this.msg.useState = index == 0 ? 1 : 3;
this.msg.pageIndex = 1;
this.g = [];
this.loading = true;
......@@ -209,7 +179,32 @@ export default {
},
init() {
uni.showLoading()
this.javaApipost('b2b/user/getUserCouponAllotList',this.msg,(res)=>{
// this.apipost("b2b_post_LvXiaoYouBindCustomerInfo", param, (res) => {
// if (res.resultCode == 1) {
// //移除缓存=>跳转到首页重新登录
// uni.removeStorageSync('b2b_user')
// uni.removeStorageSync('mall_UserInfo')
// uni.redirectTo({
// url: '/pages/index/index'
// })
// } else {
// this.loginLoading = false
// uni.hideLoading()
// }
// }, (failed) => {
// this.loginLoading = false;
// uni.showToast({
// title: failed.message,
// icon: "none",
// });
// }, (error) => {
// this.loginLoading = false;
// uni.hideLoading()
// })
this.javaApipost('b2b/user/getUserCouponAllotList', this.msg, (res) => {
this.loading = false;
this.g = this.g.concat(res.data.pageData);
......@@ -218,27 +213,10 @@ export default {
this.status = "nomore";
}
uni.hideLoading()
},(err)=>{
}, (err) => {
console.log(err)
uni.hideLoading()
})
// this.request2(
// {
// url: "/api/AppletUser/GetMemberCouponPageList",
// data: this.msg,
// },
// (res) => {
// if (res.resultCode == 1) {
// this.loading = false;
// this.g = this.g.concat(res.data.pageData);
// this.page_count = res.data.pageCount;
// if (this.page_count == 1) {
// this.status = "nomore";
// }
// }
// }
// );
},
lower(e) {
if (this.msg.pageIndex < this.page_count) {
......@@ -261,8 +239,7 @@ export default {
godetails(item) {
if (this.msg.UseState == 0) {
uni.navigateTo({
url:
"/pages/coupon/details/details?item=" +
url: "/pages/coupon/details/details?item=" +
encodeURIComponent(JSON.stringify(item)) +
"&type=1",
});
......@@ -274,17 +251,17 @@ export default {
});
},
},
};
};
</script>
<style>
.couponStyle {
.couponStyle {
width: 100%;
height: 100%;
background: #f3f4f6;
position: relative;
}
}
.couponStyle .loading {
.couponStyle .loading {
width: 180rpx;
height: 180rpx;
background: #000000;
......@@ -299,22 +276,25 @@ export default {
top: 30%;
margin-left: -100rpx;
z-index: 999;
}
.couponStyle .couponList {
}
.couponStyle .couponList {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
}
.couponStyle .couponitem {
}
.couponStyle .couponitem {
width: 94%;
display: flex;
align-items: center;
height: 180rpx;
background: #f2ebe4;
margin-top: 20rpx;
}
.couponStyle .couponitem .couponitem_l {
}
.couponStyle .couponitem .couponitem_l {
width: 180rpx;
height: 180rpx;
display: flex;
......@@ -323,17 +303,18 @@ export default {
justify-content: space-around;
padding: 20rpx;
color: #fff;
}
.couponStyle .couponitem .couponitem_r {
}
.couponStyle .couponitem .couponitem_r {
width: calc(100vw - 220rpx);
height: 180rpx;
display: flex;
flex-direction: column;
padding: 20rpx;
justify-content: space-around;
}
}
.couponStyle .item {
.couponStyle .item {
display: flex;
margin-top: 10px;
align-items: flex-start;
......@@ -341,21 +322,21 @@ export default {
width: 94%;
border-radius: 12rpx;
overflow: hidden;
}
.couponStyle .item .ticket {
}
.couponStyle .item .ticket {
position: relative;
background-image: linear-gradient(
to bottom right,
background-image: linear-gradient(to bottom right,
rgb(117, 174, 246),
rgb(56, 106, 244)
);
rgb(56, 106, 244));
width: 125px;
height: 100px;
display: flex;
align-items: center;
color: #fff;
}
.couponStyle .item .ticket2 {
}
.couponStyle .item .ticket2 {
position: relative;
background: #c3c3c3;
width: 125px;
......@@ -363,53 +344,61 @@ export default {
display: flex;
align-items: center;
color: #fff;
}
.couponStyle .item .miane .money {
}
.couponStyle .item .miane .money {
font-family: "oswald";
font-weight: bold;
size: 64px;
width: 125px;
text-align: center;
}
.couponStyle .item .miane .money .small {
}
.couponStyle .item .miane .money .small {
font-size: 20px;
}
.couponStyle .item .miane .tiaojian {
}
.couponStyle .item .miane .tiaojian {
font-size: 14px;
width: 125px;
text-align: center;
}
}
.couponStyle .item .detail {
.couponStyle .item .detail {
width: 100%;
height: 100px;
background: #fff;
padding: 10px;
display: flex;
}
.couponStyle .item .detail .coupond {
}
.couponStyle .item .detail .coupond {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-around;
}
.couponStyle .item .detail .coupond .name {
}
.couponStyle .item .detail .coupond .name {
font-size: 16px;
font-weight: 600;
color: #000;
}
.couponStyle .item .detail .coupond .date {
}
.couponStyle .item .detail .coupond .date {
font-family: "23";
margin-top: 5px;
font-size: 12px;
color: #777;
}
.couponStyle .item .detail .coupond .rule {
}
.couponStyle .item .detail .coupond .rule {
font-size: 12px;
color: #777;
margin-top: 5 px;
}
.couponStyle .item .detail .chosen {
}
.couponStyle .item .detail .chosen {
width: 20px;
}
}
</style>
......@@ -105,7 +105,9 @@
<view class="triangle-up" :style="{ top: pagePaddingBottom }"></view>
</view>
<coupon v-if="showCoupons" :coupon-message="couponMessage" :cform="ComeFrom" @goLook="goLook" @closeBtn="closeBtn"></coupon>
<template v-show="setting&&setting.is_show_auth==1">
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
</template>
<!-- <official-account></official-account> -->
<orderPopup v-if="showorder" :orderPopupdata="orderPopupdata" @gosalesvolume="gosalesvolume" @closeBtn="closeBtn_order"></orderPopup>
</view>
......@@ -428,10 +430,11 @@
add_top_app_show: 1,
});
}
this.setting = set;
this.add_show = uni.getStorageSync("add_top_app") ?
uni.getStorageSync("add_top_app").add_top_app_show :
1;
this.setting = set;
this.isShowBack();
let now = new Date();
......
......@@ -6,17 +6,17 @@
<view class="logo-text">旅小友</view>
</view>
<view class="login-form">
<view class="login-title">绑定同行</view>
<view class="login-title">同行登录</view>
<view class="login-item">
<input type="text" v-model="msg.account" placeholder="请输入的同业账号" :class="{'focus':currentFocus=='account'}" @blur="changeCurrentFocus('')"
<input type="text" v-model="msg.account" placeholder="请输入的同业账号" :class="{'focus':currentFocus=='account'}" @blur="changeCurrentFocus('')"
@focus="changeCurrentFocus('account')">
</view>
<view class="login-item">
<input type="password" v-model="msg.password" placeholder="请输入的登录密码" :class="{'focus':currentFocus=='pwd'}" @blur="changeCurrentFocus('')"
<input type="password" v-model="msg.password" placeholder="请输入的登录密码" :class="{'focus':currentFocus=='pwd'}" @blur="changeCurrentFocus('')"
@focus="changeCurrentFocus('pwd')">
</view>
<view class="login-item">
<view @click="loginByAccount" class="login-btn" :class="{'disable':msg.account==''||msg.password==''}">绑定</view>
<view @click="loginByAccount" class="login-btn" :class="{'disable':msg.account==''||msg.password==''}">登录</view>
</view>
</view>
......@@ -69,7 +69,7 @@
param.account = ''
param.password = ''
}
this.apipost("b2b_post_LvXiaoYouBindCustomer", param, (res) => {
this.apipost("b2b_post_LvXiaoYouBindCustomerInfo", param, (res) => {
if (res.resultCode == 1) {
//移除缓存=>跳转到首页重新登录
uni.removeStorageSync('b2b_user')
......
......@@ -19,9 +19,7 @@
}"
class="imgbg" :class="{
miniHeadTop: meueData.user_center.is_foot_bar_status != 1 && meueData.user_center.is_account_status != 1, }">
<view class="titlenav" :style="{ paddingTop: nav }">{{
pageTitle
}}</view>
<view class="titlenav" :style="{ paddingTop: nav }">{{ pageTitle }}</view>
<view class="topheard" :style="{
'margin-top':
modelstype == 0
......@@ -34,29 +32,10 @@
}"
v-if="meueData.user_center.top_style == 1">
<u-avatar :src="user_info.avatar" size="140" shape="circle"></u-avatar>
<view style="
display: flex;
flex-direction: column;
justify-content: center;
height: 100rpx;
margin-left: 20rpx;
">
<Text class="nickname" style="
color: #fff;
font-size: 40rpx;
font-weight: 800;
max-width: 400rpx;
overflow: hidden;
display: inline-block;
white-space: nowrap;
text-overflow: ellipsis;
font-family:'microsoft yahei ui light'
"
<view style=" display: flex;flex-direction: column; justify-content: center; height: 100rpx; margin-left: 20rpx; ">
<Text class="nickname" style=" color: #fff; font-size: 40rpx;font-weight: 800; max-width: 400rpx; overflow: hidden; display: inline-block; white-space: nowrap;text-overflow: ellipsis; font-family:'microsoft yahei ui light'"
@click="login(user_info)">
<template v-if="customer_info&&customer_info.customerName">
{{customer_info.customerName}}
</template>
<template v-else-if="b2b_user_info&&b2b_user_info.name">
<template v-if="b2b_user_info&&b2b_user_info.name">
{{b2b_user_info.name}}
</template>
<template v-else-if="mall_UserInfo&&mall_UserInfo.Name">
......@@ -67,98 +46,63 @@
</template>
</Text>
<view style="font-size:12px; margin-top:5px;">
<template v-if="b2b_user_info&&b2b_user_info.customerName&&b2b_user_info.customerName!=''">
{{b2b_user_info.customerName}}
</template>
<template v-else>
{{b2b_user_info ? b2b_user_info.name : ""}}
</template>
</view>
</view>
</view>
<view style="
display: flex;
flex-direction: column;
align-items: center;
margin-top: 23px;
margin-bottom: 5px;
"
<view style=" display: flex; flex-direction: column; align-items: center; margin-top: 23px;margin-bottom: 5px; "
v-if="meueData.user_center.top_style == 2">
<u-avatar :src="user_info.avatar" shape="circle" size="120"></u-avatar>
<Text style="color: #fff; font-size: 40rpx; font-weight: 800" class="nickname" @click="login(user_info)">{{ user_info.nickname ? user_info.nickname : "立即登录" }}</Text>
<view class="member" v-if="is_icon_members_grade == 1 && user_info.nickname">
<image :src="user_info.identity.level_icon" mode="aspectFill" style="width: 22px; height: 22px; border-radius: 11px"></image>
<Text style="margin-right: 10px">{{
user_info.identity.level_name != null
? user_info.identity.level_name
: "普通用户"
}}</Text>
<Text style="margin-right: 10px">{{ user_info.identity.level_name != null ? user_info.identity.level_name : "普通用户" }}</Text>
</view>
</view>
<view class="top_b">
<!--我的收藏-->
<view class="top_b_item" v-if="meueData.user_center.is_foot_bar_status == 1" @click="goUrl('/pages/favorite/favorite')">
<text style="font-size: 21px">{{
user_info.favorite ? user_info.favorite : 0
}}</text>
<text style="font-size: 21px">{{ user_info.favorite ? user_info.favorite : 0 }}</text>
<text>{{ meueData.user_center.foot_bar[0].name }}</text>
</view>
<!--我的足迹-->
<view class="top_b_item" v-if="meueData.user_center.is_foot_bar_status == 1" @click="goUrl('/pages/foot/index/index')">
<text style="font-size: 21px">{{
user_info.footprint ? user_info.footprint : 0
}}</text>
<text style="font-size: 21px">{{ user_info.footprint ? user_info.footprint : 0 }}</text>
<text>{{ meueData.user_center.foot_bar[1].name }}</text>
</view>
<view class="top_b_item" v-if="
meueData.user_center &&
meueData.user_center.is_account_status == 1
"
@click="goUrl(couponsObj.link_url)">
<text style="font-size: 21px">{{
user_info.coupon ? user_info.coupon : 0
}}</text>
<!--优惠劵-->
<view class="top_b_item" v-if=" meueData.user_center && meueData.user_center.is_account_status == 1" @click="goUrl(couponsObj.link_url)">
<text style="font-size: 21px">{{ user_info.coupon ? user_info.coupon : 0 }}</text>
<text>{{ couponsObj.name }}</text>
</view>
</view>
<view class="Receiptbalance" v-if="
meueData.user_center &&
meueData.user_center.is_account_status == 1
">
<view class="Receiptbalance" v-if=" meueData.user_center && meueData.user_center.is_account_status == 1">
<!--余额-->
<view class="Receiptbalance_item" v-for="(item, index) in meueData.user_center.account" :key="index" v-if="item.link_url == '/pages/balance/balance'"
@click="goUrl(item.link_url)">
<image :src="item.icon_url" style="width: 22px; height: auto" mode="widthFix"></image>
<view style="
margin-left: 15px;
display: flex;
flex-direction: column;
justify-content: space-between;
">
<span style="font-size: 21px; color: #0d0d0d; font-weight: 200">{{
user_info.balance
? user_info.balance > 10000
? (user_info.balance / 10000).toFixed(1) + "w"
: user_info.balance
: 0
}}</span>
<view style="margin-left: 15px;display: flex;flex-direction: column;justify-content: space-between;">
<span style="font-size: 21px; color: #0d0d0d; font-weight: 200">
{{ user_info.balance ? user_info.balance > 10000? (user_info.balance / 10000).toFixed(1) + "w": user_info.balance: 0 }}
</span>
<span style="">{{ item.name }}</span>
</view>
</view>
<view style="width: 1px; height: 34px; background: #e8e8e8"></view>
<view class="Receiptbalance_item" v-for="(item, index) in meueData.user_center.account" :key="index" v-if="
item.link_url ==
'/pages/user-center/integral-detail/integral-detail'
"
<!--积分明细-->
<view class="Receiptbalance_item" v-for="(item, index) in meueData.user_center.account" :key="index" v-if="item.link_url =='/pages/user-center/integral-detail/integral-detail'"
@click="goUrl(item.link_url)">
<image :src="item.icon_url" style="width: 17px; height: auto" mode="widthFix"></image>
<view style="
margin-left: 15px;
display: flex;
flex-direction: column;
justify-content: space-between;
">
<span style="font-size: 21px; color: #0d0d0d; font-weight: 200">{{
user_info.integral
? user_info.integral > 10000
? (user_info.integral / 10000).toFixed(1) + "w"
: user_info.integral
: 0
}}</span>
<view style="margin-left: 15px; display: flex;flex-direction: column;justify-content: space-between;">
<span style="font-size: 21px; color: #0d0d0d; font-weight: 200">
{{user_info.integral? user_info.integral > 10000? (user_info.integral / 10000).toFixed(1) + "w": user_info.integral: 0}}
</span>
<span>{{ item.name }}</span>
</view>
</view>
......@@ -167,9 +111,7 @@
<!-- 排课点数 -->
<view class="order_bar paike" style="" @click="gopointBalance" v-if="meueData.user_center.is_point_status == 1">
<span style="font-size: 14px; color: #111111">可用余额(点数):</span>
<span style="font-size: 22px; color: #111111; font-family: aa">{{
PointNum
}}</span>
<span style="font-size: 22px; color: #111111; font-family: aa">{{ PointNum }}</span>
</view>
<view class="order_bar" v-if="meueData.user_center.is_order_bar_status == 1">
<u-section title="我的订单" sub-title="查看更多" style="width: 100%; padding: 0px 0 10px" @click="goUrl('/pages/order/index/index?status=0')"></u-section>
......@@ -179,43 +121,28 @@
<image :src="item.icon_url" style="width: 60rpx; height: auto" mode="widthFix"></image>
<Text style="margin-top: 10rpx">{{ item.name }}</Text>
<!-- 待付款 -->
<view v-if="
item.link_url == '/pages/order/index/index?status=1' &&
user_info.MyOrder.NonPayment > 0
"
class="badge" :style="{ background: mainColor }">
<view v-if="item.link_url == '/pages/order/index/index?status=1' && user_info.MyOrder.NonPayment > 0" class="badge"
:style="{ background: mainColor }">
{{ user_info.MyOrder.NonPayment }}
</view>
<!-- 待发货 -->
<view v-if="
item.link_url == '/pages/order/index/index?status=2' &&
user_info.MyOrder.WaitSendGoods > 0
"
class="badge" :style="{ background: mainColor }">
<view v-if="item.link_url == '/pages/order/index/index?status=2' &&user_info.MyOrder.WaitSendGoods > 0" class="badge"
:style="{ background: mainColor }">
{{ user_info.MyOrder.WaitSendGoods }}
</view>
<!-- 待收货 -->
<view v-if="
item.link_url == '/pages/order/index/index?status=3' &&
user_info.MyOrder.WaitReceiving > 0
"
class="badge" :style="{ background: mainColor }">
<view v-if="item.link_url == '/pages/order/index/index?status=3' &&user_info.MyOrder.WaitReceiving > 0" class="badge"
:style="{ background: mainColor }">
{{ user_info.MyOrder.WaitReceiving }}
</view>
<!-- 待评价 -->
<view v-if="
item.link_url == '/pages/order/order-commit' &&
user_info.MyOrder.WaitCommentNum > 0
"
class="badge" :style="{ background: mainColor }">
<view v-if="item.link_url == '/pages/order/order-commit' && user_info.MyOrder.WaitCommentNum > 0" class="badge"
:style="{ background: mainColor }">
{{ user_info.MyOrder.WaitCommentNum }}
</view>
<!-- 售后 -->
<view v-if="
item.link_url == '/pages/order/after-sale/refunds-list' &&
user_info.MyOrder.AfterSaleNum > 0
"
class="badge" :style="{ background: mainColor }">
<view v-if="item.link_url == '/pages/order/after-sale/refunds-list' && user_info.MyOrder.AfterSaleNum > 0" class="badge"
:style="{ background: mainColor }">
{{ user_info.MyOrder.AfterSaleNum }}
</view>
</view>
......@@ -229,88 +156,50 @@
<image :src="item.icon_url" style="width: 60rpx; height: auto" mode="widthFix"></image>
<Text style="margin-top: 10rpx">{{ item.name }}</Text>
<!-- 待付款 -->
<view v-if="
item.link_url == '/pages/guidecar/orderList?status=1' &&
user_info.MyGuideCarOrder.NonPayment > 0
"
<view v-if="item.link_url == '/pages/guidecar/orderList?status=1' && user_info.MyGuideCarOrder.NonPayment>0"
class="badge" :style="{ background: mainColor }">
{{ user_info.MyGuideCarOrder.NonPayment }}
</view>
<!-- 待确认 -->
<view v-if="
item.link_url == '/pages/guidecar/orderList?status=2' &&
user_info.MyGuideCarOrder.WaitSendGoods > 0
"
<view v-if="item.link_url == '/pages/guidecar/orderList?status=2' && user_info.MyGuideCarOrder.WaitSendGoods>0"
class="badge" :style="{ background: mainColor }">
{{ user_info.MyGuideCarOrder.WaitSendGoods }}
</view>
<!-- 待出行 -->
<view v-if="
item.link_url == '/pages/guidecar/orderList?status=3' &&
user_info.MyGuideCarOrder.WaitReceiving > 0
"
<view v-if="item.link_url == '/pages/guidecar/orderList?status=3' &&user_info.MyGuideCarOrder.WaitReceiving>0"
class="badge" :style="{ background: mainColor }">
{{ user_info.MyGuideCarOrder.WaitReceiving }}
</view>
<!-- 出行中 -->
<view v-if="
item.link_url == '/pages/guidecar/orderList?status=4' &&
user_info.MyGuideCarOrder.Completed > 0
"
<view v-if=" item.link_url == '/pages/guidecar/orderList?status=4' && user_info.MyGuideCarOrder.Completed>0 "
class="badge" :style="{ background: mainColor }">
{{ user_info.MyGuideCarOrder.Completed }}
</view>
<!-- 待评价 -->
<view v-if="
item.link_url == '/pages/guidecar/order-commit' &&
user_info.MyGuideCarOrder.GuideCarWaitCommentNum > 0
"
<view v-if="item.link_url == '/pages/guidecar/order-commit' && user_info.MyGuideCarOrder.GuideCarWaitCommentNum>0"
class="badge" :style="{ background: mainColor }">
{{ user_info.MyGuideCarOrder.GuideCarWaitCommentNum }}
</view>
</view>
</view>
</view>
<template v-if="
meueData.user_center && meueData.user_center.nar_menus.length > 0
">
<view v-if="
meueData.user_center && meueData.user_center.is_menu_status == 1
" v-for="(mItem, mIndex) in meueData.user_center.nar_menus"
:key="mIndex" :style="{
marginTop:
mIndex == 0 &&
(meueData.user_center.is_foot_bar_status == 1 ||
meueData.user_center.is_account_status == 1)
? '25px'
: '',
}"
<template v-if=" meueData.user_center && meueData.user_center.nar_menus.length > 0 ">
<view v-if=" meueData.user_center && meueData.user_center.is_menu_status == 1" v-for="(mItem, mIndex) in meueData.user_center.nar_menus"
:key="mIndex" :style="{ marginTop: mIndex == 0 && (meueData.user_center.is_foot_bar_status == 1 || meueData.user_center.is_account_status == 1)? '25px' : '', }"
class="headCommon">
<view style="margin: 10px">{{ mItem.MenuNavTitle }}</view>
<view :class="mItem.MenuNavStyle == 1 ? 'menus' : 'menus2'" style="width: 100%">
<view :class="mItem.MenuNavStyle == 1 ? 'menus_item' : 'menus_item2'" v-for="(item, index) in mItem.MeunList"
:key="index" :name="item.name" @click="goUrl(item.link_url)" v-if="pandu(item)">
<image :src="item.icon_url" :style="{
width: mItem.MenuNavStyle == 1 ? '20px' : '16px',
height: 'auto',
}"
mode="widthFix"></image>
<Text style="font-size: 26rpx" :style="{
'margin-top': mItem.MenuNavStyle == 1 ? '10rpx' : '0rpx',
'margin-left': mItem.MenuNavStyle == 1 ? '0rpx' : '24rpx',
}">
<image :src="item.icon_url" :style="{width: mItem.MenuNavStyle == 1 ? '20px' : '16px',height: 'auto',}" mode="widthFix"></image>
<Text style="font-size: 26rpx" :style="{'margin-top': mItem.MenuNavStyle == 1 ? '10rpx' : '0rpx','margin-left': mItem.MenuNavStyle == 1 ? '0rpx' : '24rpx', }">
{{ item.name }}
</Text>
<!-- #ifdef MP-WEIXIN -->
<button open-type="contact" class="contButton" v-if="item.link_url == 'contact' && item.name == '客服'"></button>
<!-- #endif -->
<!-- #ifdef MP-ALIPAY -->
<view class="contButton" style="
display: flex;
justify-content: center;
align-items: center;
"
v-if="item.link_url == 'contact' && item.name == '客服'">
<view class="contButton" style="display: flex;justify-content: center;align-items: center;" v-if="item.link_url == 'contact' && item.name == '客服'">
<contact-button tnt-inst-id="QqR_ZV6m" scene="SCE01203509" :icon="item.icon_url" size="70rpx" :alipay-card-no="2088 + userId"
:ext-info="appid">
</contact-button>
......@@ -325,11 +214,7 @@
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
<tabbars></tabbars>
</view>
<view v-if="
meueData.user_center &&
meueData.user_center.is_ppenmiai == 1 &&
isloading == true
">
<view v-if="meueData.user_center&& meueData.user_center.is_ppenmiai == 1 && isloading == true ">
<!-- 修改 -->
<blinddate :meueData="meueData" :user_info="user_info" :scrollTop="scrollTop" :modelstype="modelstype" :bottommargin="bottommargin"
:PointNum="PointNum" @fatherMethod="login">
......@@ -337,7 +222,6 @@
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
<tabbars></tabbars>
</view>
</scroll-view>
</template>
......@@ -384,7 +268,7 @@
appId: "2021002181604459"
})),
userId: uni.getStorageSync("mall_UserInfo").UserId,
customer_info: {}
};
},
components: {
......@@ -412,7 +296,7 @@
basedata.user_info.isAttestationEdu :
0;
this.b2b_user_info = uni.getStorageSync('b2b_user')
this.getCustomerInfo()
},
onLoad() {
this.navHeight = this.$navHeight - 2;
......@@ -468,31 +352,14 @@
0;
},
methods: {
getCustomerInfo() {
//b2b_user_info.customerType 同行菜获取同行资料
if (this.b2b_user_info && this.b2b_user_info.customerType == 2 && this.b2b_user_info.token) {
this.apipost("b2b_get_GetCustomerManagerInfo", {}, (res) => {
if (res.resultCode == 1) {
this.customer_info = res.data;
}
})
}
},
signOutHandler() {
uni.removeStorageSync('b2b_user')
uni.removeStorageSync('mall_UserInfo')
// uni.redirectTo({
// url: '/pages/jiuzhai/login'
// })
uni.redirectTo({
url: '/pages/index/index'
})
},
goHome() {
uni.redirectTo({
url: "/pages/index/main",
});
},
pandu(item) {
let flag = true;
let IsOpen =
......@@ -569,12 +436,14 @@
flag = false;
}
break;
//(旅小友)绑定同行
case "/pages/jiuzhai/bind_Customer":
if (this.b2b_user_info && this.b2b_user_info.customerType == 1) {
flag = true;
} else {
flag = false;
}
flag = true;
break;
case "/pages/jiuzhai/direct_Customer":
if (this.b2b_user_info && this.b2b_user_info.customerType == 1) {
......@@ -937,7 +806,6 @@
.userStyle .member {
background: #3b3641;
/* width: 80px; */
font-size: 10px;
color: #fff;
height: 18px;
......@@ -1089,7 +957,6 @@
font-size: 26rpx;
font-weight: 500;
color: #888888;
/* background-color: #F6F6F6FF */
}
.userBox .login-btn {
......@@ -1098,7 +965,6 @@
text-align: center;
line-height: 80rpx;
color: #fff;
/* font-weight: 600; */
font-size: 28rpx;
border-radius: 16rpx;
font-family: logo-font;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment