|
|
@ -11,7 +11,9 @@ Page({ |
|
|
data: { |
|
|
data: { |
|
|
err:null, |
|
|
err:null, |
|
|
canIUseGetUserProfile:false, |
|
|
canIUseGetUserProfile:false, |
|
|
event: '' |
|
|
event: '', |
|
|
|
|
|
|
|
|
|
|
|
isApproval: false |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
@ -45,6 +47,15 @@ Page({ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
getUserProfile:function(e){ |
|
|
getUserProfile:function(e){ |
|
|
|
|
|
if (!this.data.isApproval) { |
|
|
|
|
|
wx.showToast({ |
|
|
|
|
|
title: '请先阅读并同意相关协议', |
|
|
|
|
|
icon: "none" |
|
|
|
|
|
}); |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wx.getUserProfile({ |
|
|
wx.getUserProfile({ |
|
|
desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
|
|
|
desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
|
|
|
success: (res) => { |
|
|
success: (res) => { |
|
|
@ -53,6 +64,14 @@ Page({ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
getUserInfo:function(e,type){ |
|
|
getUserInfo:function(e,type){ |
|
|
|
|
|
if (!this.data.isApproval) { |
|
|
|
|
|
wx.showToast({ |
|
|
|
|
|
title: '请先阅读并同意相关协议', |
|
|
|
|
|
icon: "none" |
|
|
|
|
|
}); |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
let that = this; |
|
|
let that = this; |
|
|
if (e.detail && (!e.detail.userInfo)){ |
|
|
if (e.detail && (!e.detail.userInfo)){ |
|
|
wx.reLaunch({ |
|
|
wx.reLaunch({ |
|
|
@ -113,6 +132,9 @@ Page({ |
|
|
let id = e.currentTarget?e.currentTarget.dataset.clickid:e; |
|
|
let id = e.currentTarget?e.currentTarget.dataset.clickid:e; |
|
|
wx.uma.trackEvent(id) |
|
|
wx.uma.trackEvent(id) |
|
|
}, |
|
|
}, |
|
|
|
|
|
changeIsApproval:function (e) { |
|
|
|
|
|
this.setData({isApproval: !this.data.isApproval}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 生命周期函数--监听页面初次渲染完成 |
|
|
* 生命周期函数--监听页面初次渲染完成 |
|
|
|