本地备份:商家UI调整前当前完整版本(未推送)

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
XingQue
2026-06-27 06:04:45 +08:00
parent 5e50f6a486
commit fc0ee9a4d1
28 changed files with 3190 additions and 3264 deletions

View File

@@ -49,14 +49,7 @@ Page(createPage({
onLoad() {
wx.setNavigationBarTitle({ title: '我的接单' });
this.loadShangpinLeixing().then(() => {
if (this.data.xuanzhongLeixingId) {
return this.loadCurrentStatusOrders(true);
}
}).finally(() => {
this._ordersSessionReady = true;
this._skipShowRefresh = true;
});
this.loadShangpinLeixing();
this.registerNotificationComponent();
},
@@ -66,15 +59,8 @@ Page(createPage({
reconnectForRole('dashou');
if (app.startImWhenReady) app.startImWhenReady();
}
if (this._skipShowRefresh) {
this._skipShowRefresh = false;
return;
}
if (this._ordersSessionReady && this.data.xuanzhongLeixingId && !this._silentRefreshRunning) {
this._silentRefreshRunning = true;
this.loadCurrentStatusOrders(true, true).finally(() => {
this._silentRefreshRunning = false;
});
if (this.data.currentStatusKey && this.data.xuanzhongLeixingId) {
this.loadCurrentStatusOrders(true);
}
},
@@ -155,21 +141,17 @@ Page(createPage({
},
// 加载订单(核心)
async loadCurrentStatusOrders(isRefresh = false, silent = false) {
async loadCurrentStatusOrders(isRefresh = false) {
const key = this.data.currentStatusKey;
const tabData = this.data.dsDingdanShuju[key];
if (tabData.isLoading && !silent) return;
if (silent && this._listRequesting) return;
if (tabData.isLoading) return;
const page = isRefresh ? 1 : tabData.page;
if (!silent) {
this.setData({
[`dsDingdanShuju.${key}.isLoading`]: true,
isLoading: true,
isLoadingMore: !isRefresh,
});
}
this._listRequesting = true;
this.setData({
[`dsDingdanShuju.${key}.isLoading`]: true,
isLoading: true,
isLoadingMore: !isRefresh
});
try {
const apiUrl = this.data.orderType === 'peihu'
@@ -226,20 +208,14 @@ Page(createPage({
}
} catch (err) {
console.error('加载订单失败', err);
if (!silent) {
wx.showToast({ title: err.message || '加载失败', icon: 'none' });
}
if (!silent) {
this.setData({
[`dsDingdanShuju.${key}.isLoading`]: false,
isLoading: false,
isLoadingMore: false,
scrollViewRefreshing: false
});
this.refreshCurrentListView();
}
} finally {
this._listRequesting = false;
wx.showToast({ title: err.message || '加载失败', icon: 'none' });
this.setData({
[`dsDingdanShuju.${key}.isLoading`]: false,
isLoading: false,
isLoadingMore: false,
scrollViewRefreshing: false
});
this.refreshCurrentListView();
}
},

View File

@@ -1,7 +1,6 @@
{
"usingComponents": {
"global-notification": "/components/global-notification/global-notification",
"tab-bar": "/tab-bar/index"
"global-notification": "/components/global-notification/global-notification"
},
"navigationBarTitleText": "我的接单",
"enablePullDownRefresh": false,