chore: 抢单端UI回退前备份当前完整工作区

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
XingQue
2026-06-29 17:59:23 +08:00
parent 6e2f7bc39f
commit e8fb32c1fe
53 changed files with 3410 additions and 1065 deletions

View File

@@ -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) {

View File

@@ -56,10 +56,11 @@
<view>
<view class="nickname-row flex">
<text class="nickname">{{nicheng || '商家'}}</text>
<view class="sj-identity-tag">{{isStaffMode ? (staffRoleName || '商家客服') : '商家'}}</view>
<view class="sj-identity-tag" wx:if="{{isStaffMode}}">{{staffRoleName || '商家客服'}}</view>
<view class="sj-identity-tag" wx:else>商家</view>
</view>
<view wx:if="{{!isStaffMode}}" class="nickname-edit-btn flexm" bindtap="editNicheng">修改昵称</view>
<view class="identity-tags-row flex" wx:if="{{identityTagList.length > 0}}">
<view class="identity-tags-row flex" wx:if="{{identityTagList && identityTagList.length > 0}}">
<view class="badge-tag-wrap" wx:for="{{identityTagList}}" wx:key="id">
<chenghao-tag mingcheng="{{item.mingcheng}}" texiaoJson="{{item.texiao_json}}"/>
</view>
@@ -75,7 +76,7 @@
</view>
</view>
<view class="badge-zone" wx:if="{{chenghaoList.length > 0}}">
<view class="badge-zone" wx:if="{{chenghaoList && chenghaoList.length > 0}}">
<scroll-view scroll-x class="badge-scroll">
<view class="badge-tag-wrap" wx:for="{{chenghaoList}}" wx:key="index">
<chenghao-tag mingcheng="{{item.mingcheng}}" texiaoJson="{{item.texiao_json}}"/>