Commit e4a976fe by 李嘉林

登录页面协议显示优化

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