|
|
@ -468,7 +468,13 @@ Page({ |
|
|
|
|
|
|
|
|
// 检查用户手机号是否在personnel表中
|
|
|
// 检查用户手机号是否在personnel表中
|
|
|
checkPhoneInPersonnel() { |
|
|
checkPhoneInPersonnel() { |
|
|
const userInfo = this.data.userInfo; |
|
|
// 优先从本地存储获取最新的用户信息
|
|
|
|
|
|
const localUserInfo = wx.getStorageSync('userInfo') || {}; |
|
|
|
|
|
const app = getApp(); |
|
|
|
|
|
const globalUserInfo = app.globalData.userInfo || {}; |
|
|
|
|
|
|
|
|
|
|
|
// 按优先级获取用户信息:本地存储 > 全局变量 > 页面数据
|
|
|
|
|
|
const userInfo = localUserInfo.phoneNumber ? localUserInfo : (globalUserInfo.phoneNumber ? globalUserInfo : this.data.userInfo); |
|
|
const phoneNumber = userInfo.phoneNumber; |
|
|
const phoneNumber = userInfo.phoneNumber; |
|
|
|
|
|
|
|
|
if (!phoneNumber) { |
|
|
if (!phoneNumber) { |
|
|
|