From a751708d6e6fc99c3a64d4bab6fe02a17167f22d Mon Sep 17 00:00:00 2001 From: XingQue Date: Sat, 20 Jun 2026 01:50:14 +0800 Subject: [PATCH] =?UTF-8?q?backup:=20=E5=AD=90=E5=AE=A2=E6=9C=8D=E6=94=B9?= =?UTF-8?q?=E9=80=A0=E5=89=8D=E4=BF=9D=E6=9C=AC=E7=89=88=E6=9C=AC=EF=BC=88?= =?UTF-8?q?=E9=80=8D=E9=81=A5=E6=A2=A6UI+=E5=95=86=E5=AE=B6=E5=AE=A2?= =?UTF-8?q?=E6=9C=8D=E9=A1=B5mock=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 215 +- pages/accept-order/accept-order.js | 1167 ++++----- pages/accept-order/accept-order.json | 6 +- pages/accept-order/accept-order.wxml | 563 +++-- pages/accept-order/accept-order.wxss | 27 +- pages/express-order/express-order.json | 8 +- pages/express-order/express-order.wxml | 458 ++-- pages/express-order/express-order.wxss | 808 +++++-- pages/fighter-orders/fighter-orders.wxml | 4 +- pages/fighter-orders/fighter-orders.wxss | 4 +- pages/fighter-recharge/fighter-recharge.wxss | 4 +- pages/fighter/fighter.js | 2144 +++++++++-------- pages/fighter/fighter.json | 24 +- pages/fighter/fighter.wxml | 543 ++--- pages/fighter/fighter.wxss | 1271 ++++------ .../merchant-dispatch/merchant-dispatch.json | 8 +- .../merchant-dispatch/merchant-dispatch.wxml | 4 +- .../merchant-dispatch/merchant-dispatch.wxss | 65 +- pages/merchant-home/merchant-home.js | 276 +++ pages/merchant-home/merchant-home.json | 11 + pages/merchant-home/merchant-home.wxml | 120 + pages/merchant-home/merchant-home.wxss | 309 +++ pages/merchant-kefu-key/merchant-kefu-key.js | 60 + .../merchant-kefu-key/merchant-kefu-key.json | 5 + .../merchant-kefu-key/merchant-kefu-key.wxml | 69 + .../merchant-kefu-key/merchant-kefu-key.wxss | 335 +++ .../merchant-kefu-list/merchant-kefu-list.js | 47 + .../merchant-kefu-list.json | 5 + .../merchant-kefu-list.wxml | 47 + .../merchant-kefu-list.wxss | 109 + pages/merchant/merchant.js | 530 ++-- pages/merchant/merchant.json | 8 +- pages/merchant/merchant.wxml | 335 ++- pages/merchant/merchant.wxss | 651 ++--- pages/mine/mine.wxss | 23 +- pages/order-pool/order-pool.js | 929 +++---- pages/order-pool/order-pool.wxml | 25 +- pages/order-pool/order-pool.wxss | 32 +- styles/dashou-xym-order-card.wxss | 341 +++ styles/dashou-xym-orders-theme.wxss | 84 + styles/dashou-xym-rank-theme.wxss | 92 + styles/dashou-xym-recharge-theme.wxss | 213 ++ styles/dashou-xym-theme.wxss | 288 +++ styles/shangjia-xym-common.wxss | 307 +++ styles/shangjia-xym-form.wxss | 256 ++ tab-bar/index.js | 219 +- tab-bar/index.wxml | 47 +- tab-bar/index.wxss | 151 +- utils/primary-role.js | 210 +- 49 files changed, 8189 insertions(+), 5268 deletions(-) create mode 100644 pages/merchant-home/merchant-home.js create mode 100644 pages/merchant-home/merchant-home.json create mode 100644 pages/merchant-home/merchant-home.wxml create mode 100644 pages/merchant-home/merchant-home.wxss create mode 100644 pages/merchant-kefu-key/merchant-kefu-key.js create mode 100644 pages/merchant-kefu-key/merchant-kefu-key.json create mode 100644 pages/merchant-kefu-key/merchant-kefu-key.wxml create mode 100644 pages/merchant-kefu-key/merchant-kefu-key.wxss create mode 100644 pages/merchant-kefu-list/merchant-kefu-list.js create mode 100644 pages/merchant-kefu-list/merchant-kefu-list.json create mode 100644 pages/merchant-kefu-list/merchant-kefu-list.wxml create mode 100644 pages/merchant-kefu-list/merchant-kefu-list.wxss create mode 100644 styles/dashou-xym-order-card.wxss create mode 100644 styles/dashou-xym-orders-theme.wxss create mode 100644 styles/dashou-xym-rank-theme.wxss create mode 100644 styles/dashou-xym-recharge-theme.wxss create mode 100644 styles/dashou-xym-theme.wxss create mode 100644 styles/shangjia-xym-common.wxss create mode 100644 styles/shangjia-xym-form.wxss diff --git a/app.json b/app.json index 225097d..1ed971e 100644 --- a/app.json +++ b/app.json @@ -1,107 +1,110 @@ -{ - "pages": [ - "pages/index/index", - "pages/category/category", - "pages/pick-user/pick-user", - "pages/messages/messages", - "pages/mine/mine", - "pages/product-detail/product-detail", - "pages/submit/submit", - "pages/edit/edit", - "pages/fighter/fighter", - "pages/merchant/merchant", - "pages/manager/manager", - "pages/orders/orders", - "pages/order-detail/order-detail", - "pages/fighter-rules/fighter-rules", - "pages/fighter-edit/fighter-edit", - "pages/fighter-rank/fighter-rank", - "pages/fighter-recharge/fighter-recharge", - "pages/fighter-msg/fighter-msg", - "pages/fighter-orders/fighter-orders", - "pages/accept-order/accept-order", - "pages/withdraw/withdraw", - "pages/invite-fighter/invite-fighter", - "pages/my-fighter/my-fighter", - "pages/recharge-log/recharge-log", - "pages/manager-rank/manager-rank", - "pages/merchant-dispatch/merchant-dispatch", - "pages/merchant-orders/merchant-orders", - "pages/merchant-msg/merchant-msg", - "pages/merchant-rank/merchant-rank", - "pages/merchant-recharge/merchant-recharge", - "pages/merchant-order-detail/merchant-order-detail", - "pages/fighter-order-detail/fighter-order-detail", - "pages/chat/chat", - "pages/express-order/express-order", - "pages/order-pool/order-pool", - "pages/poster/poster", - "pages/gold-fighter/gold-fighter", - "pages/leader/leader", - "pages/manager-assign/manager-assign", - "pages/leader-bonus-log/leader-bonus-log", - "pages/invite-manager/invite-manager", - "pages/order-pool2/order-pool2", - "pages/group-chat/group-chat", - "pages/cs-chat/cs-chat", - "pages/verify/verify", - "components/global-notification/global-notification", - "components/popup-notice/popup-notice", - "components/order-card/order-card", - "components/order-sender/order-sender", - "pages/penalty/penalty/penalty", - "pages/penalty/components/fakuan-list/fakuan-list", - "pages/penalty/components/jifen-list/jifen-list", - "pages/penalty/components/fakuan-pay/fakuan-pay", - "pages/phone-auth/phone-auth", - "components/chenghao-tag/chenghao-tag", - "pages/assessor/assessor", - "pages/assess-score/assess-score", - "pages/assess-log/assess-log", - "pages/assess-center/assess-center", - "pages/assess-gold/assess-gold", - "pages/escort-orders/escort-orders", - "pages/withdraw/components/mode1/mode1", - "pages/withdraw/components/mode2/mode2" - - - ], - - "usingComponents": { - "popup-notice": "/components/popup-notice/popup-notice", - "tab-bar": "/tab-bar/index" - }, - - "window": { - "navigationBarTextStyle": "black", - "navigationStyle": "default", - "backgroundTextStyle": "light", - "navigationBarBackgroundColor": "#fff", - "navigationBarTitleText": "星阙网络" - }, - "tabBar": { - "custom": true, - "list": [ - - - { - "pagePath": "pages/order-pool/order-pool", - "text": "接单池", - "iconPath": "/images/order-pool.png", - "selectedIconPath": "/images/order-pool.png" - }, - { - "pagePath": "pages/order-pool2/order-pool2", - "text": "接单池", - "iconPath": "/images/order-pool.png", - "selectedIconPath": "/images/order-pool.png" - } - - ] - }, - - - "style": "v2", - "sitemapLocation": "sitemap.json", - "lazyCodeLoading": "requiredComponents" +{ + "pages": [ + "pages/index/index", + "pages/category/category", + "pages/pick-user/pick-user", + "pages/messages/messages", + "pages/mine/mine", + "pages/product-detail/product-detail", + "pages/submit/submit", + "pages/edit/edit", + "pages/fighter/fighter", + "pages/merchant/merchant", + "pages/merchant-home/merchant-home", + "pages/merchant-kefu-key/merchant-kefu-key", + "pages/merchant-kefu-list/merchant-kefu-list", + "pages/manager/manager", + "pages/orders/orders", + "pages/order-detail/order-detail", + "pages/fighter-rules/fighter-rules", + "pages/fighter-edit/fighter-edit", + "pages/fighter-rank/fighter-rank", + "pages/fighter-recharge/fighter-recharge", + "pages/fighter-msg/fighter-msg", + "pages/fighter-orders/fighter-orders", + "pages/accept-order/accept-order", + "pages/withdraw/withdraw", + "pages/invite-fighter/invite-fighter", + "pages/my-fighter/my-fighter", + "pages/recharge-log/recharge-log", + "pages/manager-rank/manager-rank", + "pages/merchant-dispatch/merchant-dispatch", + "pages/merchant-orders/merchant-orders", + "pages/merchant-msg/merchant-msg", + "pages/merchant-rank/merchant-rank", + "pages/merchant-recharge/merchant-recharge", + "pages/merchant-order-detail/merchant-order-detail", + "pages/fighter-order-detail/fighter-order-detail", + "pages/chat/chat", + "pages/express-order/express-order", + "pages/order-pool/order-pool", + "pages/poster/poster", + "pages/gold-fighter/gold-fighter", + "pages/leader/leader", + "pages/manager-assign/manager-assign", + "pages/leader-bonus-log/leader-bonus-log", + "pages/invite-manager/invite-manager", + "pages/order-pool2/order-pool2", + "pages/group-chat/group-chat", + "pages/cs-chat/cs-chat", + "pages/verify/verify", + "components/global-notification/global-notification", + "components/popup-notice/popup-notice", + "components/order-card/order-card", + "components/order-sender/order-sender", + "pages/penalty/penalty/penalty", + "pages/penalty/components/fakuan-list/fakuan-list", + "pages/penalty/components/jifen-list/jifen-list", + "pages/penalty/components/fakuan-pay/fakuan-pay", + "pages/phone-auth/phone-auth", + "components/chenghao-tag/chenghao-tag", + "pages/assessor/assessor", + "pages/assess-score/assess-score", + "pages/assess-log/assess-log", + "pages/assess-center/assess-center", + "pages/assess-gold/assess-gold", + "pages/escort-orders/escort-orders", + "pages/withdraw/components/mode1/mode1", + "pages/withdraw/components/mode2/mode2" + + + ], + + "usingComponents": { + "popup-notice": "/components/popup-notice/popup-notice", + "tab-bar": "/tab-bar/index" + }, + + "window": { + "navigationBarTextStyle": "black", + "navigationStyle": "default", + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#fff", + "navigationBarTitleText": "星阙网络" + }, + "tabBar": { + "custom": true, + "list": [ + + + { + "pagePath": "pages/order-pool/order-pool", + "text": "接单池", + "iconPath": "/images/order-pool.png", + "selectedIconPath": "/images/order-pool.png" + }, + { + "pagePath": "pages/order-pool2/order-pool2", + "text": "接单池", + "iconPath": "/images/order-pool.png", + "selectedIconPath": "/images/order-pool.png" + } + + ] + }, + + + "style": "v2", + "sitemapLocation": "sitemap.json", + "lazyCodeLoading": "requiredComponents" } \ No newline at end of file diff --git a/pages/accept-order/accept-order.js b/pages/accept-order/accept-order.js index d06af4a..749dfe7 100644 --- a/pages/accept-order/accept-order.js +++ b/pages/accept-order/accept-order.js @@ -1,577 +1,592 @@ -// pages/qiangdan/qiangdan.js -const app = getApp(); -import request from '../../utils/request.js'; -import PopupService from '../../services/popupService.js'; -import { reconnectForRole } from '../../utils/role-tab-bar.js'; - -Page({ - data: { - // 1. 商品类型相关 - shangpinleixing: [], - xuanzhongLeixingId: null, - - // 2. 订单列表与分页相关 - dingdanList: [], - page: 1, - pageSize: 5, - hasMore: true, - isLoading: false, - - // 3. 全局状态字段 - dashoustatus: null, - zhuanghaoStatus: null, - dashouzhuangtai: null, - uid: null, - huiyuanList: [], - yajin: 0, - jifen: 0, - - // 4. 刷新控制字段 - scrollViewRefreshing: false, - lastRefreshTime: 0, - refreshCooldown: 2000, - isLoadingMore: false, - - // 5. 切换类型冷却 - lastSwitchTime: 0, - switchCooldown: 1500, - isSwitching: false, - - // 6. OSS地址 - ossImageUrl: app.globalData.ossImageUrl || '', - - // 🆕 7. 标签筛选相关 - bankuaiBiaoqian: [], // 当前商品类型所属板块的全部标签 - xuanzhongBiaoqianId: 0, // 0=全部 - }, - - async onLoad(options) { - this.loadGlobalStatus(); - await this.loadShangpinLeixing(); - PopupService.checkAndShow(this, 'jiedan'); - }, - - onHide: function () { - const popupComp = this.selectComponent('#popupNotice'); - if (popupComp && popupComp.cleanup) { - popupComp.cleanup(); - } - }, - - onShow() { - this.registerNotificationComponent(); - this.loadGlobalStatus(); - if (wx.getStorageSync('uid')) { - reconnectForRole('dashou'); - if (app.startImWhenReady) app.startImWhenReady(); - this.refreshDashouProfileSilent(); - } - if (this.data.xuanzhongLeixingId) { - this.loadDingdanList(true); - } - }, - - async refreshDashouProfileSilent() { - try { - const res = await request({ url: '/yonghu/dashouxinxi', method: 'POST' }); - if (!res || res.data.code != 200) return; - const data = res.data.data || {}; - const patch = { - dashouNicheng: data.dashounicheng || '', - zhanghaoStatus: data.zhanghaostatus || '', - dashouzhuangtai: data.dashouzhuangtai || '', - yajin: data.yajin || 0, - jifen: data.jifen || 0, - clumber: data.clumber || [], - }; - Object.assign(app.globalData, { - dashouNicheng: patch.dashouNicheng, - zhanghaoStatus: patch.zhanghaoStatus, - dashouzhuangtai: patch.dashouzhuangtai, - yajin: patch.yajin, - jinfen: patch.jifen, - clumber: patch.clumber, - }); - if (data.dashoustatus !== undefined) { - wx.setStorageSync('dashoustatus', data.dashoustatus); - app.globalData.dashoustatus = data.dashoustatus; - } - this.setData({ - zhuanghaoStatus: patch.zhanghaoStatus, - dashouzhuangtai: patch.dashouzhuangtai, - huiyuanList: patch.clumber, - yajin: patch.yajin, - jifen: patch.jifen, - }); - } catch (e) {} - }, - - registerNotificationComponent() { - const notificationComp = this.selectComponent('#global-notification'); - if (notificationComp && notificationComp.showNotification) { - app.globalData.globalNotification = { - show: (data) => notificationComp.showNotification(data), - hide: () => notificationComp.hideNotification() - }; - } - }, - - loadGlobalStatus() { - const globalData = app.globalData; - this.setData({ - dashoustatus: wx.getStorageSync('dashoustatus'), - zhuanghaoStatus: globalData.zhanghaoStatus, - dashouzhuangtai: globalData.dashouzhuangtai, - uid: wx.getStorageSync('uid'), - huiyuanList: globalData.clumber || [], - yajin: globalData.yajin || 0, - jifen: globalData.jinfen || 0 - }); - }, - - // 加载商品类型 - async loadShangpinLeixing() { - wx.showLoading({ title: '加载商品类型...' }); - try { - const res = await request({ - url: '/dingdan/dsqdhqddlx', - method: 'POST', - header: { 'content-type': 'application/json' } - }); - if (res.statusCode === 200 && res.data) { - const data = res.data; - let list = []; - if (data.code === 200 || data.code === 0) { - if (data.data && Array.isArray(data.data.list)) list = data.data.list; - else if (data.data && Array.isArray(data.data)) list = data.data; - else if (Array.isArray(data.list)) list = data.list; - else if (Array.isArray(data)) list = data; - } - const processedList = this.processTupianUrl(list); - this.setData({ - shangpinleixing: processedList, - xuanzhongLeixingId: processedList[0]?.id || null - }); - if (this.data.xuanzhongLeixingId) { - this.loadDingdanList(true); - // 🆕 加载板块标签 - this.loadBankuaiBiaoqian(); - } - } else { - wx.showToast({ title: res.data?.msg || '加载商品类型失败', icon: 'none' }); - } - } catch (error) { - wx.showToast({ title: '网络错误,加载失败', icon: 'none' }); - } finally { - wx.hideLoading(); - } - }, - - // 处理图片URL - processTupianUrl(list) { - const ossUrl = app.globalData.ossImageUrl || ''; - return list.map(item => ({ - ...item, - full_tupian_url: item.tupian_url && !item.tupian_url.startsWith('http') - ? ossUrl + item.tupian_url - : (item.tupian_url || '/images/default-type.png') - })); - }, - - // 🆕 加载板块标签 - async loadBankuaiBiaoqian() { - const leixingId = this.data.xuanzhongLeixingId; - if (!leixingId) return; - try { - const res = await request({ - url: '/dengji/bkqhbq', - method: 'POST', - data: { leixing_id: leixingId } - }); - if (res && res.data.code === 0) { - this.setData({ - bankuaiBiaoqian: res.data.data.biaoqian_list || [], - xuanzhongBiaoqianId: 0 - }); - } - } catch (e) { - // 标签加载失败不影响主流程 - } - }, - - // 选择商品类型 - async selectLeixing(e) { - const now = Date.now(); - const lastSwitchTime = this.data.lastSwitchTime; - const switchCooldown = this.data.switchCooldown; - - if (now - lastSwitchTime < switchCooldown) { - wx.showToast({ - title: `操作太快,请${Math.ceil((switchCooldown - (now - lastSwitchTime)) / 1000)}秒后再试`, - icon: 'none', - duration: 1500 - }); - return; - } - if (this.data.isSwitching) return; - - const leixingId = e.currentTarget.dataset.id; - if (leixingId === this.data.xuanzhongLeixingId) return; - - this.setData({ isSwitching: true, lastSwitchTime: now }); - wx.showLoading({ title: '切换中...' }); - - try { - this.setData({ - xuanzhongLeixingId: leixingId, - dingdanList: [], - page: 1, - hasMore: true, - xuanzhongBiaoqianId: 0 // 重置标签筛选 - }); - await this.loadDingdanList(true); - // 🆕 切换类型后加载新标签 - await this.loadBankuaiBiaoqian(); - } catch (error) { - console.error('切换类型失败:', error); - } finally { - this.setData({ isSwitching: false }); - wx.hideLoading(); - } - }, - - // 🆕 选择标签筛选 - async selectBiaoqian(e) { - const id = e.currentTarget.dataset.id; - if (id === this.data.xuanzhongBiaoqianId) return; - this.setData({ - xuanzhongBiaoqianId: id, - dingdanList: [], - page: 1, - hasMore: true - }); - await this.loadDingdanList(true); - }, - - // 加载订单列表 - async loadDingdanList(isRefresh = false) { - if (this.data.isLoading || !this.data.xuanzhongLeixingId) return; - - const loadPage = isRefresh ? 1 : this.data.page; - if (!isRefresh && !this.data.hasMore) return; - - this.setData({ - isLoading: true, - isLoadingMore: !isRefresh - }); - - try { - const res = await request({ - url: '/dingdan/ddhq', - method: 'POST', - data: { - leixing_id: this.data.xuanzhongLeixingId, - page: loadPage, - page_size: this.data.pageSize, - // 🆕 传递标签筛选参数(0时不传) - biaoqian_id: this.data.xuanzhongBiaoqianId || undefined - } - }); - - this.setData({ - isLoading: false, - isLoadingMore: false, - scrollViewRefreshing: false - }); - - if (res.data.code === 200 || res.data.code === 0) { - const newList = res.data.data.list || []; - const hasMore = res.data.data.has_more || false; - - // 🆕 处理每条订单,增加 hasRequiredMember 字段 - const processedList = newList.map(item => this.processDingdanItem(item)); - const updatedList = isRefresh ? processedList : [...this.data.dingdanList, ...processedList]; - updatedList.sort((a, b) => (b.creat_time || '').localeCompare(a.creat_time || '')); - - this.setData({ - dingdanList: updatedList, - page: loadPage, - hasMore: hasMore - }); - - if (isRefresh) { - this.setData({ lastRefreshTime: Date.now() }); - } - } else { - wx.showToast({ title: res.data.msg || '加载失败', icon: 'none' }); - } - } catch (error) { - console.error('加载订单失败:', error); - this.setData({ - isLoading: false, - isLoadingMore: false, - scrollViewRefreshing: false - }); - wx.showToast({ title: '网络请求失败', icon: 'none' }); - } - }, - - // 处理单条订单数据(包含标签、会员判断) - processDingdanItem(item) { - const ossUrl = app.globalData.ossImageUrl || ''; - let fullTupianUrl = ''; - - if (item.tupian) { - fullTupianUrl = !item.tupian.startsWith('http') ? ossUrl + item.tupian : item.tupian; - } else { - const leixing = this.data.shangpinleixing.find(l => l.id === item.leixing_id); - fullTupianUrl = leixing ? leixing.full_tupian_url : '/images/default-order.png'; - } - - const isZhiding = item.zhuangtai === 7; - - let zhidingAvatar = ''; - if (item.zhiding_avatar) { - zhidingAvatar = !item.zhiding_avatar.startsWith('http') - ? ossUrl + item.zhiding_avatar - : item.zhiding_avatar; - } - const zhidingNicheng = item.zhiding_nicheng || ''; - - // 🆕 判断用户是否有订单所需的会员(仅当订单要求会员类型且存在huiyuan_id) - let hasRequiredMember = true; - if (item.yaoqiuleixing == 1 && item.huiyuan_id) { - const userHasIt = this.data.huiyuanList.some(h => h.huiyuanid == item.huiyuan_id); - hasRequiredMember = userHasIt; - } - - return { - ...item, - full_tupian_url: fullTupianUrl, - isZhiding: isZhiding, - isPingtai: item.pingtai == 1, - isShangjia: item.pingtai == 2, - zhiding_avatar_full: zhidingAvatar, - zhiding_nicheng: zhidingNicheng, - // 🆕 三层标签(后端返回,直接保留) - xuqiu_biaoqian: item.xuqiu_biaoqian || [], - dashou_biaoqian: item.dashou_biaoqian || [], - shangjia_biaoqian: item.shangjia_biaoqian || [], - // 🆕 是否有查看价格的权限 - hasRequiredMember: hasRequiredMember, - }; - }, - - // 跳转到充值页面(原封不动) - goToChongzhiPage(failureType, huiyuanId = null, requiredYajin = 0) { - let url = '/pages/fighter-recharge/fighter-recharge'; - let params = {}; - - switch (failureType) { - case 'huiyuan': - params = { needScroll: '0', scrollTo: 'member' }; - break; - case 'yajin': - params = { needScroll: '1', scrollTo: 'bottom', requiredYajin: requiredYajin }; - break; - case 'jifen': - params = { needScroll: '1', scrollTo: 'bottom' }; - break; - } - - if (huiyuanId) params.huiyuanId = huiyuanId; - - const queryString = Object.keys(params) - .map(key => `${key}=${encodeURIComponent(params[key])}`) - .join('&'); - - wx.navigateTo({ - url: `${url}?${queryString}`, - fail: (err) => { - console.error('跳转失败:', err); - wx.showToast({ title: '跳转失败,请稍后重试', icon: 'none' }); - } - }); - }, - - // 抢单按钮(原封不动) - async onQiangdanTap(e) { - const dingdanItem = e.currentTarget.dataset.item; - if (!dingdanItem) return; - - // 校验1: 打手身份 - if (!this.data.dashoustatus || this.data.dashoustatus != 1) { - wx.showToast({ title: '请先开启接单员身份', icon: 'none' }); - return; - } - // 校验2: 账号状态 - if (this.data.zhuanghaoStatus != 1) { - wx.showToast({ title: '账号异常,无法接单', icon: 'none' }); - return; - } - // 校验3: 接单员接单状态 - if (this.data.dashouzhuangtai != 1) { - wx.showToast({ title: '您有订单正在接待中', icon: 'none' }); - return; - } - // 校验4: 指定订单 - if (dingdanItem.isZhiding) { - if (!this.data.uid || this.data.uid != dingdanItem.zhiding_uid) { - wx.showToast({ title: '此订单为指定单', icon: 'none' }); - return; - } - } - // 校验5: 会员要求 - if (dingdanItem.yaoqiuleixing == 1) { - const hasHuiyuan = this.data.huiyuanList.some(h => h.huiyuanid == dingdanItem.huiyuan_id); - if (!hasHuiyuan) { - wx.showToast({ - title: '未开通对应会员,无法抢单', - icon: 'none', - duration: 2000 - }); - setTimeout(() => { - this.goToChongzhiPage('huiyuan', dingdanItem.huiyuan_id); - }, 500); - return; - } - } - // 校验6: 押金要求 - if (dingdanItem.yaoqiuleixing == 2) { - if (this.data.yajin < dingdanItem.yajin) { - wx.showToast({ - title: `押金不足,需${dingdanItem.yajin}`, - icon: 'none', - duration: 2000 - }); - setTimeout(() => { - this.goToChongzhiPage('yajin', null, dingdanItem.yajin); - }, 500); - return; - } - } - // 校验7: 积分要求 - if (this.data.jifen < 5) { - wx.showToast({ - title: '积分不足,至少需要5积分', - icon: 'none', - duration: 2000 - }); - setTimeout(() => { - this.goToChongzhiPage('jifen'); - }, 500); - return; - } - - // 确认框 - const that = this; - wx.showModal({ - title: '确认抢单', - content: `确定要抢此订单吗?${dingdanItem.isZhiding ? '(指定订单)' : ''}`, - success: async function (res) { - if (res.confirm) { - wx.showLoading({ title: '抢单中...', mask: true }); - try { - const qiangdanRes = await request({ - url: '/dingdan/qiangdan', - method: 'POST', - data: { dingdan_id: dingdanItem.dingdan_id } - }); - wx.hideLoading(); - - if (qiangdanRes.data.code === 200 || qiangdanRes.data.code === 0) { - that.showQiangdanSuccessEffect(); - if (app.globalData) { - app.globalData.dashouzhuangtai = 0; - that.setData({ dashouzhuangtai: 0 }); - } - const newList = that.data.dingdanList.filter( - item => item.dingdan_id !== dingdanItem.dingdan_id - ); - that.setData({ dingdanList: newList }); - } else { - wx.showToast({ - title: qiangdanRes.data.msg || '抢单失败', - icon: 'none' - }); - } - } catch (error) { - wx.hideLoading(); - console.error('抢单请求失败:', error); - wx.showToast({ title: '网络错误,抢单失败', icon: 'none' }); - } - } - } - }); - }, - - showQiangdanSuccessEffect() { - wx.showToast({ title: '抢单成功!', icon: 'success', duration: 2000 }); - }, - - onViewDetail(e) { - const { type, content } = e.currentTarget.dataset; - wx.showModal({ - title: type === 'jieshao' ? '订单介绍' : '订单备注', - content: content, - showCancel: false, - confirmText: '知道了' - }); - }, - - onReachBottom() { - const now = Date.now(); - const lastTime = this.data.lastRefreshTime; - const cooldown = this.data.refreshCooldown; - - if (now - lastTime < cooldown) { - wx.showToast({ - title: `操作太快,请${Math.ceil((cooldown - (now - lastTime)) / 1000)}秒后再试`, - icon: 'none', - duration: 1500 - }); - return; - } - - if (this.data.isLoading || this.data.isLoadingMore) return; - - if (this.data.hasMore && !this.data.isLoading && this.data.xuanzhongLeixingId) { - this.setData({ page: this.data.page + 1 }); - this.loadDingdanList(false); - } - }, - - onPullDownRefresh() { - const now = Date.now(); - const lastTime = this.data.lastRefreshTime; - const cooldown = this.data.refreshCooldown; - - if (now - lastTime < cooldown) { - this.setData({ scrollViewRefreshing: false }); - wx.showToast({ - title: `操作太快,请${Math.ceil((cooldown - (now - lastTime)) / 1000)}秒后再试`, - icon: 'none', - duration: 1500 - }); - return; - } - - if (this.data.isLoading) { - this.setData({ scrollViewRefreshing: false }); - return; - } - - this.setData({ - scrollViewRefreshing: true, - lastRefreshTime: now, - page: 1, - hasMore: true - }); - - if (this.data.xuanzhongLeixingId) { - this.loadDingdanList(true); - } else { - this.setData({ scrollViewRefreshing: false }); - } - } +// pages/qiangdan/qiangdan.js +const app = getApp(); +import request from '../../utils/request.js'; +import PopupService from '../../services/popupService.js'; +import { reconnectForRole } from '../../utils/role-tab-bar.js'; + +Page({ + data: { + // 1. 商品类型相关 + shangpinleixing: [], + xuanzhongLeixingId: null, + + // 2. 订单列表与分页相关 + dingdanList: [], + page: 1, + pageSize: 5, + hasMore: true, + isLoading: false, + + // 3. 全局状态字段 + dashoustatus: null, + zhuanghaoStatus: null, + dashouzhuangtai: null, + uid: null, + huiyuanList: [], + yajin: 0, + jifen: 0, + + // 4. 刷新控制字段 + scrollViewRefreshing: false, + lastRefreshTime: 0, + refreshCooldown: 2000, + isLoadingMore: false, + + // 5. 切换类型冷却 + lastSwitchTime: 0, + switchCooldown: 1500, + isSwitching: false, + + // 6. OSS地址 + ossImageUrl: app.globalData.ossImageUrl || '', + + // 🆕 7. 标签筛选相关 + bankuaiBiaoqian: [], // 当前商品类型所属板块的全部标签 + xuanzhongBiaoqianId: 0, // 0=全部 + + // 商品轮播展示(只读 globalData,无额外接口) + lunboList: [], + }, + + async onLoad(options) { + this.syncShopBannerFromGlobal(); + this.loadGlobalStatus(); + await this.loadShangpinLeixing(); + PopupService.checkAndShow(this, 'jiedan'); + }, + + onHide: function () { + const popupComp = this.selectComponent('#popupNotice'); + if (popupComp && popupComp.cleanup) { + popupComp.cleanup(); + } + }, + + onShow() { + this.syncShopBannerFromGlobal(); + this.registerNotificationComponent(); + this.loadGlobalStatus(); + if (wx.getStorageSync('uid')) { + reconnectForRole('dashou'); + if (app.startImWhenReady) app.startImWhenReady(); + this.refreshDashouProfileSilent(); + } + if (this.data.xuanzhongLeixingId) { + this.loadDingdanList(true); + } + }, + + /** 同步点单端已加载的商品轮播图,仅展示用 */ + syncShopBannerFromGlobal() { + const oss = app.globalData.ossImageUrl || ''; + const lunboList = (app.globalData.shangpinlunbo || []).map((url) => { + if (!url) return ''; + return url.startsWith('http') ? url : oss + url; + }).filter(Boolean); + this.setData({ lunboList }); + }, + + async refreshDashouProfileSilent() { + try { + const res = await request({ url: '/yonghu/dashouxinxi', method: 'POST' }); + if (!res || res.data.code != 200) return; + const data = res.data.data || {}; + const patch = { + dashouNicheng: data.dashounicheng || '', + zhanghaoStatus: data.zhanghaostatus || '', + dashouzhuangtai: data.dashouzhuangtai || '', + yajin: data.yajin || 0, + jifen: data.jifen || 0, + clumber: data.clumber || [], + }; + Object.assign(app.globalData, { + dashouNicheng: patch.dashouNicheng, + zhanghaoStatus: patch.zhanghaoStatus, + dashouzhuangtai: patch.dashouzhuangtai, + yajin: patch.yajin, + jinfen: patch.jifen, + clumber: patch.clumber, + }); + if (data.dashoustatus !== undefined) { + wx.setStorageSync('dashoustatus', data.dashoustatus); + app.globalData.dashoustatus = data.dashoustatus; + } + this.setData({ + zhuanghaoStatus: patch.zhanghaoStatus, + dashouzhuangtai: patch.dashouzhuangtai, + huiyuanList: patch.clumber, + yajin: patch.yajin, + jifen: patch.jifen, + }); + } catch (e) {} + }, + + registerNotificationComponent() { + const notificationComp = this.selectComponent('#global-notification'); + if (notificationComp && notificationComp.showNotification) { + app.globalData.globalNotification = { + show: (data) => notificationComp.showNotification(data), + hide: () => notificationComp.hideNotification() + }; + } + }, + + loadGlobalStatus() { + const globalData = app.globalData; + this.setData({ + dashoustatus: wx.getStorageSync('dashoustatus'), + zhuanghaoStatus: globalData.zhanghaoStatus, + dashouzhuangtai: globalData.dashouzhuangtai, + uid: wx.getStorageSync('uid'), + huiyuanList: globalData.clumber || [], + yajin: globalData.yajin || 0, + jifen: globalData.jinfen || 0 + }); + }, + + // 加载商品类型 + async loadShangpinLeixing() { + wx.showLoading({ title: '加载商品类型...' }); + try { + const res = await request({ + url: '/dingdan/dsqdhqddlx', + method: 'POST', + header: { 'content-type': 'application/json' } + }); + if (res.statusCode === 200 && res.data) { + const data = res.data; + let list = []; + if (data.code === 200 || data.code === 0) { + if (data.data && Array.isArray(data.data.list)) list = data.data.list; + else if (data.data && Array.isArray(data.data)) list = data.data; + else if (Array.isArray(data.list)) list = data.list; + else if (Array.isArray(data)) list = data; + } + const processedList = this.processTupianUrl(list); + this.setData({ + shangpinleixing: processedList, + xuanzhongLeixingId: processedList[0]?.id || null + }); + if (this.data.xuanzhongLeixingId) { + this.loadDingdanList(true); + // 🆕 加载板块标签 + this.loadBankuaiBiaoqian(); + } + } else { + wx.showToast({ title: res.data?.msg || '加载商品类型失败', icon: 'none' }); + } + } catch (error) { + wx.showToast({ title: '网络错误,加载失败', icon: 'none' }); + } finally { + wx.hideLoading(); + } + }, + + // 处理图片URL + processTupianUrl(list) { + const ossUrl = app.globalData.ossImageUrl || ''; + return list.map(item => ({ + ...item, + full_tupian_url: item.tupian_url && !item.tupian_url.startsWith('http') + ? ossUrl + item.tupian_url + : (item.tupian_url || '/images/default-type.png') + })); + }, + + // 🆕 加载板块标签 + async loadBankuaiBiaoqian() { + const leixingId = this.data.xuanzhongLeixingId; + if (!leixingId) return; + try { + const res = await request({ + url: '/dengji/bkqhbq', + method: 'POST', + data: { leixing_id: leixingId } + }); + if (res && res.data.code === 0) { + this.setData({ + bankuaiBiaoqian: res.data.data.biaoqian_list || [], + xuanzhongBiaoqianId: 0 + }); + } + } catch (e) { + // 标签加载失败不影响主流程 + } + }, + + // 选择商品类型 + async selectLeixing(e) { + const now = Date.now(); + const lastSwitchTime = this.data.lastSwitchTime; + const switchCooldown = this.data.switchCooldown; + + if (now - lastSwitchTime < switchCooldown) { + wx.showToast({ + title: `操作太快,请${Math.ceil((switchCooldown - (now - lastSwitchTime)) / 1000)}秒后再试`, + icon: 'none', + duration: 1500 + }); + return; + } + if (this.data.isSwitching) return; + + const leixingId = e.currentTarget.dataset.id; + if (leixingId === this.data.xuanzhongLeixingId) return; + + this.setData({ isSwitching: true, lastSwitchTime: now }); + wx.showLoading({ title: '切换中...' }); + + try { + this.setData({ + xuanzhongLeixingId: leixingId, + dingdanList: [], + page: 1, + hasMore: true, + xuanzhongBiaoqianId: 0 // 重置标签筛选 + }); + await this.loadDingdanList(true); + // 🆕 切换类型后加载新标签 + await this.loadBankuaiBiaoqian(); + } catch (error) { + console.error('切换类型失败:', error); + } finally { + this.setData({ isSwitching: false }); + wx.hideLoading(); + } + }, + + // 🆕 选择标签筛选 + async selectBiaoqian(e) { + const id = e.currentTarget.dataset.id; + if (id === this.data.xuanzhongBiaoqianId) return; + this.setData({ + xuanzhongBiaoqianId: id, + dingdanList: [], + page: 1, + hasMore: true + }); + await this.loadDingdanList(true); + }, + + // 加载订单列表 + async loadDingdanList(isRefresh = false) { + if (this.data.isLoading || !this.data.xuanzhongLeixingId) return; + + const loadPage = isRefresh ? 1 : this.data.page; + if (!isRefresh && !this.data.hasMore) return; + + this.setData({ + isLoading: true, + isLoadingMore: !isRefresh + }); + + try { + const res = await request({ + url: '/dingdan/ddhq', + method: 'POST', + data: { + leixing_id: this.data.xuanzhongLeixingId, + page: loadPage, + page_size: this.data.pageSize, + // 🆕 传递标签筛选参数(0时不传) + biaoqian_id: this.data.xuanzhongBiaoqianId || undefined + } + }); + + this.setData({ + isLoading: false, + isLoadingMore: false, + scrollViewRefreshing: false + }); + + if (res.data.code === 200 || res.data.code === 0) { + const newList = res.data.data.list || []; + const hasMore = res.data.data.has_more || false; + + // 🆕 处理每条订单,增加 hasRequiredMember 字段 + const processedList = newList.map(item => this.processDingdanItem(item)); + const updatedList = isRefresh ? processedList : [...this.data.dingdanList, ...processedList]; + updatedList.sort((a, b) => (b.creat_time || '').localeCompare(a.creat_time || '')); + + this.setData({ + dingdanList: updatedList, + page: loadPage, + hasMore: hasMore + }); + + if (isRefresh) { + this.setData({ lastRefreshTime: Date.now() }); + } + } else { + wx.showToast({ title: res.data.msg || '加载失败', icon: 'none' }); + } + } catch (error) { + console.error('加载订单失败:', error); + this.setData({ + isLoading: false, + isLoadingMore: false, + scrollViewRefreshing: false + }); + wx.showToast({ title: '网络请求失败', icon: 'none' }); + } + }, + + // 处理单条订单数据(包含标签、会员判断) + processDingdanItem(item) { + const ossUrl = app.globalData.ossImageUrl || ''; + let fullTupianUrl = ''; + + if (item.tupian) { + fullTupianUrl = !item.tupian.startsWith('http') ? ossUrl + item.tupian : item.tupian; + } else { + const leixing = this.data.shangpinleixing.find(l => l.id === item.leixing_id); + fullTupianUrl = leixing ? leixing.full_tupian_url : '/images/default-order.png'; + } + + const isZhiding = item.zhuangtai === 7; + + let zhidingAvatar = ''; + if (item.zhiding_avatar) { + zhidingAvatar = !item.zhiding_avatar.startsWith('http') + ? ossUrl + item.zhiding_avatar + : item.zhiding_avatar; + } + const zhidingNicheng = item.zhiding_nicheng || ''; + + // 🆕 判断用户是否有订单所需的会员(仅当订单要求会员类型且存在huiyuan_id) + let hasRequiredMember = true; + if (item.yaoqiuleixing == 1 && item.huiyuan_id) { + const userHasIt = this.data.huiyuanList.some(h => h.huiyuanid == item.huiyuan_id); + hasRequiredMember = userHasIt; + } + + return { + ...item, + full_tupian_url: fullTupianUrl, + isZhiding: isZhiding, + isPingtai: item.pingtai == 1, + isShangjia: item.pingtai == 2, + zhiding_avatar_full: zhidingAvatar, + zhiding_nicheng: zhidingNicheng, + // 🆕 三层标签(后端返回,直接保留) + xuqiu_biaoqian: item.xuqiu_biaoqian || [], + dashou_biaoqian: item.dashou_biaoqian || [], + shangjia_biaoqian: item.shangjia_biaoqian || [], + // 🆕 是否有查看价格的权限 + hasRequiredMember: hasRequiredMember, + }; + }, + + // 跳转到充值页面(原封不动) + goToChongzhiPage(failureType, huiyuanId = null, requiredYajin = 0) { + let url = '/pages/fighter-recharge/fighter-recharge'; + let params = {}; + + switch (failureType) { + case 'huiyuan': + params = { needScroll: '0', scrollTo: 'member' }; + break; + case 'yajin': + params = { needScroll: '1', scrollTo: 'bottom', requiredYajin: requiredYajin }; + break; + case 'jifen': + params = { needScroll: '1', scrollTo: 'bottom' }; + break; + } + + if (huiyuanId) params.huiyuanId = huiyuanId; + + const queryString = Object.keys(params) + .map(key => `${key}=${encodeURIComponent(params[key])}`) + .join('&'); + + wx.navigateTo({ + url: `${url}?${queryString}`, + fail: (err) => { + console.error('跳转失败:', err); + wx.showToast({ title: '跳转失败,请稍后重试', icon: 'none' }); + } + }); + }, + + // 抢单按钮(原封不动) + async onQiangdanTap(e) { + const dingdanItem = e.currentTarget.dataset.item; + if (!dingdanItem) return; + + // 校验1: 打手身份 + if (!this.data.dashoustatus || this.data.dashoustatus != 1) { + wx.showToast({ title: '请先开启接单员身份', icon: 'none' }); + return; + } + // 校验2: 账号状态 + if (this.data.zhuanghaoStatus != 1) { + wx.showToast({ title: '账号异常,无法接单', icon: 'none' }); + return; + } + // 校验3: 接单员接单状态 + if (this.data.dashouzhuangtai != 1) { + wx.showToast({ title: '您有订单正在接待中', icon: 'none' }); + return; + } + // 校验4: 指定订单 + if (dingdanItem.isZhiding) { + if (!this.data.uid || this.data.uid != dingdanItem.zhiding_uid) { + wx.showToast({ title: '此订单为指定单', icon: 'none' }); + return; + } + } + // 校验5: 会员要求 + if (dingdanItem.yaoqiuleixing == 1) { + const hasHuiyuan = this.data.huiyuanList.some(h => h.huiyuanid == dingdanItem.huiyuan_id); + if (!hasHuiyuan) { + wx.showToast({ + title: '未开通对应会员,无法抢单', + icon: 'none', + duration: 2000 + }); + setTimeout(() => { + this.goToChongzhiPage('huiyuan', dingdanItem.huiyuan_id); + }, 500); + return; + } + } + // 校验6: 押金要求 + if (dingdanItem.yaoqiuleixing == 2) { + if (this.data.yajin < dingdanItem.yajin) { + wx.showToast({ + title: `押金不足,需${dingdanItem.yajin}`, + icon: 'none', + duration: 2000 + }); + setTimeout(() => { + this.goToChongzhiPage('yajin', null, dingdanItem.yajin); + }, 500); + return; + } + } + // 校验7: 积分要求 + if (this.data.jifen < 5) { + wx.showToast({ + title: '积分不足,至少需要5积分', + icon: 'none', + duration: 2000 + }); + setTimeout(() => { + this.goToChongzhiPage('jifen'); + }, 500); + return; + } + + // 确认框 + const that = this; + wx.showModal({ + title: '确认抢单', + content: `确定要抢此订单吗?${dingdanItem.isZhiding ? '(指定订单)' : ''}`, + success: async function (res) { + if (res.confirm) { + wx.showLoading({ title: '抢单中...', mask: true }); + try { + const qiangdanRes = await request({ + url: '/dingdan/qiangdan', + method: 'POST', + data: { dingdan_id: dingdanItem.dingdan_id } + }); + wx.hideLoading(); + + if (qiangdanRes.data.code === 200 || qiangdanRes.data.code === 0) { + that.showQiangdanSuccessEffect(); + if (app.globalData) { + app.globalData.dashouzhuangtai = 0; + that.setData({ dashouzhuangtai: 0 }); + } + const newList = that.data.dingdanList.filter( + item => item.dingdan_id !== dingdanItem.dingdan_id + ); + that.setData({ dingdanList: newList }); + } else { + wx.showToast({ + title: qiangdanRes.data.msg || '抢单失败', + icon: 'none' + }); + } + } catch (error) { + wx.hideLoading(); + console.error('抢单请求失败:', error); + wx.showToast({ title: '网络错误,抢单失败', icon: 'none' }); + } + } + } + }); + }, + + showQiangdanSuccessEffect() { + wx.showToast({ title: '抢单成功!', icon: 'success', duration: 2000 }); + }, + + onViewDetail(e) { + const { type, content } = e.currentTarget.dataset; + wx.showModal({ + title: type === 'jieshao' ? '订单介绍' : '订单备注', + content: content, + showCancel: false, + confirmText: '知道了' + }); + }, + + onReachBottom() { + const now = Date.now(); + const lastTime = this.data.lastRefreshTime; + const cooldown = this.data.refreshCooldown; + + if (now - lastTime < cooldown) { + wx.showToast({ + title: `操作太快,请${Math.ceil((cooldown - (now - lastTime)) / 1000)}秒后再试`, + icon: 'none', + duration: 1500 + }); + return; + } + + if (this.data.isLoading || this.data.isLoadingMore) return; + + if (this.data.hasMore && !this.data.isLoading && this.data.xuanzhongLeixingId) { + this.setData({ page: this.data.page + 1 }); + this.loadDingdanList(false); + } + }, + + onPullDownRefresh() { + const now = Date.now(); + const lastTime = this.data.lastRefreshTime; + const cooldown = this.data.refreshCooldown; + + if (now - lastTime < cooldown) { + this.setData({ scrollViewRefreshing: false }); + wx.showToast({ + title: `操作太快,请${Math.ceil((cooldown - (now - lastTime)) / 1000)}秒后再试`, + icon: 'none', + duration: 1500 + }); + return; + } + + if (this.data.isLoading) { + this.setData({ scrollViewRefreshing: false }); + return; + } + + this.setData({ + scrollViewRefreshing: true, + lastRefreshTime: now, + page: 1, + hasMore: true + }); + + if (this.data.xuanzhongLeixingId) { + this.loadDingdanList(true); + } else { + this.setData({ scrollViewRefreshing: false }); + } + } }); \ No newline at end of file diff --git a/pages/accept-order/accept-order.json b/pages/accept-order/accept-order.json index eee9b81..e7e7be0 100644 --- a/pages/accept-order/accept-order.json +++ b/pages/accept-order/accept-order.json @@ -1,10 +1,10 @@ { "navigationBarTitleText": "抢单大厅", - "navigationBarBackgroundColor": "#0b0f1a", - "navigationBarTextStyle": "white", + "navigationBarBackgroundColor": "#f7dc51", + "navigationBarTextStyle": "black", "enablePullDownRefresh": false, "backgroundTextStyle": "dark", - "backgroundColor": "#0b0f1a", + "backgroundColor": "#fff8e1", "usingComponents": { "chenghao-tag": "/components/chenghao-tag/chenghao-tag", "global-notification": "/components/global-notification/global-notification" diff --git a/pages/accept-order/accept-order.wxml b/pages/accept-order/accept-order.wxml index 890d9fd..389b531 100644 --- a/pages/accept-order/accept-order.wxml +++ b/pages/accept-order/accept-order.wxml @@ -1,220 +1,393 @@ + - - - - - - - - - {{item.jieshao}} - - - - - - - - - - - 全部 - - - - - - - - - + + class="page-main-scroll" - - - - - ⚡️ 正在刷新... - ▼ 下拉刷新订单 - + scroll-y - - - - 请先选择上方订单类型 - - - - 当前类型暂无待抢订单 - + enhanced - - - - - {{item.creat_time}} - - ⚙️ 平台订单 - + show-scrollbar="{{false}}" - - - 指定 - - {{item.zhiding_nicheng || '指定接单员'}} - UID: {{item.zhiding_uid || '未知'}} - - - - - + refresher-enabled="{{xuanzhongLeixingId != null}}" - - - - 介绍: - {{item.jieshao || '暂无介绍'}} - [点击查看] - - + refresher-threshold="80" - - 备注: - {{item.beizhu}} - [点击查看] - + refresher-default-style="black" - - - 需求标签: - - - - + refresher-background="#fff8e1" - - - 💰 - 分佣 - - - {{item.dashou_fencheng || 0}} - - - - 未开通会员 - - - - ⚡ 立即抢单 - - - - - - + refresher-triggered="{{scrollViewRefreshing}}" - - - - {{item.creat_time}} - - 🏪 商家发单 - + bindrefresherrefresh="onPullDownRefresh" - - - 指定 - - {{item.zhiding_nicheng || '指定接单员'}} - UID: {{item.zhiding_uid || '未知'}} - - - - - + bindscrolltolower="onReachBottom" - - - {{item.sjnicheng || '未知商家'}} - - - - - + > - - 订单介绍: - {{item.jieshao || '暂无介绍'}} - [点击查看] - + - - 商家备注: - {{item.beizhu}} - [点击查看] - + 正在刷新... - - - 需求标签: - - - - + 下拉刷新订单 - - - 💰 - 分佣 - - - {{item.dashou_fencheng || 0}} - - - - 未开通会员 - - - - ⚡ 立即抢单 - - - - - - - - - ⚙️ 加载更多订单中... - —— 没有更多订单了 —— - - - - - - ⚡ 订单加载中... + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{item.jieshao}} + + + + + + + + + + + + + + + + + + + + + + + + 全部 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 请先选择上方订单类型 + + + + + + + + 当前类型暂无待抢订单 + + + + + + + + + + + + + + {{item.creat_time}} + + 平台订单 + + + + + + + + + + 指定 + + + + {{item.zhiding_nicheng || '指定接单员'}} + + + + + + + + + + {{item.jieshao || '暂无介绍'}} + + + + + + + + + + {{item.dashou_fencheng || 0}} + + + + + + 未开通会员 + + + + + + 备注:{{item.beizhu}} + + + + + + 需求标签 + + + + + + + + + + + + 平台派单 + + 抢单 + + + + + + + + + + + + + + + + + + {{item.creat_time}} + + 商家发单 + + + + + + + + + + 指定 + + + + {{item.zhiding_nicheng || '指定接单员'}} + + + + + + + + {{item.sjnicheng || '未知商家'}} + + + + + + + + {{item.jieshao || '暂无介绍'}} + + + + + + + + + + {{item.dashou_fencheng || 0}} + + + + + + 未开通会员 + + + + + + 商家备注:{{item.beizhu}} + + + + + + + + + + + + + + + + + + + + + + 商家派单 + + 抢单 + + + + + + + + + + + + + + 加载更多订单中... + + —— 没有更多订单了 —— + + + + + + + + + + + + + + + + 订单加载中... + + + + + - \ No newline at end of file + + + + diff --git a/pages/accept-order/accept-order.wxss b/pages/accept-order/accept-order.wxss index 52ed1a3..cecbb2b 100644 --- a/pages/accept-order/accept-order.wxss +++ b/pages/accept-order/accept-order.wxss @@ -1,4 +1,5 @@ /* pages/qiangdan/qiangdan.wxss - 高级机甲风格重构版(对称优化) */ +@import '../../styles/dashou-xym-theme.wxss'; .qiangdan-page { height: 100vh; display: flex; @@ -120,20 +121,23 @@ opacity: 0.5; } - /* ====== 3. 订单列表容器 ====== */ - .dingdan-container { + /* ====== 3. 页面主滚动(下拉刷新在顶部) ====== */ + .page-main-scroll { flex: 1; - overflow: hidden; - position: relative; - z-index: 1; - padding: 0 20rpx; /* 统一左右内边距 */ - } - - .dingdan-scroll-view { - height: 100%; + height: 0; -webkit-overflow-scrolling: touch; } - + + .scroll-bottom-spacer { + height: 24rpx; + } + + .dingdan-list { + padding: 0 20rpx; + position: relative; + z-index: 1; + } + .refresher-container { height: 100rpx; display: flex; @@ -760,3 +764,4 @@ max-width: 50%; } +@import '../../styles/dashou-xym-order-card.wxss'; diff --git a/pages/express-order/express-order.json b/pages/express-order/express-order.json index e0c0695..7682a2b 100644 --- a/pages/express-order/express-order.json +++ b/pages/express-order/express-order.json @@ -4,9 +4,9 @@ "chenghao-tag": "/components/chenghao-tag/chenghao-tag" }, "backgroundTextStyle": "dark", - "navigationBarBackgroundColor": "#0a0a0f", - "navigationBarTitleText": "极速派单", - "navigationBarTextStyle": "white", - "backgroundColor": "#0a0a0f", + "navigationBarBackgroundColor": "#fff8e1", + "navigationBarTitleText": "常规发单", + "navigationBarTextStyle": "black", + "backgroundColor": "#f5f5f5", "enablePullDownRefresh": false } \ No newline at end of file diff --git a/pages/express-order/express-order.wxml b/pages/express-order/express-order.wxml index fe89a26..64cfa0a 100644 --- a/pages/express-order/express-order.wxml +++ b/pages/express-order/express-order.wxml @@ -1,230 +1,230 @@ - - - - - 可用余额 - - {{sjyue}} - - - 生成链接将从此余额扣除 - - - - - 选择订单类型 - - - - {{item.jieshao}} - - - - - - - - - 🔍 - - - 搜索 - - - - - 金额≥ - - - - 标签 - - - {{searchLabelName || '全部'}} - - - - 清空 - - - - - - - - - - - {{item.jieshao || '无介绍'}} - - - - - - 价格: - {{item.jiage || '0.00'}}元 - - - - {{item.hasGenerated ? '获取新链接' : '生成链接'}} - - - {{item.isCopied ? '已复制' : '一键复制'}} - - - - - - - 添加模板 - 点击创建新模板 - - - ... - 没有更多模板了 - 暂无模板 - - - - - - - - × - 模板详情 - - - 订单介绍 - {{currentTemplate.jieshao || '无介绍'}} - - - 关联标签 - - - - 价格{{currentTemplate.jiage || '0.00'}}元 - | - 发布数量{{currentTemplate.fabushuliang || 0}}次 - | - 模板ID{{currentTemplate.mobanId || 'N/A'}} - - - 佣金要求 - {{currentTemplate.commissionValue}}元(建议≤50) - - - - 链接状态: - 未使用 - 已使用 - - - - - {{item.lianjie}} - {{item.is_used ? '已使用' : '未使用'}} - 复制 - - - - 获取更多链接 - - 加载中... - 暂无链接 - - - - {{currentTemplate.hasGenerated ? '获取新链接' : '生成链接'}} - {{currentTemplate.isCopied ? '已复制' : '复制链接'}} - {{isEditing ? '保存修改' : '立即修改'}} - 删除模板 - - - - - 订单介绍 -