fix: 打手端每次进入均向后端校验手机号认证

This commit is contained in:
XingQue
2026-06-22 16:42:36 +08:00
parent 0767e23f11
commit e54846df02
7 changed files with 137 additions and 104 deletions

View File

@@ -3,6 +3,7 @@ const app = getApp();
import request from '../../utils/request.js';
import PopupService from '../../services/popupService.js';
import { reconnectForRole } from '../../utils/role-tab-bar.js';
import { ensurePhoneAuth } from '../../utils/phone-auth.js';
Page({
data: {
@@ -58,7 +59,10 @@ Page({
}
},
onShow() {
async onShow() {
const phoneOk = await ensurePhoneAuth({ redirect: true, role: 'dashou' });
if (!phoneOk) return;
this.registerNotificationComponent();
this.loadGlobalStatus();
if (wx.getStorageSync('uid')) {