|
@@ -107,11 +107,39 @@ Page({ |
|
|
url: config.api.checkPhoneStatus, |
|
|
url: config.api.checkPhoneStatus, |
|
|
data: {} |
|
|
data: {} |
|
|
}).then(res => { |
|
|
}).then(res => { |
|
|
|
|
|
console.log(res, 'res'); |
|
|
that.setData({ |
|
|
that.setData({ |
|
|
ifSetUserInfo: true |
|
|
ifSetUserInfo: true |
|
|
}) |
|
|
}) |
|
|
|
|
|
// 手机号未授权 |
|
|
|
|
|
const ifSetUserInfo = wx.getStorageSync('ifSetUserInfo') |
|
|
|
|
|
if (ifSetUserInfo == 1) { |
|
|
|
|
|
if (!that.data.ifSetUserInfo) return |
|
|
|
|
|
wx.showModal({ |
|
|
|
|
|
title: '完善个人信息', |
|
|
|
|
|
content: '请继续完成个人信息哦', |
|
|
|
|
|
showCancel: true, |
|
|
|
|
|
cancelText: "以后再说", |
|
|
|
|
|
cancelColor: '', |
|
|
|
|
|
confirmText: "去完善", |
|
|
|
|
|
confirmColor: '#FD832D', |
|
|
|
|
|
complete: (res) => { |
|
|
|
|
|
if (res.cancel) { |
|
|
|
|
|
console.log('cancel'); |
|
|
|
|
|
} |
|
|
|
|
|
if (res.confirm) { |
|
|
|
|
|
wx.navigateTo({ |
|
|
|
|
|
url: '/pages3/setUserInfo/index', |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
// 已完成手机号授权 |
|
|
|
|
|
wx.setStorageSync('ifSetUserInfo', 2) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
return |
|
|
return |
|
|
}).catch(err => { |
|
|
}).catch(err => { |
|
|
|
|
|
console.log(err, 'err'); |
|
|
that.setData({ |
|
|
that.setData({ |
|
|
ifSetUserInfo: false |
|
|
ifSetUserInfo: false |
|
|
}) |
|
|
}) |
|
@@ -452,31 +480,7 @@ Page({ |
|
|
*/ |
|
|
*/ |
|
|
onShow: function () { |
|
|
onShow: function () { |
|
|
this.ifPhoneInfo() |
|
|
this.ifPhoneInfo() |
|
|
const ifSetUserInfo = wx.getStorageSync('ifSetUserInfo') || 2 |
|
|
|
|
|
// 手机号未授权 |
|
|
|
|
|
if (ifSetUserInfo == 1) { |
|
|
|
|
|
if (!this.data.ifSetUserInfo) return |
|
|
|
|
|
wx.showModal({ |
|
|
|
|
|
title: '完善个人信息', |
|
|
|
|
|
content: '请继续完成个人信息哦', |
|
|
|
|
|
showCancel: true, |
|
|
|
|
|
cancelText: "以后再说", |
|
|
|
|
|
cancelColor: '', |
|
|
|
|
|
confirmText: "去完善", |
|
|
|
|
|
confirmColor: '#FD832D', |
|
|
|
|
|
complete: (res) => { |
|
|
|
|
|
if (res.cancel) { |
|
|
|
|
|
console.log('cancel'); |
|
|
|
|
|
} |
|
|
|
|
|
if (res.confirm) { |
|
|
|
|
|
wx.navigateTo({ |
|
|
|
|
|
url: '/pages3/setUserInfo/index', |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
wx.setStorageSync('ifSetUserInfo', 2) // 已完成手机号授权 |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (businessSwitch) { |
|
|
if (businessSwitch) { |
|
|
let openId = wx.getStorageSync("openId") |
|
|
let openId = wx.getStorageSync("openId") |
|
|
this.setData({ |
|
|
this.setData({ |
|
|