ソースを参照

upload

newCard
HolyKnightIX 2年前
コミット
1027b0048d
2個のファイルの変更29行の追加26行の削除
  1. +29
    -25
      index/user.js
  2. +0
    -1
      pages/getphoneInfo/index.js

+ 29
- 25
index/user.js ファイルの表示

@@ -107,11 +107,39 @@ Page({
url: config.api.checkPhoneStatus,
data: {}
}).then(res => {
console.log(res, 'res');
that.setData({
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
}).catch(err => {
console.log(err, 'err');
that.setData({
ifSetUserInfo: false
})
@@ -452,31 +480,7 @@ Page({
*/
onShow: function () {
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) {
let openId = wx.getStorageSync("openId")
this.setData({


+ 0
- 1
pages/getphoneInfo/index.js ファイルの表示

@@ -227,7 +227,6 @@ Page({
url: `/pages/radetail/joinActivity/edit?activityId=${that.data.signActivity}`
})
} else if (that.data.mineFlag == 'mine') {

wx.switchTab({
url: '/index/user'
});


読み込み中…
キャンセル
保存