Commit e4a976fe by 李嘉林

登录页面协议显示优化

parent 6a8983ba
...@@ -84,6 +84,7 @@ export default { ...@@ -84,6 +84,7 @@ export default {
ossLink: '',//第三方点击进入链接 ossLink: '',//第三方点击进入链接
wxUserInfo:{}, wxUserInfo:{},
queryOptions:{}, queryOptions:{},
isOnLoad: false,
}; };
}, },
computed: { computed: {
...@@ -93,6 +94,11 @@ export default { ...@@ -93,6 +94,11 @@ export default {
} }
}, },
onShow() { onShow() {
if(!this.isOnLoad){
this.getShopUserProtocol();
}
console.log('----------------------login-onShow')
log.info('----------------------login-onShow')
wx.checkSession({ wx.checkSession({
success : () => { success : () => {
//session_key 未过期,并且在本生命周期一直有效 //session_key 未过期,并且在本生命周期一直有效
...@@ -117,13 +123,10 @@ export default { ...@@ -117,13 +123,10 @@ export default {
}) })
}, },
onLoad(options) { onLoad(options) {
this.isOnLoad = true;
console.log('----------------------login-onload')
log.info(options,'----------------------login-onload-options') log.info(options,'----------------------login-onload-options')
login.getShopUserProtocol().then(res => { this.getShopUserProtocol();
log.info('获取用户协议',res)
if(res.data.code == '200') {
this.content = res.data.data;
}
});
Object.assign(this.$data, this.$options.data()); //mpvue 的混合周期 使用小程序生命周期数据未初始化 Object.assign(this.$data, this.$options.data()); //mpvue 的混合周期 使用小程序生命周期数据未初始化
options.scene && (this.scene=options.scene) options.scene && (this.scene=options.scene)
if (options.back) { if (options.back) {
...@@ -566,6 +569,14 @@ export default { ...@@ -566,6 +569,14 @@ export default {
wx.navigateBack({ wx.navigateBack({
delta: 1 delta: 1
}); });
},
getShopUserProtocol() {
login.getShopUserProtocol().then(res => {
log.info('获取用户协议',res)
if(res.data.code == '200') {
this.content = res.data.data;
}
});
} }
} }
}; };
......
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