瀏覽代碼

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, 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({


+ 0
- 1
pages/getphoneInfo/index.js 查看文件

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

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


Loading…
取消
儲存