chore: 抢单端UI回退前备份当前完整工作区
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -36,6 +36,7 @@ Page(createPage({
|
||||
iconCopy: '',
|
||||
avatarFrame: '',
|
||||
iconClear: '',
|
||||
iconKefuList: '',
|
||||
},
|
||||
|
||||
// 商家状态
|
||||
@@ -139,18 +140,22 @@ Page(createPage({
|
||||
|
||||
async onShow() {
|
||||
this.registerNotificationComponent();
|
||||
if (!this._ossImagesReady && app.globalData.ossImageUrl) {
|
||||
this.setupImageUrls();
|
||||
this._ossImagesReady = true;
|
||||
}
|
||||
this.syncRoleStatusFromStorage();
|
||||
syncStaffUi(this);
|
||||
if (app.globalData.ossImageUrl) {
|
||||
this.setupImageUrls();
|
||||
}
|
||||
// 每次进入刷新经营/处罚统计(避免罚单数量卡住不更新)
|
||||
if (this.data.isShangjia || isMerchantPortalUser()) {
|
||||
if (!isStaffMode()) {
|
||||
this.loadDashboardStats();
|
||||
|
||||
if (this._showRefreshTimer) clearTimeout(this._showRefreshTimer);
|
||||
this._showRefreshTimer = setTimeout(() => {
|
||||
if (this.data.isShangjia || isMerchantPortalUser()) {
|
||||
if (!isStaffMode()) {
|
||||
this.loadDashboardStats();
|
||||
}
|
||||
}
|
||||
}
|
||||
this.loadMerchantDataIfNeeded();
|
||||
this.loadMerchantDataIfNeeded();
|
||||
}, 200);
|
||||
},
|
||||
|
||||
syncRoleStatusFromStorage() {
|
||||
@@ -159,8 +164,8 @@ Page(createPage({
|
||||
const portal = isMerchantPortalUser();
|
||||
const staffFlag = Number(wx.getStorageSync('staffstatus')) === 1;
|
||||
if (portal || staffFlag) {
|
||||
this.setData({ isShangjia: portal || staffFlag, uid: uid || '', staffBooting: false, isLoading: false });
|
||||
} else {
|
||||
this.setData({ isShangjia: true, uid: uid || '', staffBooting: false, isLoading: false });
|
||||
} else if (!this.data.isShangjia) {
|
||||
this.setData({ isShangjia: false, staffBooting: false, isLoading: false });
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user