|
|
|
@ -10,6 +10,12 @@ |
|
|
|
|
<image :src="user.headerImg" v-else></image> |
|
|
|
|
</view> |
|
|
|
|
<!-- 昵称 --> |
|
|
|
|
<template v-if="!user"> |
|
|
|
|
<view class="right" @click="logInMethod"> |
|
|
|
|
<view class=" fcorfff fontwig6 font18">未登录</view> |
|
|
|
|
</view> |
|
|
|
|
</template> |
|
|
|
|
<template v-else> |
|
|
|
|
<view class="right"> |
|
|
|
|
<!-- #ifdef MP --> |
|
|
|
|
<view class="username" v-if="user && user.infoCompleteStatus == 1" @click="jumplogin">点击获取信息</view> |
|
|
|
@ -20,6 +26,7 @@ |
|
|
|
|
<!-- #endif --> |
|
|
|
|
<view class="font14 fcor333">{{userphone}}</view> |
|
|
|
|
</view> |
|
|
|
|
</template> |
|
|
|
|
</view> |
|
|
|
|
<!-- 优惠券,卡券 --> |
|
|
|
|
<view class="headcoun width100"> |
|
|
|
@ -249,20 +256,34 @@ |
|
|
|
|
uni.stopPullDownRefresh(); |
|
|
|
|
}, 1000); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
onLoad() { |
|
|
|
|
if (!app.globalData.userInfo) { |
|
|
|
|
this.findUser(); |
|
|
|
|
// this.queryHzfDiscountTotalNum(); |
|
|
|
|
if(!app.globalData.userInfo&&!app.globalData.token){ |
|
|
|
|
/* 没登录 */ |
|
|
|
|
// #ifdef MP |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/userLogin/userLogin' |
|
|
|
|
}) |
|
|
|
|
// #endif |
|
|
|
|
// #ifdef H5 |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/login/register' |
|
|
|
|
}) |
|
|
|
|
// #endif |
|
|
|
|
}else{ |
|
|
|
|
this.findUser(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
onReady() { |
|
|
|
|
//此处,演示,每次页面初次渲染都把登录状态重置 |
|
|
|
|
uni.setStorage({ |
|
|
|
|
key: 'UserInfo', |
|
|
|
|
data: false, |
|
|
|
|
success: function() {}, |
|
|
|
|
fail: function(e) {} |
|
|
|
|
}); |
|
|
|
|
// uni.setStorage({ |
|
|
|
|
// key: 'UserInfo', |
|
|
|
|
// data: false, |
|
|
|
|
// success: function() {}, |
|
|
|
|
// fail: function(e) {} |
|
|
|
|
// }); |
|
|
|
|
}, |
|
|
|
|
onShow() { |
|
|
|
|
if (app.globalData.userInfo) { |
|
|
|
@ -317,21 +338,26 @@ |
|
|
|
|
] |
|
|
|
|
// #endif |
|
|
|
|
// #ifdef H5 |
|
|
|
|
let url = "../../login/updatePas/resetPas"; |
|
|
|
|
if (!app.globalData.userInfo.isSetPayPwd) { |
|
|
|
|
url = "../../login/updatePas/updatePas"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(app.globalData.userInfo&&app.globalData.token){ |
|
|
|
|
this.czList = [{ |
|
|
|
|
url: '/pages/goods/recording/recording', |
|
|
|
|
text: '积分记录', |
|
|
|
|
img: '../../../static/img/ghkpay.png' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
url: '../../login/updatePas/updatePas', |
|
|
|
|
url: url, |
|
|
|
|
text: '支付密码', |
|
|
|
|
img: '../../../static/img/user/user11.png' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
url: '', |
|
|
|
|
text: '退出登录', |
|
|
|
|
img: '../../../static/img/user/user12.png' |
|
|
|
|
img: '../../../static/img/exit.png' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
url: '', |
|
|
|
@ -344,37 +370,51 @@ |
|
|
|
|
img: '../../../static/img/adresw.png' |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
return; |
|
|
|
|
}else{ |
|
|
|
|
this.czList = [{ |
|
|
|
|
url: '/pages/goods/recording/recording', |
|
|
|
|
text: '积分记录', |
|
|
|
|
img: '../../../static/img/ghkpay.png' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
url: url, |
|
|
|
|
text: '支付密码', |
|
|
|
|
img: '../../../static/img/user/user11.png' |
|
|
|
|
}, |
|
|
|
|
// { |
|
|
|
|
// url: '', |
|
|
|
|
// text: '退出登录', |
|
|
|
|
// img: '../../../static/img/exit.png' |
|
|
|
|
// }, |
|
|
|
|
{ |
|
|
|
|
url: '', |
|
|
|
|
text: '客服', |
|
|
|
|
img: '../../../static/img/user/user13.png' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
url:"/physical-merchants/address/address", |
|
|
|
|
text: '我的地址', |
|
|
|
|
img: '../../../static/img/adresw.png' |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
this.czList = [{ |
|
|
|
|
url: '/pages/goods/recording/recording', |
|
|
|
|
text: '积分记录', |
|
|
|
|
img: '../../../static/img/ghkpay.png' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
url: '../../login/updatePas/resetPas', |
|
|
|
|
text: '支付密码', |
|
|
|
|
img: '../../../static/img/user/user11.png' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
url: '', |
|
|
|
|
text: '退出登录', |
|
|
|
|
img: '../../../static/img/exit.png' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
url: '', |
|
|
|
|
text: '客服', |
|
|
|
|
img: '../../../static/img/user/user13.png' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
url:"/physical-merchants/address/address", |
|
|
|
|
text: '我的地址', |
|
|
|
|
img: '../../../static/img/adresw.png' |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
// #endif |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// 点击登录 |
|
|
|
|
logInMethod(){ |
|
|
|
|
// #ifdef MP |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/userLogin/userLogin' |
|
|
|
|
}) |
|
|
|
|
// #endif |
|
|
|
|
// #ifdef H5 |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/login/register' |
|
|
|
|
}) |
|
|
|
|
// #endif |
|
|
|
|
}, |
|
|
|
|
//查询我的信息接口 |
|
|
|
|
findUser() { |
|
|
|
|
findUser().then(res => { |
|
|
|
|