本地备份:主包优化前完整版本,可随时回退

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
XingQue
2026-06-27 05:41:55 +08:00
parent a751708d6e
commit 7f4f279b3f
124 changed files with 15837 additions and 21958 deletions

View File

@@ -1,6 +1,7 @@
// pages/verify/verify.js
import { createPage, request } from '../../utils/base-page.js'
import { enterLockedRole } from '../../utils/primary-role.js'
import { isStaffMode, restoreStaffContextAfterAuth } from '../../utils/staff-api.js'
const API_MAP = {
dashou: '/yonghu/dashouzhuce',
@@ -46,8 +47,17 @@ Page(createPage({
this.checkStatus()
},
onShow() {
if (this.data.authType) this.checkStatus()
async onShow() {
if (this.data.authType) {
if (this.data.authType === 'shangjia' && wx.getStorageSync('token')) {
await restoreStaffContextAfterAuth();
if (isStaffMode()) {
enterLockedRole('shangjia', getApp());
return;
}
}
this.checkStatus();
}
},
checkStatus() {