@@ -23,6 +23,7 @@ Component({
isAgree
})
this.triggerEvent("callBack", isAgree)
+ wx.setStorageSync('isAgree', isAgree);
},
checkTheAgreement() {
wx.showLoading({
@@ -55,6 +55,7 @@ function query_userauth() {
}).then(res => {
console.log("查询是否隐私金额", res)
if (res.msg == '成功') wx.setStorageSync('hidePrice', res.data.length == 0 ? 0 : 1);
+ console.log(wx.getStorageSync('hidePrice'))
}
/* 查询站点数据 */
@@ -7,11 +7,15 @@ Page({
* 页面的初始数据
*/
data: {
- isAgree: true,
+ isAgree: false,
disabled: true, //是否禁用
loading: false, //登陆中
- onLoad(options) {},
+ onLoad(options) {
+ if (wx.getStorageSync('isAgree')) this.setData({
+ isAgree: wx.getStorageSync('isAgree')
+ })
+ },
/* 微信登录 */
wechatLogin() {
if (!this.data.isAgree) return Toast({
@@ -4,6 +4,7 @@
"Agreement": "./modules/agreement",
"van-divider": "@vant/weapp/divider/index",
"account": "./modules/account",
+ "van-toast": "@vant/weapp/toast/index",
"phone": "./modules/phone"