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