新增分享,找回密码,实名认证,签约
This commit is contained in:
@@ -8,15 +8,10 @@ Page({
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
userLogin: false,
|
||||
userData: '', // 用户信息
|
||||
userLogin : false,
|
||||
userData : '',
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
@@ -31,7 +26,8 @@ Page({
|
||||
return
|
||||
}
|
||||
this.setData({
|
||||
userLogin: false
|
||||
userLogin: false,
|
||||
userData : ''
|
||||
})
|
||||
},
|
||||
|
||||
@@ -43,16 +39,31 @@ Page({
|
||||
this.setData({
|
||||
userData: res.data
|
||||
})
|
||||
console.log(res)
|
||||
}).catch(err => {})
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 处理未登录时的转跳
|
||||
*/
|
||||
userNav(e){
|
||||
let pageUrl = e.currentTarget.dataset.url
|
||||
if(wx.getStorageSync("token") != ''){
|
||||
if(e.currentTarget.dataset.type && e.currentTarget.dataset.type == 'needSign' && this.data.userData.need_sign){
|
||||
wx.showModal({
|
||||
title : '提示',
|
||||
content : '您还未完成实名认证与签约成为VIP用户,无法获得邀请码',
|
||||
cancelText : '稍后完成',
|
||||
confirmText : '立即完善',
|
||||
confirmColor : '#da2b54',
|
||||
complete : res => {
|
||||
if (res.confirm) {
|
||||
wx.navigateTo({
|
||||
url: '/pages/idcard/idcard'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
wx.navigateTo({
|
||||
url: pageUrl
|
||||
})
|
||||
@@ -62,5 +73,16 @@ Page({
|
||||
url: "/pages/login/index"
|
||||
})
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 购买产品
|
||||
*/
|
||||
onBuy(e){
|
||||
let { id } = e.currentTarget.dataset
|
||||
if(id){
|
||||
wx.navigateTo({
|
||||
url: '/pages/mall/details/details?id=' + id,
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user