本地备份:消息系统改造前完整版本(未推送,便于回退)
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -9,6 +9,7 @@ import PopupService from '../../services/popupService.js';
|
||||
import { reconnectForRole } from '../../utils/role-tab-bar.js';
|
||||
import { ensurePhoneAuth } from '../../utils/phone-auth.js';
|
||||
import { fetchGonggaoLunbo, isGonggaoCacheValid } from '../../utils/display-config.js';
|
||||
import { checkPenaltyForGrab } from '../../utils/grab-order-gate.js';
|
||||
|
||||
Page({
|
||||
data: {
|
||||
@@ -61,8 +62,18 @@ Page({
|
||||
|
||||
async onLoad() {
|
||||
if (app.globalData._acceptOrderSessionReady && app.globalData._acceptOrderPageCache) {
|
||||
const cache = app.globalData._acceptOrderPageCache;
|
||||
this.setData({ ...cache });
|
||||
const cache = { ...app.globalData._acceptOrderPageCache };
|
||||
this.data.shangpinleixing = cache.shangpinleixing || [];
|
||||
const dingdanList = Array.isArray(cache.dingdanList)
|
||||
? cache.dingdanList.map((item) => this.processDingdanItem(item))
|
||||
: [];
|
||||
this.setData({
|
||||
...cache,
|
||||
shangpinleixing: cache.shangpinleixing || [],
|
||||
dingdanList,
|
||||
bankuaiBiaoqian: cache.bankuaiBiaoqian || [],
|
||||
lunboList: cache.lunboList || [],
|
||||
});
|
||||
if ((!cache.lunboList || cache.lunboList.length === 0) && !cache.gonggao && isGonggaoCacheValid(app)) {
|
||||
const lunboList = this.processLunboUrls(app.globalData.shangpinlunbo);
|
||||
const gonggao = app.globalData.shangpingonggao || '';
|
||||
@@ -72,6 +83,12 @@ Page({
|
||||
this.loadGlobalStatus();
|
||||
this.registerNotificationComponent();
|
||||
await this.syncDashouProfileFromServer();
|
||||
if (!this.data.shangpinleixing || this.data.shangpinleixing.length === 0) {
|
||||
await this.loadShangpinLeixing(true, false, false);
|
||||
} else if (this.data.xuanzhongLeixingId) {
|
||||
await this.loadDingdanList(true, true);
|
||||
}
|
||||
this.persistPageCache();
|
||||
this._skipShowRefresh = true;
|
||||
return;
|
||||
}
|
||||
@@ -546,6 +563,19 @@ Page({
|
||||
const dingdanItem = e.currentTarget.dataset.item;
|
||||
if (!dingdanItem) return;
|
||||
|
||||
const penalty = await checkPenaltyForGrab();
|
||||
if (penalty.blocked) {
|
||||
wx.showToast({
|
||||
title: penalty.msg,
|
||||
icon: 'none',
|
||||
duration: 2000,
|
||||
});
|
||||
setTimeout(() => {
|
||||
wx.navigateTo({ url: penalty.url });
|
||||
}, 500);
|
||||
return;
|
||||
}
|
||||
|
||||
await this.checkExamStatus();
|
||||
|
||||
if (this.data.examRequired && !this.data.examPassed) {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"navigationBarTitleText": "抢单大厅",
|
||||
"navigationBarBackgroundColor": "#f7dc51",
|
||||
"backgroundColor": "#f7dc51",
|
||||
"backgroundColorTop": "#f7dc51",
|
||||
"navigationBarBackgroundColor": "#c4b5fd",
|
||||
"backgroundColor": "#c4b5fd",
|
||||
"backgroundColorTop": "#c4b5fd",
|
||||
"navigationBarTextStyle": "black",
|
||||
"enablePullDownRefresh": false,
|
||||
"backgroundTextStyle": "dark",
|
||||
"backgroundColor": "#fff8e1",
|
||||
"backgroundColor": "#f5f3ff",
|
||||
"usingComponents": {
|
||||
"chenghao-tag": "/components/chenghao-tag/chenghao-tag",
|
||||
"global-notification": "/components/global-notification/global-notification"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!-- pages/qiangdan/qiangdan.wxml -->
|
||||
<!-- pages/qiangdan/qiangdan.wxml -->
|
||||
|
||||
<view class="qiangdan-page">
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
refresher-default-style="black"
|
||||
|
||||
refresher-background="#fff8e1"
|
||||
refresher-background="#f5f3ff"
|
||||
|
||||
refresher-triggered="{{scrollViewRefreshing}}"
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
indicator-color="rgba(255,255,255,0.6)"
|
||||
|
||||
indicator-active-color="#ffd061"
|
||||
indicator-active-color="#9333ea"
|
||||
|
||||
autoplay="{{lunboList.length > 1}}"
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
@import '../../styles/dashou-xym-order-card.wxss';
|
||||
|
||||
page {
|
||||
background-color: #f7dc51;
|
||||
background-color: #c4b5fd;
|
||||
}
|
||||
|
||||
.qiangdan-page {
|
||||
|
||||
Reference in New Issue
Block a user