diff --git a/app.json b/app.json
index e79f7a6..6f42352 100644
--- a/app.json
+++ b/app.json
@@ -87,7 +87,11 @@
},
{
"root": "pages/fighter-recharge",
- "pages": ["fighter-recharge"]
+ "pages": ["fighter-recharge", "fighter-deposit"]
+ },
+ {
+ "root": "pages/fighter-ledger",
+ "pages": ["fighter-ledger"]
},
{
"root": "pages/fighter-msg",
@@ -99,7 +103,7 @@
},
{
"root": "pages/withdraw",
- "pages": ["withdraw", "components/mode1/mode1", "components/mode2/mode2"]
+ "pages": ["withdraw", "withdraw-records", "components/mode1/mode1", "components/mode2/mode2"]
},
{
"root": "pages/invite-fighter",
diff --git a/components/kefu-float/kefu-float.js b/components/kefu-float/kefu-float.js
index 2395f96..3fda074 100644
--- a/components/kefu-float/kefu-float.js
+++ b/components/kefu-float/kefu-float.js
@@ -1,5 +1,18 @@
import { openCustomerServiceChat, resolveKefuIconUrl } from '../../utils/kefu-nav.js';
+const CS_HOUR_START = 8;
+const CS_HOUR_END = 23;
+
+function getCsOnlineStatus() {
+ const hour = new Date().getHours();
+ const online = hour >= CS_HOUR_START && hour < CS_HOUR_END;
+ return {
+ csOnline: online,
+ csHoursText: '8:00-23:00',
+ csStatusText: online ? '在线' : '在线时间',
+ };
+}
+
Component({
properties: {
bottom: { type: String, value: '200rpx' },
@@ -11,6 +24,9 @@ Component({
csUnread: 0,
floatY: 520,
iconUrl: '',
+ csOnline: false,
+ csHoursText: '8:00-23:00',
+ csStatusText: '在线时间',
},
lifetimes: {
@@ -27,6 +43,7 @@ Component({
app.on('configApplied', this._configHandler);
}
this.syncCsUnread();
+ this._syncOnlineStatus();
},
detached() {
const app = getApp();
@@ -47,10 +64,14 @@ Component({
this._syncIcon();
this._syncFromGlobal();
this.syncCsUnread();
+ this._syncOnlineStatus();
},
},
methods: {
+ _syncOnlineStatus() {
+ this.setData(getCsOnlineStatus());
+ },
_syncIcon() {
const url = resolveKefuIconUrl(getApp());
if (url && url !== this.data.iconUrl) {
diff --git a/components/kefu-float/kefu-float.wxml b/components/kefu-float/kefu-float.wxml
index b917873..bdc6b2d 100644
--- a/components/kefu-float/kefu-float.wxml
+++ b/components/kefu-float/kefu-float.wxml
@@ -15,7 +15,8 @@
联系客服
- 有新消息
+ 有新消息
+ {{csStatusText}} {{csHoursText}}
diff --git a/components/kefu-float/kefu-float.wxss b/components/kefu-float/kefu-float.wxss
index af0783e..6cd2c59 100644
--- a/components/kefu-float/kefu-float.wxss
+++ b/components/kefu-float/kefu-float.wxss
@@ -31,27 +31,34 @@
.kefu-float--full {
display: flex;
align-items: stretch;
- background: #fff;
- border-radius: 16rpx;
- box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
- border: 1rpx solid rgba(124, 58, 237, 0.18);
+ background: linear-gradient(135deg, #07c160 0%, #06ad56 100%);
+ border-radius: 999rpx;
+ box-shadow: 0 8rpx 28rpx rgba(7, 193, 96, 0.45);
+ border: 2rpx solid rgba(255, 255, 255, 0.85);
overflow: visible;
+ animation: kefu-pulse 2.4s ease-in-out infinite;
+}
+
+@keyframes kefu-pulse {
+ 0%, 100% { box-shadow: 0 8rpx 28rpx rgba(7, 193, 96, 0.45); }
+ 50% { box-shadow: 0 8rpx 36rpx rgba(7, 193, 96, 0.65), 0 0 0 8rpx rgba(7, 193, 96, 0.12); }
}
.kefu-unread-badge {
position: absolute;
top: -10rpx;
right: -6rpx;
- min-width: 32rpx;
- height: 32rpx;
- line-height: 32rpx;
- padding: 0 6rpx;
+ min-width: 36rpx;
+ height: 36rpx;
+ line-height: 36rpx;
+ padding: 0 8rpx;
background: #fa5151;
color: #fff;
- font-size: 18rpx;
+ font-size: 20rpx;
+ font-weight: 700;
text-align: center;
- border-radius: 16rpx;
- border: 2rpx solid #fff;
+ border-radius: 18rpx;
+ border: 3rpx solid #fff;
z-index: 2;
}
@@ -63,7 +70,7 @@
.kefu-float-main {
display: flex;
align-items: center;
- padding: 14rpx 16rpx;
+ padding: 18rpx 24rpx;
flex: 1;
}
@@ -72,11 +79,13 @@
}
.kefu-float-icon-img {
- width: 36rpx;
- height: 36rpx;
- margin-right: 10rpx;
+ width: 44rpx;
+ height: 44rpx;
+ margin-right: 12rpx;
flex-shrink: 0;
- border-radius: 8rpx;
+ border-radius: 50%;
+ background: rgba(255, 255, 255, 0.95);
+ padding: 4rpx;
}
.kefu-text-col {
@@ -86,32 +95,42 @@
}
.kefu-float-text {
- font-size: 24rpx;
- color: #333;
- font-weight: 600;
+ font-size: 28rpx;
+ color: #fff;
+ font-weight: 700;
white-space: nowrap;
}
.kefu-float-sub {
- font-size: 18rpx;
- color: #fa5151;
+ font-size: 20rpx;
+ color: rgba(255, 255, 255, 0.92);
margin-top: 2rpx;
+ font-weight: 600;
+}
+
+.kefu-float-sub--online {
+ color: #e8ffe8;
+}
+
+.kefu-float-sub--warn {
+ color: #fff3e0;
}
.kefu-float-close {
- width: 48rpx;
+ width: 52rpx;
display: flex;
align-items: center;
justify-content: center;
- background: #f5f3ff;
- color: #999;
- font-size: 32rpx;
+ background: rgba(0, 0, 0, 0.12);
+ color: rgba(255, 255, 255, 0.9);
+ font-size: 34rpx;
line-height: 1;
- border-left: 1rpx solid rgba(124, 58, 237, 0.1);
+ border-left: 1rpx solid rgba(255, 255, 255, 0.25);
+ border-radius: 0 999rpx 999rpx 0;
}
.kefu-float-close:active {
- background: #ede9fe;
+ background: rgba(0, 0, 0, 0.2);
}
.kefu-permanent-row {
@@ -133,7 +152,7 @@
.kefu-permanent-label {
font-size: 20rpx;
- color: #aaa;
+ color: #888;
}
.kefu-wrap--mini {
@@ -141,16 +160,17 @@
}
.kefu-float--mini {
- width: 72rpx;
- height: 72rpx;
+ width: 96rpx;
+ height: 96rpx;
padding: 0;
border-radius: 50%;
- background: #fff;
- box-shadow: 0 4rpx 14rpx rgba(0, 0, 0, 0.1);
- border: 1rpx solid rgba(124, 58, 237, 0.2);
+ background: linear-gradient(135deg, #07c160 0%, #06ad56 100%);
+ box-shadow: 0 8rpx 24rpx rgba(7, 193, 96, 0.45);
+ border: 3rpx solid #fff;
display: flex;
align-items: center;
justify-content: center;
+ animation: kefu-pulse 2.4s ease-in-out infinite;
}
.kefu-float--mini:active {
@@ -158,7 +178,9 @@
}
.kefu-float-mini-icon-img {
- width: 40rpx;
- height: 40rpx;
- border-radius: 8rpx;
+ width: 48rpx;
+ height: 48rpx;
+ border-radius: 50%;
+ background: rgba(255, 255, 255, 0.95);
+ padding: 4rpx;
}
diff --git a/config/club-config.js b/config/club-config.js
index 7f52960..3343581 100644
--- a/config/club-config.js
+++ b/config/club-config.js
@@ -3,9 +3,9 @@
* 星阙 = xq;星之界 = xzj;与 club 表 club_id 一致。
* 不要依赖后端猜测:前端必须明确所属 club。
*/
-export const CLUB_ID = 'xq';
+export const CLUB_ID = 'xzj';
/** 与 club 表 wx_appid 一致,登录时可传给后端反查 club */
-export const WX_APP_ID = 'wx0e4be86faac4a8d1';
+export const WX_APP_ID = 'wxdefa454152e78a03';
-export const CLUB_NAME = '星阙电竞';
+export const CLUB_NAME = '星之界电竞';
diff --git a/pages/accept-order/accept-order.js b/pages/accept-order/accept-order.js
index bf19fd3..ca6d6fd 100644
--- a/pages/accept-order/accept-order.js
+++ b/pages/accept-order/accept-order.js
@@ -443,6 +443,11 @@ Page({
if (res.data.code === 200 || res.data.code === 0) {
const newList = res.data.data.list || [];
const hasMore = res.data.data.has_more || false;
+ const serverClumber = res.data.data.clumber;
+ if (Array.isArray(serverClumber) && serverClumber.length) {
+ app.globalData.clumber = serverClumber;
+ this.setData({ huiyuanList: serverClumber });
+ }
// 🆕 处理每条订单,增加 hasRequiredMember 字段
const processedList = newList.map(item => this.processDingdanItem(item));
@@ -506,9 +511,13 @@ Page({
}
const zhidingNicheng = item.zhiding_nicheng || '';
- // 订单要求指定会员时,核对用户是否持有该会员类型
+ // 订单要求指定会员时,核对用户是否持有该会员类型(优先后端字段)
let hasRequiredMember = true;
- if (item.yaoqiuleixing == 1 && item.huiyuan_id) {
+ if (item.hasRequiredMember !== undefined) {
+ hasRequiredMember = !!item.hasRequiredMember;
+ } else if (item.has_required_member !== undefined) {
+ hasRequiredMember = !!item.has_required_member;
+ } else if (item.yaoqiuleixing == 1 && item.huiyuan_id) {
hasRequiredMember = userHasHuiyuan(this.data.huiyuanList, item.huiyuan_id);
}
@@ -549,13 +558,16 @@ Page({
switch (failureType) {
case 'huiyuan':
- params = { needScroll: '0', scrollTo: 'member' };
+ url = '/pages/fighter-recharge/fighter-recharge';
+ params = { scrollTo: 'member' };
break;
case 'yajin':
- params = { needScroll: '1', scrollTo: 'bottom', requiredYajin: requiredYajin };
+ url = '/pages/fighter-recharge/fighter-deposit';
+ params = { requiredYajin: requiredYajin };
break;
case 'jifen':
- params = { needScroll: '1', scrollTo: 'bottom' };
+ url = '/pages/fighter-recharge/fighter-recharge';
+ params = { scrollTo: 'jifen' };
break;
}
diff --git a/pages/accept-order/accept-order.json b/pages/accept-order/accept-order.json
index 217eba7..8be2c01 100644
--- a/pages/accept-order/accept-order.json
+++ b/pages/accept-order/accept-order.json
@@ -1,10 +1,11 @@
{
- "navigationBarTitleText": "抢单大厅",
- "navigationBarBackgroundColor": "#0b0f1a",
- "navigationBarTextStyle": "white",
+ "navigationBarTitleText": "抢单列表",
+ "navigationBarBackgroundColor": "#f7dc51",
+ "backgroundColorTop": "#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 6c07d9a..5dfa720 100644
--- a/pages/accept-order/accept-order.wxml
+++ b/pages/accept-order/accept-order.wxml
@@ -18,7 +18,7 @@
refresher-default-style="black"
- refresher-background="#0b0f1a"
+ refresher-background="#fff8e1"
refresher-triggered="{{scrollViewRefreshing}}"
@@ -40,7 +40,7 @@
-
+
{{gonggao}}
@@ -82,7 +82,7 @@
indicator-color="rgba(255,255,255,0.6)"
- indicator-active-color="#00c8ff"
+ indicator-active-color="#ffd061"
autoplay="{{lunboList.length > 1}}"
@@ -110,7 +110,7 @@
-
+
diff --git a/pages/accept-order/accept-order.wxss b/pages/accept-order/accept-order.wxss
index 4ea4d48..8ebdb0a 100644
--- a/pages/accept-order/accept-order.wxss
+++ b/pages/accept-order/accept-order.wxss
@@ -1,9 +1,9 @@
-/* pages/qiangdan/qiangdan.wxss - 机甲风格抢单页 */
+/* pages/qiangdan/qiangdan.wxss - 逍遥梦抢单页 */
@import '../../styles/dashou-xym-theme.wxss';
@import '../../styles/dashou-xym-order-card.wxss';
page {
- background-color: #0b0f1a;
+ background-color: #f7dc51;
}
.qiangdan-page {
@@ -33,7 +33,7 @@ page {
/* ====== 1. 商品类型区域 ====== */
.leixing-quyu {
- padding: 24rpx 0 16rpx;
+ padding: 30rpx 0 20rpx;
background: rgba(18, 22, 38, 0.9);
backdrop-filter: blur(20rpx);
border-bottom: 1rpx solid rgba(255, 255, 255, 0.05);
@@ -46,26 +46,26 @@ page {
.leixing-scroll {
width: 100%;
white-space: nowrap;
- height: 158rpx;
+ height: 180rpx;
}
.leixing-container {
display: inline-flex;
padding: 0 30rpx;
- gap: 16rpx;
+ gap: 20rpx;
}
.leixing-item {
display: inline-flex;
flex-direction: column;
align-items: center;
- width: 132rpx;
+ width: 160rpx;
position: relative;
transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.leixing-active {
- transform: translateY(-6rpx);
+ transform: translateY(-8rpx);
}
.guangyun-effect {
@@ -86,9 +86,9 @@ page {
}
.leixing-tupian {
- width: 100rpx;
- height: 100rpx;
- border-radius: 28rpx;
+ width: 120rpx;
+ height: 120rpx;
+ border-radius: 32rpx;
z-index: 1;
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.6);
transition: all 0.3s ease;
@@ -101,8 +101,8 @@ page {
}
.leixing-jieshao {
- margin-top: 12rpx;
- font-size: 22rpx;
+ margin-top: 16rpx;
+ font-size: 24rpx;
color: #b0c0e0;
max-width: 100%;
overflow: hidden;
@@ -771,7 +771,7 @@ page {
max-width: 50%;
}
- /* 被指定订单(功能样式,不影响订单卡片原 UI) */
+ /* 被指定订单(星阙功能保留,不影响星之界卡片 UI) */
.my-zhiding-banner {
margin: 16rpx 24rpx 0;
padding: 22rpx;
diff --git a/pages/express-order/express-order.json b/pages/express-order/express-order.json
index ab822a7..87bc997 100644
--- a/pages/express-order/express-order.json
+++ b/pages/express-order/express-order.json
@@ -4,7 +4,7 @@
"chenghao-tag": "/components/chenghao-tag/chenghao-tag"
},
"backgroundTextStyle": "dark",
- "navigationBarBackgroundColor": "#f5f3ff",
+ "navigationBarBackgroundColor": "#f7dc51",
"navigationBarTitleText": "常规发单",
"navigationBarTextStyle": "black",
"backgroundColor": "#f5f5f5",
diff --git a/pages/express-order/express-order.wxss b/pages/express-order/express-order.wxss
index 4616d7b..4584d49 100644
--- a/pages/express-order/express-order.wxss
+++ b/pages/express-order/express-order.wxss
@@ -290,7 +290,7 @@ page {
.filter-switch.active {
background: linear-gradient(180deg, #fae04d, #ffc0a3);
- color: #6d28d9;
+ color: #492f00;
}
.link-list {
@@ -324,7 +324,7 @@ page {
.copy-link-btn {
padding: 8rpx 20rpx;
background: linear-gradient(180deg, #fae04d, #ffc0a3);
- color: #6d28d9;
+ color: #492f00;
border-radius: 15rpx;
font-size: 22rpx;
}
@@ -339,7 +339,7 @@ page {
padding: 15rpx 40rpx;
background: linear-gradient(180deg, #fae04d, #ffc0a3);
border-radius: 30rpx;
- color: #6d28d9;
+ color: #492f00;
font-size: 26rpx;
}
@@ -374,7 +374,7 @@ page {
.copy-modal-grid-btn,
.edit-modal-grid-btn {
background: linear-gradient(180deg, #fae04d, #ffc0a3);
- color: #6d28d9;
+ color: #492f00;
}
.delete-modal-grid-btn {
@@ -485,7 +485,7 @@ page {
.confirm-add-grid-btn {
background: linear-gradient(180deg, #fae04d, #ffc0a3);
- color: #6d28d9;
+ color: #492f00;
}
.confirm-content {
@@ -539,7 +539,7 @@ page {
.confirm-new-link-grid-btn {
background: linear-gradient(180deg, #fae04d, #ffc0a3);
- color: #6d28d9;
+ color: #492f00;
}
.loading-mask {
@@ -569,7 +569,7 @@ page {
width: 90rpx;
height: 90rpx;
border: 8rpx solid #eee;
- border-top: 8rpx solid #9333ea;
+ border-top: 8rpx solid #ffd061;
border-radius: 50%;
animation: spin 1.2s linear infinite;
margin-bottom: 35rpx;
diff --git a/pages/fighter-ledger/fighter-ledger.js b/pages/fighter-ledger/fighter-ledger.js
new file mode 100644
index 0000000..a714e82
--- /dev/null
+++ b/pages/fighter-ledger/fighter-ledger.js
@@ -0,0 +1,139 @@
+import request from '../../utils/request.js';
+import { getOrderStatusText } from '../../utils/api-helper.js';
+
+const PAGE_SIZE = 15;
+
+const TYPE_CONFIG = {
+ commission: { title: '佣金记录', statuses: [3, 8] },
+ settle: { title: '结算记录', statuses: [3] },
+ withdraw: { title: '提现记录', api: 'withdraw' },
+ deduct: { title: '扣款记录', api: 'deduct' },
+};
+
+Page({
+ data: {
+ pageTitle: '交易明细',
+ type: 'commission',
+ statusBar: 20,
+ list: [],
+ page: 1,
+ hasMore: true,
+ loading: false,
+ refreshing: false,
+ },
+
+ onLoad(options) {
+ const sys = wx.getSystemInfoSync();
+ const type = (options.type || 'commission').trim();
+ const cfg = TYPE_CONFIG[type] || TYPE_CONFIG.commission;
+ this.setData({
+ type,
+ pageTitle: cfg.title,
+ statusBar: sys.statusBarHeight || 20,
+ });
+ this.loadList(true);
+ },
+
+ goBack() {
+ wx.navigateBack({ fail: () => wx.switchTab({ url: '/pages/fighter/fighter' }) });
+ },
+
+ onRefresh() {
+ this.setData({ refreshing: true });
+ this.loadList(true).finally(() => this.setData({ refreshing: false }));
+ },
+
+ onLoadMore() {
+ if (this.data.hasMore && !this.data.loading) {
+ this.loadList(false);
+ }
+ },
+
+ async loadList(refresh) {
+ const { type, loading } = this.data;
+ if (loading) return;
+ const page = refresh ? 1 : this.data.page;
+ this.setData({ loading: true });
+ try {
+ let rows = [];
+ let hasMore = false;
+ if (type === 'withdraw') {
+ const res = await request({
+ url: '/yonghu/tixianjiluhq',
+ method: 'POST',
+ data: { page, limit: PAGE_SIZE },
+ });
+ const body = res?.data;
+ if (body && (body.code === 200 || body.code === 0)) {
+ const raw = body.data?.list || [];
+ rows = raw.map((item, idx) => ({
+ id: item.id || item.jilu_id || `${page}-${idx}`,
+ title: item.beizhu || item.status_text || item.zhuangtai_text || '提现',
+ time: item.creat_time || item.create_time || item.tijiao_shijian || '',
+ amount: `-¥${item.jine || item.amount || item.tixian_jine || '0.00'}`,
+ minus: true,
+ }));
+ hasMore = raw.length >= PAGE_SIZE;
+ }
+ } else if (type === 'deduct') {
+ const res = await request({
+ url: '/yonghu/dsfklbhq',
+ method: 'POST',
+ data: { page, page_size: PAGE_SIZE, zhuangtai: 0 },
+ });
+ const body = res?.data;
+ if (body && (body.code === 200 || body.code === 0)) {
+ const raw = body.data?.list || [];
+ rows = raw.map((item, idx) => ({
+ id: item.fadan_id || item.id || `${page}-${idx}`,
+ title: item.yuanyin || item.beizhu || item.fakuan_yuanyin || '扣款',
+ time: item.creat_time || item.create_time || '',
+ amount: `-¥${item.jine || item.fakuan_jine || item.fakuanjine || '0.00'}`,
+ minus: true,
+ }));
+ hasMore = raw.length >= PAGE_SIZE;
+ }
+ } else {
+ const cfg = TYPE_CONFIG[type] || TYPE_CONFIG.commission;
+ const res = await request({
+ url: '/dingdan/dshqdingdan',
+ method: 'POST',
+ data: {
+ zhuangtai_list: cfg.statuses,
+ page,
+ page_size: PAGE_SIZE,
+ },
+ });
+ const body = res?.data;
+ if (body && (body.code === 200 || body.code === 0)) {
+ const raw = body.data?.list || [];
+ rows = raw.map((item) => {
+ const amt = item.jine || item.dashou_fencheng || '0.00';
+ const brief = (item.jieshao || '').trim();
+ const title = brief
+ ? (brief.length > 18 ? `${brief.slice(0, 18)}…` : brief)
+ : `订单 ${item.dingdan_id || ''}`;
+ return {
+ id: item.dingdan_id,
+ title,
+ time: item.wancheng_shijian || item.jiesuan_shijian || item.creat_time || getOrderStatusText(item.zhuangtai),
+ amount: `+¥${amt}`,
+ minus: false,
+ };
+ });
+ hasMore = body.data?.has_more ?? raw.length >= PAGE_SIZE;
+ }
+ }
+ const list = refresh ? rows : [...this.data.list, ...rows];
+ this.setData({
+ list,
+ page: refresh ? 2 : page + 1,
+ hasMore,
+ });
+ } catch (e) {
+ console.error('ledger load fail', e);
+ } finally {
+ this.setData({ loading: false });
+ }
+ },
+});
diff --git a/pages/fighter-ledger/fighter-ledger.json b/pages/fighter-ledger/fighter-ledger.json
new file mode 100644
index 0000000..b16ef3e
--- /dev/null
+++ b/pages/fighter-ledger/fighter-ledger.json
@@ -0,0 +1,4 @@
+{
+ "navigationStyle": "custom",
+ "usingComponents": {}
+}
diff --git a/pages/fighter-ledger/fighter-ledger.wxml b/pages/fighter-ledger/fighter-ledger.wxml
new file mode 100644
index 0000000..b7513d1
--- /dev/null
+++ b/pages/fighter-ledger/fighter-ledger.wxml
@@ -0,0 +1,20 @@
+
+
+
+ ‹
+ {{pageTitle}}
+
+
+
+ 加载中...
+ 暂无记录
+
+
+ {{item.title}}
+ {{item.time}}
+
+ {{item.amount}}
+
+ — 已加载全部 —
+
+
diff --git a/pages/fighter-ledger/fighter-ledger.wxss b/pages/fighter-ledger/fighter-ledger.wxss
new file mode 100644
index 0000000..ece738c
--- /dev/null
+++ b/pages/fighter-ledger/fighter-ledger.wxss
@@ -0,0 +1,75 @@
+@import '../../styles/xym-layout.wxss';
+
+.ledger-page {
+ min-height: 100vh;
+ background: #f5f5f5;
+ display: flex;
+ flex-direction: column;
+}
+
+.nav-bar {
+ padding: 0 24rpx 16rpx;
+}
+
+.back {
+ width: 60rpx;
+ font-size: 48rpx;
+ color: #333;
+ line-height: 1;
+}
+
+.back.placeholder {
+ visibility: hidden;
+}
+
+.nav-title {
+ font-size: 34rpx;
+ font-weight: 700;
+ color: #222;
+}
+
+.ledger-scroll {
+ flex: 1;
+ height: 0;
+ padding: 0 24rpx;
+ box-sizing: border-box;
+}
+
+.list-item {
+ background: #fff;
+ border-radius: 16rpx;
+ padding: 24rpx;
+ margin-bottom: 16rpx;
+}
+
+.row-t {
+ font-size: 28rpx;
+ color: #222;
+ font-weight: 600;
+}
+
+.row-d {
+ font-size: 24rpx;
+ color: #999;
+ margin-top: 8rpx;
+}
+
+.row-r {
+ font-size: 30rpx;
+ font-weight: 700;
+ color: #492f00;
+ flex-shrink: 0;
+ margin-left: 16rpx;
+}
+
+.row-r.minus {
+ color: #ff4c45;
+}
+
+.empty-box,
+.load-tip {
+ text-align: center;
+ color: #999;
+ font-size: 26rpx;
+ padding: 80rpx 0;
+}
diff --git a/pages/fighter-orders/fighter-orders.js b/pages/fighter-orders/fighter-orders.js
index 5d778af..9a6ca25 100644
--- a/pages/fighter-orders/fighter-orders.js
+++ b/pages/fighter-orders/fighter-orders.js
@@ -62,6 +62,17 @@ Page(createPage({
onShow() {
this.registerNotificationComponent();
+ const app = getApp();
+ const filterKey = app.globalData._fighterOrdersStatusKey;
+ if (filterKey) {
+ app.globalData._fighterOrdersStatusKey = null;
+ if (this.data.statusList.some((s) => s.key === filterKey)) {
+ this.setData({ currentStatusKey: filterKey });
+ }
+ if (this.data.xuanzhongLeixingId) {
+ this.loadCurrentStatusOrders(true);
+ }
+ }
if (wx.getStorageSync('uid')) {
reconnectForRole('dashou');
if (app.startImWhenReady) app.startImWhenReady();
diff --git a/pages/fighter-orders/fighter-orders.wxss b/pages/fighter-orders/fighter-orders.wxss
index a523181..c8bb5ed 100644
--- a/pages/fighter-orders/fighter-orders.wxss
+++ b/pages/fighter-orders/fighter-orders.wxss
@@ -346,4 +346,5 @@ page {
color: #999;
}
-@import '../../styles/dashou-xym-orders-theme.wxss';
\ No newline at end of file
+@import '../../styles/dashou-xym-orders-theme.wxss';
+@import '../../styles/dashou-xym-orders-page.wxss';
\ No newline at end of file
diff --git a/pages/fighter-rank/fighter-rank.json b/pages/fighter-rank/fighter-rank.json
index 2d19320..a432e9d 100644
--- a/pages/fighter-rank/fighter-rank.json
+++ b/pages/fighter-rank/fighter-rank.json
@@ -2,10 +2,10 @@
"usingComponents": {
"global-notification": "/components/global-notification/global-notification"
},
- "navigationBarTitleText": "排行榜",
- "navigationBarBackgroundColor": "#0d1117",
- "navigationBarTextStyle": "white",
+ "navigationBarTitleText": "总排行榜",
+ "navigationBarBackgroundColor": "#FFE566",
+ "navigationBarTextStyle": "black",
"enablePullDownRefresh": true,
- "backgroundColor": "#0d1117",
- "backgroundTextStyle": "light"
+ "backgroundColor": "#FFE566",
+ "backgroundTextStyle": "dark"
}
diff --git a/pages/fighter-rank/fighter-rank.wxml b/pages/fighter-rank/fighter-rank.wxml
index efc6fb2..ea58de9 100644
--- a/pages/fighter-rank/fighter-rank.wxml
+++ b/pages/fighter-rank/fighter-rank.wxml
@@ -1,35 +1,36 @@
-
-
-
-
- {{roleMeta.title}}
-
-
+
+
+
+
+
+
@@ -66,9 +70,6 @@
-
-
-
上拉加载更多
暂无相关消息
diff --git a/pages/messages/messages.wxss b/pages/messages/messages.wxss
index 2ab93ed..e74ba33 100644
--- a/pages/messages/messages.wxss
+++ b/pages/messages/messages.wxss
@@ -337,16 +337,25 @@
/* 客服入口 */
.kefu-entry {
- text-align: center;
- padding: 100rpx 0;
+ padding: 16rpx 24rpx 8rpx;
+ background: #fff;
}
.kefu-btn {
- width: 300rpx;
- background: #07c160;
+ width: 100%;
+ height: 88rpx;
+ line-height: 88rpx;
+ background: linear-gradient(135deg, #07c160 0%, #06ad56 100%);
color: #fff;
- border-radius: 40rpx;
- font-size: 28rpx;
+ border-radius: 44rpx;
+ font-size: 32rpx;
+ font-weight: 700;
+ box-shadow: 0 8rpx 24rpx rgba(7, 193, 96, 0.35);
+ border: none;
+}
+
+.kefu-btn::after {
+ border: none;
}
/* 操作弹窗 */
diff --git a/pages/mine/mine.wxss b/pages/mine/mine.wxss
index d08ee93..b036091 100644
--- a/pages/mine/mine.wxss
+++ b/pages/mine/mine.wxss
@@ -141,7 +141,7 @@ page {
line-height: 1.2;
}
.gradient-bg {
- background: linear-gradient(to right, rgba(147, 51, 234, 0.05), rgba(147, 51, 234, 0.15));
+ background: linear-gradient(to right, rgba(255, 208, 97, 0.05), rgba(255, 208, 97, 0.15));
}
.title-text {
font-size: 34rpx;
diff --git a/pages/order-pool/order-pool.js b/pages/order-pool/order-pool.js
index 8c6206a..f6429ed 100644
--- a/pages/order-pool/order-pool.js
+++ b/pages/order-pool/order-pool.js
@@ -308,13 +308,16 @@ Page({
let params = {};
switch (failureType) {
case 'huiyuan':
- params = { needScroll: '0', scrollTo: 'member' };
+ url = '/pages/fighter-recharge/fighter-recharge';
+ params = { scrollTo: 'member' };
break;
case 'yajin':
- params = { needScroll: '1', scrollTo: 'bottom', requiredYajin: requiredYajin };
+ url = '/pages/fighter-recharge/fighter-deposit';
+ params = { requiredYajin: requiredYajin };
break;
case 'jifen':
- params = { needScroll: '1', scrollTo: 'bottom' };
+ url = '/pages/fighter-recharge/fighter-recharge';
+ params = { scrollTo: 'jifen' };
break;
}
if (huiyuanId) params.huiyuanId = huiyuanId;
diff --git a/pages/order-pool/order-pool.wxml b/pages/order-pool/order-pool.wxml
index da15fa6..69d5832 100644
--- a/pages/order-pool/order-pool.wxml
+++ b/pages/order-pool/order-pool.wxml
@@ -25,7 +25,7 @@
class="xym-lunbo-swiper"
indicator-dots="{{lunboList.length > 1}}"
indicator-color="rgba(255,255,255,0.6)"
- indicator-active-color="#9333ea"
+ indicator-active-color="#ffd061"
autoplay="{{lunboList.length > 1}}"
interval="4000"
circular
diff --git a/pages/recharge-log/recharge-log.js b/pages/recharge-log/recharge-log.js
index a2a592d..2ad324c 100644
--- a/pages/recharge-log/recharge-log.js
+++ b/pages/recharge-log/recharge-log.js
@@ -1,288 +1,401 @@
-// 管事会员记录页面逻辑
+// 佣金记录(三合一:接单佣金 / 管事分佣 / 组长分红)
import request from '../../utils/request.js';
+import { getOrderStatusText } from '../../utils/api-helper.js';
+import { isRoleStatusActive } from '../../utils/base-page.js';
-// 每页数据条数常量 - 统一管理,方便修改
-const MEIYE_TIAOSHU = 50;
+const MEIYE_TIAOSHU_GUANSHI = 50;
+const PAGE_SIZE_DASHOU = 15;
+const PAGE_SIZE_ZUZHANG = 5;
+const REFRESH_CD = 2000;
+
+const TAB_MAP = {
+ dashou: 'dashou',
+ commission: 'dashou',
+ guanshi: 'guanshi',
+ recharge: 'guanshi',
+ zuzhang: 'zuzhang',
+ fenhong: 'zuzhang',
+};
Page({
data: {
- // 从全局变量获取的数据
- yaoqingzongshu: 0, // 邀请打手总数
- fenyongzonge: '0.00', // 分成总额
-
- // 从接口获取的数据
- chongzhiDashouShuliang: 0, // 充值打手数量
- dashouList: [], // 打手列表数据
- zongTiaoshu: 0, // 总条数
-
- // 分页相关
- dangqianYe: 1, // 当前页
- meiyouGengduo: false, // 没有更多数据
- jiazaiZhong: false, // 加载中状态
- jiazaiGengduo: false, // 加载更多状态
-
- // UI状态
- cuowuTishi: '', // 错误提示
- shuaxinKezhi: false, // 刷新按钮是否可点击
- shuaxinCd: 2000, // 刷新冷却时间(毫秒)
-
- // 常量(用于模板)
- meiyeTiaoshu: MEIYE_TIAOSHU // 每页条数
+ activeTab: 'dashou',
+ tabs: [],
+
+ isDashou: false,
+ isGuanshi: false,
+ isZuzhang: false,
+
+ // 管事分佣统计
+ yaoqingzongshu: 0,
+ fenyongzonge: '0.00',
+ chongzhiDashouShuliang: 0,
+
+ // 组长分红统计
+ fenhongZonge: '0.00',
+ yaoqingGuanshi: 0,
+ fenhongCishu: 0,
+
+ // 接单佣金列表
+ dashouCommissionList: [],
+ dashouPage: 1,
+ dashouHasMore: true,
+ dashouTotal: 0,
+
+ // 管事分佣列表
+ guanshiList: [],
+ guanshiPage: 1,
+ guanshiHasMore: false,
+ guanshiTotal: 0,
+
+ // 组长分红列表
+ zuzhangList: [],
+ zuzhangPage: 1,
+ zuzhangHasMore: true,
+ zuzhangTotal: 0,
+
+ jiazaiZhong: false,
+ jiazaiGengduo: false,
+ shuaxinKezhi: false,
+ cuowuTishi: '',
+
+ loadedTabs: {},
+ scrollTop: 0,
},
onLoad(options) {
- // 从全局变量获取管事数据
- this.huoquQuanjubianliang();
-
- // 加载第一页数据
- this.jiazaiShuju(true);
+ this._initRoles();
+ const requested = TAB_MAP[(options.tab || options.type || '').trim()] || 'dashou';
+ const tabs = this._buildTabs();
+ const activeTab = tabs.find((t) => t.key === requested)?.key || tabs[0]?.key || 'dashou';
+
+ this.setData({ tabs, activeTab }, () => {
+ if (this.data.isGuanshi) this.huoquQuanjubianliang();
+ this._loadTab(activeTab, true);
+ });
},
onShow() {
- // 页面显示时检查全局变量是否有更新
this.registerNotificationComponent();
- this.huoquQuanjubianliang();
+ if (this.data.isGuanshi) this.huoquQuanjubianliang();
},
- // 🆕 新增:注册通知组件
- registerNotificationComponent() {
- const app = getApp();
- const notificationComp = this.selectComponent('#global-notification');
-
- if (notificationComp && notificationComp.showNotification) {
- console.log('🏪 商城页面注册通知组件');
- app.globalData.globalNotification = {
- show: (data) => notificationComp.showNotification(data),
- hide: () => notificationComp.hideNotification()
- };
- }
- },
- // 获取全局变量数据
- huoquQuanjubianliang() {
+ registerNotificationComponent() {
const app = getApp();
- const guanshiData = app.globalData.guanshi;
-
+ const notificationComp = this.selectComponent('#global-notification');
+ if (notificationComp && notificationComp.showNotification) {
+ app.globalData.globalNotification = {
+ show: (data) => notificationComp.showNotification(data),
+ hide: () => notificationComp.hideNotification(),
+ };
+ }
+ },
+
+ _initRoles() {
+ const isDashou = isRoleStatusActive(wx.getStorageSync('dashoustatus'));
+ const isGuanshi = isRoleStatusActive(wx.getStorageSync('guanshistatus'));
+ const isZuzhang = isRoleStatusActive(wx.getStorageSync('zuzhangstatus'));
+ this.setData({
+ isDashou: isDashou || (!isGuanshi && !isZuzhang),
+ isGuanshi,
+ isZuzhang,
+ });
+ },
+
+ _buildTabs() {
+ const { isDashou, isGuanshi, isZuzhang } = this.data;
+ const tabs = [];
+ if (isDashou) tabs.push({ key: 'dashou', label: '接单佣金' });
+ if (isGuanshi) tabs.push({ key: 'guanshi', label: '管事分佣' });
+ if (isZuzhang) tabs.push({ key: 'zuzhang', label: '组长分红' });
+ if (!tabs.length) tabs.push({ key: 'dashou', label: '接单佣金' });
+ return tabs;
+ },
+
+ onTabTap(e) {
+ const key = e.currentTarget.dataset.key;
+ if (key === this.data.activeTab) return;
+ this.setData({ activeTab: key, cuowuTishi: '', scrollTop: 0 });
+ if (!this.data.loadedTabs[key]) {
+ this._loadTab(key, true);
+ }
+ },
+
+ huoquQuanjubianliang() {
+ const guanshiData = getApp().globalData.guanshi;
if (guanshiData) {
this.setData({
yaoqingzongshu: guanshiData.yaoqingzongshu || 0,
- fenyongzonge: guanshiData.fenyongzonge || '0.00'
+ fenyongzonge: guanshiData.fenyongzonge || '0.00',
});
}
},
- // 加载数据核心方法
- async jiazaiShuju(chushihua = false) {
- // 防止重复请求
- if (this.data.jiazaiZhong) return;
-
- // 如果是初始化加载,重置分页
- if (chushihua) {
+ _loadTab(tab, reset) {
+ if (tab === 'dashou') return this._loadDashouCommission(reset);
+ if (tab === 'guanshi') return this._loadGuanshi(reset);
+ if (tab === 'zuzhang') return this._loadZuzhang(reset);
+ return Promise.resolve();
+ },
+
+ shuaxinShuju() {
+ if (this.data.shuaxinKezhi) {
+ wx.showToast({ title: `请等待${REFRESH_CD / 1000}秒`, icon: 'none' });
+ return;
+ }
+ this.setData({ shuaxinKezhi: true, cuowuTishi: '' });
+ this._loadTab(this.data.activeTab, true).finally(() => {
+ setTimeout(() => this.setData({ shuaxinKezhi: false }), REFRESH_CD);
+ });
+ },
+
+ shanglaJiazai() {
+ const { activeTab, jiazaiGengduo, jiazaiZhong, loadedTabs } = this.data;
+ if (!loadedTabs[activeTab] || jiazaiGengduo || jiazaiZhong) return;
+
+ if (activeTab === 'dashou' && !this.data.dashouHasMore) return;
+ if (activeTab === 'guanshi' && this.data.guanshiHasMore === false) return;
+ if (activeTab === 'zuzhang' && !this.data.zuzhangHasMore) return;
+
+ this._loadTab(activeTab, false);
+ },
+
+ chongshiJiazai() {
+ this.setData({ cuowuTishi: '' });
+ this._loadTab(this.data.activeTab, true);
+ },
+
+ async _loadDashouCommission(reset) {
+ if (this.data.jiazaiZhong || this.data.jiazaiGengduo) return;
+ const page = reset ? 1 : this.data.dashouPage;
+ if (!reset && !this.data.dashouHasMore) return;
+
+ this.setData({
+ jiazaiZhong: reset,
+ jiazaiGengduo: !reset,
+ cuowuTishi: '',
+ });
+
+ try {
+ const res = await request({
+ url: '/dingdan/dshqdingdan',
+ method: 'POST',
+ data: {
+ zhuangtai_list: [3, 8],
+ page,
+ page_size: PAGE_SIZE_DASHOU,
+ },
+ });
+ const body = res?.data;
+ if (body && (body.code === 200 || body.code === 0)) {
+ const raw = body.data?.list || [];
+ const rows = raw.map((item) => {
+ const amt = item.jine || item.dashou_fencheng || '0.00';
+ const brief = (item.jieshao || '').trim();
+ const title = brief
+ ? (brief.length > 18 ? `${brief.slice(0, 18)}…` : brief)
+ : `订单 ${item.dingdan_id || ''}`;
+ return {
+ id: item.dingdan_id,
+ title,
+ time: item.wancheng_shijian || item.jiesuan_shijian || item.creat_time || getOrderStatusText(item.zhuangtai),
+ amount: parseFloat(amt || 0).toFixed(2),
+ };
+ });
+ const list = reset ? rows : [...this.data.dashouCommissionList, ...rows];
+ const hasMore = body.data?.has_more ?? raw.length >= PAGE_SIZE_DASHOU;
+ const loadedTabs = { ...this.data.loadedTabs, dashou: true };
+ this.setData({
+ dashouCommissionList: list,
+ dashouPage: reset ? 2 : page + 1,
+ dashouHasMore: hasMore,
+ dashouTotal: body.data?.total || list.length,
+ loadedTabs,
+ });
+ } else {
+ this.setData({ cuowuTishi: body?.msg || '数据加载失败' });
+ }
+ } catch (e) {
+ console.error('接单佣金加载失败', e);
+ this.setData({ cuowuTishi: '网络错误,请检查网络连接' });
+ } finally {
+ this.setData({ jiazaiZhong: false, jiazaiGengduo: false });
+ }
+ },
+
+ async _loadGuanshi(reset) {
+ if (this.data.jiazaiZhong || this.data.jiazaiGengduo) return;
+
+ if (reset) {
this.setData({
- dangqianYe: 1,
- meiyouGengduo: false,
- dashouList: [],
- zongTiaoshu: 0,
- chongzhiDashouShuliang: 0
+ guanshiPage: 1,
+ guanshiHasMore: false,
+ guanshiList: [],
+ guanshiTotal: 0,
+ chongzhiDashouShuliang: 0,
});
} else {
- // 上拉加载更多时,检查是否还有更多数据
- if (this.data.meiyouGengduo) return;
-
- // 如果有数据但不足一页,说明后端已经没数据了
- if (this.data.dashouList.length > 0 && this.data.dashouList.length < MEIYE_TIAOSHU) {
- this.setData({ meiyouGengduo: true });
+ if (this.data.guanshiList.length > 0 && this.data.guanshiList.length < MEIYE_TIAOSHU_GUANSHI) {
+ this.setData({ guanshiHasMore: false });
return;
}
-
- // 如果数据量已经达到总条数,则不请求
- if (this.data.dashouList.length >= this.data.zongTiaoshu && this.data.zongTiaoshu > 0) {
- this.setData({ meiyouGengduo: true });
+ if (this.data.guanshiList.length >= this.data.guanshiTotal && this.data.guanshiTotal > 0) {
+ this.setData({ guanshiHasMore: false });
return;
}
}
-
- // 设置加载状态
+
+ const dangqianYe = reset ? 1 : this.data.guanshiPage;
this.setData({
- jiazaiZhong: chushihua ? true : false,
- jiazaiGengduo: !chushihua ? true : false,
- cuowuTishi: ''
+ jiazaiZhong: reset,
+ jiazaiGengduo: !reset,
+ cuowuTishi: '',
});
-
+
try {
- const { dangqianYe } = this.data;
-
- // 严格按照您的request规范调用
const res = await request({
url: '/shangpin/fenhonghq',
method: 'POST',
- data: {
- page: dangqianYe,
- page_size: MEIYE_TIAOSHU // 使用统一常量
- }
+ data: { page: dangqianYe, page_size: MEIYE_TIAOSHU_GUANSHI },
});
-
- // 处理返回数据
+
if (res.data.code === 200) {
const data = res.data.data || {};
- const newList = data.list || [];
- const total = data.total || 0;
-
- // 处理头像URL拼接
- const processedList = this.chuliTouxiangURL(newList);
-
- // 计算是否有更多数据
- const hasMoreData = processedList.length === MEIYE_TIAOSHU;
-
- // 更新数据
+ const newList = this.chuliTouxiangURL(data.list || []);
+ const hasMore = newList.length === MEIYE_TIAOSHU_GUANSHI;
+ const loadedTabs = { ...this.data.loadedTabs, guanshi: true };
this.setData({
- dashouList: chushihua ? processedList : [...this.data.dashouList, ...processedList],
- zongTiaoshu: total,
+ guanshiList: reset ? newList : [...this.data.guanshiList, ...newList],
+ guanshiTotal: data.total || 0,
chongzhiDashouShuliang: data.chongzhi_dashou_shuliang || 0,
- meiyouGengduo: !hasMoreData,
- dangqianYe: chushihua ? 2 : this.data.dangqianYe + 1
+ guanshiHasMore: hasMore,
+ guanshiPage: reset ? 2 : dangqianYe + 1,
+ loadedTabs,
});
-
- // 如果数据为空,显示空状态
- if (chushihua && processedList.length === 0) {
- wx.showToast({
- title: '暂无数据',
- icon: 'none',
- duration: 1500
- });
- }
-
- // 如果加载了数据,给个提示
- if (processedList.length > 0) {
- if (chushihua) {
- wx.showToast({
- title: `已加载${processedList.length}条记录`,
- icon: 'success',
- duration: 1000
- });
- }
- }
} else {
- this.setData({
- cuowuTishi: res.data.msg || '数据加载失败'
- });
- wx.showToast({
- title: res.data.msg || '加载失败',
- icon: 'none',
- duration: 2000
- });
+ this.setData({ cuowuTishi: res.data.msg || '数据加载失败' });
}
- } catch (error) {
- console.error('加载数据失败:', error);
- this.setData({
- cuowuTishi: '网络错误,请检查网络连接'
- });
- wx.showToast({
- title: '网络错误',
- icon: 'none',
- duration: 2000
- });
+ } catch (e) {
+ console.error('管事分佣加载失败', e);
+ this.setData({ cuowuTishi: '网络错误,请检查网络连接' });
} finally {
- this.setData({
- jiazaiZhong: false,
- jiazaiGengduo: false
- });
+ this.setData({ jiazaiZhong: false, jiazaiGengduo: false });
+ }
+ },
+
+ async _loadZuzhang(reset) {
+ if (this.data.jiazaiZhong || this.data.jiazaiGengduo) return;
+ const page = reset ? 1 : this.data.zuzhangPage;
+ if (!reset && !this.data.zuzhangHasMore) return;
+
+ this.setData({
+ jiazaiZhong: reset,
+ jiazaiGengduo: !reset,
+ cuowuTishi: '',
+ });
+
+ try {
+ const res = await request({
+ url: '/shangpin/zuzhangfenhong',
+ method: 'POST',
+ data: { page, page_size: PAGE_SIZE_ZUZHANG },
+ });
+
+ if (res.data.code === 200) {
+ const data = res.data.data || {};
+ const processedList = this.processZuzhangList(data.list || []);
+ const loadedTabs = { ...this.data.loadedTabs, zuzhang: true };
+ if (reset) {
+ this.setData({
+ fenhongZonge: data.fenhong_zonge || '0.00',
+ yaoqingGuanshi: data.yaoqing_guanshi || 0,
+ fenhongCishu: data.fenhong_cishu || 0,
+ zuzhangList: processedList,
+ zuzhangTotal: data.total || 0,
+ zuzhangPage: 2,
+ zuzhangHasMore: processedList.length === PAGE_SIZE_ZUZHANG,
+ loadedTabs,
+ });
+ } else {
+ const newList = [...this.data.zuzhangList, ...processedList];
+ this.setData({
+ zuzhangList: newList,
+ zuzhangPage: page + 1,
+ zuzhangHasMore: processedList.length === PAGE_SIZE_ZUZHANG,
+ loadedTabs,
+ });
+ }
+ } else {
+ this.setData({ cuowuTishi: res.data.msg || '数据加载失败' });
+ }
+ } catch (e) {
+ console.error('组长分红加载失败', e);
+ this.setData({ cuowuTishi: '网络错误,请检查网络连接' });
+ } finally {
+ this.setData({ jiazaiZhong: false, jiazaiGengduo: false });
}
},
- // 处理头像URL拼接
chuliTouxiangURL(list) {
const app = getApp();
const ossUrl = app.globalData.ossImageUrl || '';
-
- return list.map(item => {
- // 确保有头像URL,如果没有则使用默认头像
+ return list.map((item) => {
let touxiangUrl = item.avatar || '';
if (touxiangUrl && !touxiangUrl.startsWith('http')) {
touxiangUrl = ossUrl + touxiangUrl;
}
-
- // 格式化时间
let shijian = item.create_time || '';
if (shijian) {
- // 如果是时间戳,转换为日期格式
if (/^\d+$/.test(shijian)) {
- const date = new Date(parseInt(shijian));
- shijian = `${date.getMonth() + 1}月${date.getDate()}日 ${date.getHours().toString().padStart(2, '0')}:${date.getMinutes().toString().padStart(2, '0')}`;
+ const date = new Date(parseInt(shijian, 10));
+ shijian = `${date.getMonth() + 1}月${date.getDate()}日 ${String(date.getHours()).padStart(2, '0')}:${String(date.getMinutes()).padStart(2, '0')}`;
} else {
- // 如果是字符串,提取日期和时间
try {
const dateObj = new Date(shijian);
- shijian = `${dateObj.getMonth() + 1}月${dateObj.getDate()}日 ${dateObj.getHours().toString().padStart(2, '0')}:${dateObj.getMinutes().toString().padStart(2, '0')}`;
- } catch (e) {
+ shijian = `${dateObj.getMonth() + 1}月${dateObj.getDate()}日 ${String(dateObj.getHours()).padStart(2, '0')}:${String(dateObj.getMinutes()).padStart(2, '0')}`;
+ } catch (err) {
shijian = shijian.substring(0, 10);
}
}
}
-
return {
...item,
touxiangUrl: touxiangUrl || '/images/default-avatar.png',
- shijian: shijian,
- fenhong: parseFloat(item.fenhong || 0).toFixed(2)
+ shijian,
+ fenhong: parseFloat(item.fenhong || 0).toFixed(2),
};
});
},
- // 刷新数据(带防重复点击)
- shuaxinShuju() {
- // 检查是否在冷却中
- if (this.data.shuaxinKezhi) {
- wx.showToast({
- title: `请等待${this.data.shuaxinCd/1000}秒`,
- icon: 'none',
- duration: 1000
- });
- return;
- }
-
- // 设置冷却状态
- this.setData({ shuaxinKezhi: true });
-
- // 显示刷新动画
- this.setData({
- jiazaiZhong: true
- });
-
- // 刷新数据
- this.jiazaiShuju(true).finally(() => {
- // 2秒后恢复按钮可点击
- setTimeout(() => {
- this.setData({ shuaxinKezhi: false });
- }, this.data.shuaxinCd);
- });
+ processZuzhangList(list) {
+ const app = getApp();
+ const ossUrl = app.globalData.ossImageUrl || '';
+ const defaultAvatar = ossUrl + (app.globalData.morentouxiang || 'avatar/default.jpg');
+ return list.map((item) => ({
+ dashouAvatar: this.getFullUrl(item.dashou_avatar, ossUrl, defaultAvatar),
+ dashouNicheng: item.dashou_nicheng || '接单员',
+ dashouYonghuid: item.dashou_yonghuid || '',
+ guanshiAvatar: this.getFullUrl(item.guanshi_avatar, ossUrl, defaultAvatar),
+ guanshiNicheng: item.guanshi_nicheng || '管事',
+ guanshiYonghuid: item.guanshi_yonghuid || '',
+ fenhong: parseFloat(item.fenhong || 0).toFixed(2),
+ shijian: this.formatTime(item.create_time),
+ }));
},
- // 上拉加载更多
- shanglaJiazai() {
- // 没有更多数据时不再请求
- if (this.data.meiyouGengduo) {
- wx.showToast({
- title: '已经到底了',
- icon: 'none',
- duration: 1000
- });
- return;
- }
-
- // 如果正在加载,不再请求
- if (this.data.jiazaiGengduo || this.data.jiazaiZhong) {
- return;
- }
-
- this.jiazaiShuju(false);
+ getFullUrl(relativePath, ossUrl, defaultUrl) {
+ if (!relativePath) return defaultUrl;
+ if (relativePath.startsWith('http')) return relativePath;
+ return ossUrl + (relativePath.startsWith('/') ? relativePath : `/${relativePath}`) || defaultUrl;
},
- // 重试加载
- chongshiJiazai() {
- this.setData({
- cuowuTishi: '',
- meiyouGengduo: false
- });
- this.jiazaiShuju(true);
- }
-});
\ No newline at end of file
+ formatTime(timestamp) {
+ if (!timestamp) return '';
+ try {
+ const date = new Date(timestamp);
+ return `${date.getMonth() + 1}月${date.getDate()}日 ${String(date.getHours()).padStart(2, '0')}:${String(date.getMinutes()).padStart(2, '0')}`;
+ } catch (e) {
+ return String(timestamp).substring(0, 10) || '';
+ }
+ },
+});
diff --git a/pages/recharge-log/recharge-log.json b/pages/recharge-log/recharge-log.json
index ea59dc7..15af151 100644
--- a/pages/recharge-log/recharge-log.json
+++ b/pages/recharge-log/recharge-log.json
@@ -1,11 +1,11 @@
{
- "usingComponents": {
- "global-notification": "/components/global-notification/global-notification"
- },
- "navigationBarTitleText": "会员记录",
- "navigationBarBackgroundColor": "#0a0a0f",
- "navigationBarTextStyle": "white",
- "backgroundColor": "#0a0a0f",
- "backgroundTextStyle": "light",
- "enablePullDownRefresh": false
- }
\ No newline at end of file
+ "usingComponents": {
+ "global-notification": "/components/global-notification/global-notification"
+ },
+ "navigationBarTitleText": "佣金记录",
+ "navigationBarBackgroundColor": "#f7dc51",
+ "navigationBarTextStyle": "black",
+ "backgroundColor": "#fff8e1",
+ "backgroundTextStyle": "dark",
+ "enablePullDownRefresh": false
+}
diff --git a/pages/recharge-log/recharge-log.wxml b/pages/recharge-log/recharge-log.wxml
index 9131036..fddc37d 100644
--- a/pages/recharge-log/recharge-log.wxml
+++ b/pages/recharge-log/recharge-log.wxml
@@ -1,119 +1,191 @@
-
+
-
-
-
-
-
- 分红总额
- ¥{{fenyongzonge}}
- 累计收益
-
+
+
+ {{item.label}}
+
-
-
-
- {{yaoqingzongshu}}
- 邀请接单员
+
+
+
+ 分红总额
+ ¥{{fenyongzonge}}
+ 累计管事分佣收益
+
+
+
+ {{yaoqingzongshu}}
+ 邀请接单员
-
-
-
-
- {{chongzhiDashouShuliang}}
- 充值接单员
+
+
+ {{chongzhiDashouShuliang}}
+ 充值接单员
-
-
- ↻
+
+
+
+
+ 分红总额
+ ¥{{fenhongZonge}}
+
+
+
+ 邀请管事
+ {{yaoqingGuanshi}}
+
+
+
+ 分红次数
+ {{fenhongCishu}}
+
+
+
+
+
+
+ 接单佣金明细
+ 已完成 / 已结算订单的分佣记录
+
+
+
+ ↻
-
-
-
-
-
-
- 加载中...
+ scroll-top="{{scrollTop}}"
+ bindscrolltolower="shanglaJiazai"
+ >
+
+
+
+ 加载中...
-
-
-
- 🚀
- 暂无会员记录
- 快去邀请接单员吧
- 点击刷新
+
+
+ 加载中...
+
+
+
+ 加载中...
-
-
-
-
- 充值记录
- ({{dashouList.length}}/{{zongTiaoshu}})
+
+
+
+ 📋
+ 暂无佣金记录
+ 完成订单后将在此展示
+ 刷新
-
-
-
-
-
-
-
-
-
-
-
+
+
+ 佣金明细
+ {{dashouCommissionList.length}}条
+
+
+
+
+ {{item.title}}
+ {{item.time}}
+ +¥{{item.amount}}
+
+
+
+
+
+
-
-
- {{item.nicheng}}
- ID: {{item.yonghuid}}
+
+
+
+ 🚀
+ 暂无分佣记录
+ 邀请接单员充值后将获得分佣
+ 刷新
+
+
+
+ 分佣明细
+ {{guanshiList.length}}/{{guanshiTotal}}
+
+
+
+
+
+ {{item.nicheng}}
+ ID: {{item.yonghuid}} · {{item.shijian}}
-
-
-
-
- +
- ¥{{item.fenhong}}
-
- {{item.shijian}}
+
+ +¥{{item.fenhong}}
-
-
-
-
-
-
- 加载更多中...
-
-
-
-
- ✓
- 已经到底了,共{{dashouList.length}}条记录
+
+
+
+
+
+
+
+
+
+ 📭
+ 暂无分红记录
+ 邀请管事并让接单员充值即可获得分红
+ 刷新
+
+
+ 分红明细
+ {{zuzhangList.length}}/{{zuzhangTotal}}
+
+
+
+
+
+
+ {{item.dashouNicheng}}
+ ID: {{item.dashouYonghuid}}
+
+
+
+ 所属管事
+ →
+
+
+
+
+ {{item.guanshiNicheng}}
+ +¥{{item.fenhong}}
+ {{item.shijian}}
+
+
+
+
+
+
+
-
-
- ⚠️
- {{cuowuTishi}}
- 重试加载
+
+ {{cuowuTishi}}
+ 重试
diff --git a/pages/recharge-log/recharge-log.wxss b/pages/recharge-log/recharge-log.wxss
index e239ef6..e3b8a5f 100644
--- a/pages/recharge-log/recharge-log.wxss
+++ b/pages/recharge-log/recharge-log.wxss
@@ -1,506 +1,420 @@
-/* 管事会员记录页面样式 - 赛博风格 */
-
-/* 页面容器 */
+/* 佣金记录 - 逍遥梦黄色风格 */
page {
- height: 100%;
- background: #0a0a0f;
- }
-
- .page-container {
- height: 100%;
- background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%);
- position: relative;
- }
-
- /* 固定顶部区域 */
- .fixed-top {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- z-index: 100;
- background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 100%);
- padding-bottom: 20rpx;
- box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.3);
- }
-
- /* 顶部统计区域 - 赛博卡片设计 */
- .tongji-quyu {
- position: relative;
- margin: 20rpx 30rpx 0;
- padding: 40rpx 30rpx;
- background: rgba(20, 20, 35, 0.9);
- border-radius: 24rpx;
- border: 1px solid rgba(100, 255, 255, 0.1);
- box-shadow:
- 0 10rpx 30rpx rgba(0, 0, 0, 0.4),
- 0 0 20rpx rgba(100, 255, 255, 0.05) inset,
- 0 0 0 1px rgba(100, 255, 255, 0.1);
- backdrop-filter: blur(10px);
- overflow: hidden;
- }
-
- .tongji-bg {
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background:
- linear-gradient(45deg,
- rgba(100, 255, 255, 0.03) 0%,
- rgba(255, 100, 255, 0.03) 100%);
- z-index: 0;
- }
-
- /* 分红总额样式 - 赛博霓虹效果 */
- .fenyong-zonge {
- position: relative;
- text-align: center;
- padding: 20rpx 0 30rpx;
- margin-bottom: 25rpx;
- border-bottom: 1px solid rgba(100, 255, 255, 0.1);
- z-index: 1;
- }
-
- .zonge-label {
- font-size: 26rpx;
- color: rgba(255, 255, 255, 0.7);
- margin-bottom: 15rpx;
- text-transform: uppercase;
- letter-spacing: 2rpx;
- }
-
- .zonge-value {
- font-size: 60rpx;
- font-weight: 800;
- color: #00ffea;
- margin-bottom: 8rpx;
- text-shadow:
- 0 0 10rpx rgba(0, 255, 234, 0.5),
- 0 0 20rpx rgba(0, 255, 234, 0.3);
- font-family: 'Arial', sans-serif;
- }
-
- .zonge-tip {
- font-size: 22rpx;
- color: rgba(255, 255, 255, 0.5);
- }
-
- /* 底部统计信息 */
- .tongji-bottom {
- display: flex;
- justify-content: space-around;
- align-items: center;
- z-index: 1;
- position: relative;
- }
-
- .tongji-item {
- text-align: center;
- flex: 1;
- }
-
- .tongji-number {
- font-size: 40rpx;
- font-weight: 700;
- color: #ffffff;
- margin-bottom: 6rpx;
- text-shadow: 0 0 10rpx rgba(255, 255, 255, 0.3);
- }
-
- .tongji-label {
- font-size: 24rpx;
- color: rgba(255, 255, 255, 0.6);
- }
-
- .tongji-divider {
- width: 1px;
- height: 45rpx;
- background: linear-gradient(to bottom,
- transparent 0%,
- rgba(100, 255, 255, 0.3) 50%,
- transparent 100%);
- }
-
- /* 刷新按钮 - 固定在右上角 */
- .shuaxin-anniu {
- position: absolute;
- top: 60rpx;
- right: 60rpx;
- z-index: 200;
- display: flex;
- align-items: center;
- justify-content: center;
- width: 70rpx;
- height: 70rpx;
- background: rgba(20, 20, 35, 0.95);
- border-radius: 50%;
- border: 1px solid rgba(100, 255, 255, 0.2);
- box-shadow:
- 0 8rpx 20rpx rgba(0, 0, 0, 0.4),
- 0 0 20rpx rgba(100, 255, 255, 0.1);
- backdrop-filter: blur(10px);
- transition: all 0.3s ease;
- }
-
- .shuaxin-anniu:active {
- transform: scale(0.95);
- background: rgba(100, 255, 255, 0.1);
- box-shadow:
- 0 4rpx 10rpx rgba(0, 0, 0, 0.3),
- 0 0 30rpx rgba(100, 255, 255, 0.2);
- }
-
- .shuaxin-icon {
- font-size: 32rpx;
- color: #00ffea;
- transition: all 0.3s ease;
- }
-
- .shuaxin-disabled {
- color: rgba(255, 255, 255, 0.3);
- animation: rotate 1s linear infinite;
- }
-
- @keyframes rotate {
- from { transform: rotate(0deg); }
- to { transform: rotate(360deg); }
- }
-
- /* 滚动区域 - 只包裹列表部分 */
- .scroll-area {
- position: fixed;
- top: 340rpx; /* 根据固定区域高度调整 */
- left: 0;
- right: 0;
- bottom: 0;
- z-index: 50;
- }
-
- /* 全局加载状态 */
- .jiazai-quanju {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- padding: 120rpx 0;
- }
-
- .jiazai-spinner {
- width: 80rpx;
- height: 80rpx;
- border: 4rpx solid rgba(100, 255, 255, 0.1);
- border-top: 4rpx solid #00ffea;
- border-radius: 50%;
- animation: spin 1s linear infinite;
- margin-bottom: 30rpx;
- box-shadow: 0 0 20rpx rgba(0, 255, 234, 0.3);
- }
-
- @keyframes spin {
- 0% { transform: rotate(0deg); }
- 100% { transform: rotate(360deg); }
- }
-
- .jiazai-text {
- font-size: 28rpx;
- color: rgba(255, 255, 255, 0.7);
- }
-
- /* 空数据提示 */
- .kong-shuju {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- padding: 120rpx 30rpx;
- background: rgba(20, 20, 35, 0.5);
- border-radius: 24rpx;
- border: 1px solid rgba(100, 255, 255, 0.1);
- margin: 40rpx 30rpx 0;
- }
-
- .kong-icon {
- font-size: 100rpx;
- margin-bottom: 30rpx;
- color: rgba(255, 255, 255, 0.2);
- }
-
- .kong-text {
- font-size: 32rpx;
- color: rgba(255, 255, 255, 0.8);
- margin-bottom: 10rpx;
- font-weight: 500;
- }
-
- .kong-tip {
- font-size: 26rpx;
- color: rgba(255, 255, 255, 0.5);
- margin-bottom: 50rpx;
- }
-
- .kong-btn {
- padding: 20rpx 50rpx;
- background: linear-gradient(90deg, #00ffea 0%, #0088ff 100%);
- color: #000;
- border-radius: 50rpx;
- font-size: 28rpx;
- font-weight: 600;
- box-shadow: 0 8rpx 20rpx rgba(0, 255, 234, 0.3);
- }
-
- .kong-btn:active {
- transform: scale(0.95);
- box-shadow: 0 4rpx 10rpx rgba(0, 255, 234, 0.2);
- }
-
- /* 列表标题 */
- .list-title {
- margin: 0 30rpx 20rpx;
- display: flex;
- align-items: baseline;
- }
-
- .title-text {
- font-size: 32rpx;
- color: #ffffff;
- font-weight: 600;
- margin-right: 10rpx;
- text-shadow: 0 0 10rpx rgba(255, 255, 255, 0.2);
- }
-
- .title-count {
- font-size: 24rpx;
- color: rgba(255, 255, 255, 0.5);
- }
-
- /* 卡片列表 */
- .card-list {
- margin: 0 30rpx;
- }
-
- /* 打手卡片 - 赛博风格设计 */
- .dashou-card {
- position: relative;
- display: flex;
- align-items: center;
- padding: 30rpx;
- margin-bottom: 20rpx;
- background: rgba(20, 20, 35, 0.7);
- border-radius: 20rpx;
- border: 1px solid rgba(100, 255, 255, 0.1);
- box-shadow:
- 0 8rpx 24rpx rgba(0, 0, 0, 0.3),
- 0 0 0 1px rgba(100, 255, 255, 0.05);
- transition: all 0.3s ease;
- }
-
- .dashou-card:active {
- transform: translateY(-2rpx);
- background: rgba(30, 30, 50, 0.8);
- box-shadow:
- 0 12rpx 30rpx rgba(0, 0, 0, 0.4),
- 0 0 20rpx rgba(100, 255, 255, 0.1);
- }
-
- /* 头像区域 - 纯圆形 */
- .touxiang-quyu {
- position: relative;
- margin-right: 30rpx;
- flex-shrink: 0;
- }
-
- .dashou-touxiang {
- width: 100rpx;
- height: 100rpx;
- border-radius: 50%; /* 确保是纯圆形 */
- z-index: 2;
- position: relative;
- }
-
- .touxiang-border {
- position: absolute;
- top: -4rpx;
- left: -4rpx;
- width: 108rpx;
- height: 108rpx;
- border-radius: 50%;
- background: linear-gradient(45deg, #00ffea, #ff00ff);
- z-index: 1;
- opacity: 0.3;
- animation: borderGlow 2s linear infinite;
- }
-
- @keyframes borderGlow {
- 0%, 100% { opacity: 0.3; }
- 50% { opacity: 0.6; }
- }
-
- /* 信息区域 */
- .xinxi-quyu {
- flex: 1;
- min-width: 0; /* 防止内容撑开 */
- }
-
- .nicheng {
- font-size: 32rpx;
- font-weight: 600;
- color: #ffffff;
- margin-bottom: 10rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- text-shadow: 0 0 10rpx rgba(255, 255, 255, 0.2);
- }
-
- .dashou-id {
- font-size: 24rpx;
- color: rgba(255, 255, 255, 0.5);
- letter-spacing: 1rpx;
- }
-
- /* 分红金额区域 */
- .fenhong-quyu {
- text-align: right;
- flex-shrink: 0;
- min-width: 180rpx;
- }
-
- .fenhong-value {
- margin-bottom: 8rpx;
- }
-
- .fenhong-jiahao {
- font-size: 26rpx;
- color: #00ff00;
- margin-right: 4rpx;
- }
-
- .fenhong-shuzi {
- font-size: 32rpx;
- font-weight: 700;
- color: #00ff00;
- text-shadow: 0 0 10rpx rgba(0, 255, 0, 0.5);
- }
-
- .shijian {
- font-size: 22rpx;
- color: rgba(255, 255, 255, 0.4);
- }
-
- /* 加载更多提示 */
- .jiazai-gengduo {
- display: flex;
- flex-direction: column;
- align-items: center;
- padding: 40rpx 0 60rpx;
- margin: 0 30rpx;
- }
-
- .gengduo-spinner {
- width: 40rpx;
- height: 40rpx;
- border: 3rpx solid rgba(100, 255, 255, 0.1);
- border-top: 3rpx solid #00ffea;
- border-radius: 50%;
- animation: spin 1s linear infinite;
- margin-bottom: 20rpx;
- }
-
- .gengduo-text {
- font-size: 26rpx;
- color: rgba(255, 255, 255, 0.6);
- }
-
- /* 没有更多数据 */
- .meiyou-gengduo {
- display: flex;
- flex-direction: column;
- align-items: center;
- padding: 50rpx 0 80rpx;
- margin: 0 30rpx;
- color: rgba(255, 255, 255, 0.4);
- }
-
- .meiyou-icon {
- width: 60rpx;
- height: 60rpx;
- border-radius: 50%;
- background: rgba(0, 255, 234, 0.1);
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 32rpx;
- color: #00ffea;
- margin-bottom: 20rpx;
- border: 1px solid rgba(0, 255, 234, 0.2);
- }
-
- .meiyou-text {
- font-size: 26rpx;
- text-align: center;
- }
-
- /* 错误提示 */
- .cuowu-quyu {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- padding: 100rpx 30rpx;
- background: rgba(40, 20, 20, 0.8);
- border-radius: 24rpx;
- border: 1px solid rgba(255, 100, 100, 0.2);
- margin: 40rpx 30rpx 0;
- }
-
- .cuowu-icon {
- font-size: 80rpx;
- color: #ff5555;
- margin-bottom: 30rpx;
- text-shadow: 0 0 20rpx rgba(255, 85, 85, 0.5);
- }
-
- .cuowu-text {
- font-size: 30rpx;
- color: rgba(255, 255, 255, 0.9);
- margin-bottom: 40rpx;
- text-align: center;
- line-height: 1.5;
- }
-
- .cuowu-btn {
- padding: 20rpx 50rpx;
- background: linear-gradient(90deg, #ff5555 0%, #ff8800 100%);
- color: #fff;
- border-radius: 50rpx;
- font-size: 28rpx;
- font-weight: 600;
- box-shadow: 0 8rpx 20rpx rgba(255, 85, 85, 0.3);
- }
-
- .cuowu-btn:active {
- transform: scale(0.95);
- box-shadow: 0 4rpx 10rpx rgba(255, 85, 85, 0.2);
- }
+ height: 100%;
+ background: #fff8e1;
+}
+.page-container {
+ height: 100%;
+ background: linear-gradient(180deg, #f7dc51 0%, #fff 18%, #fff8e1 100%);
+ position: relative;
+}
+.fixed-top {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ z-index: 100;
+ padding: 16rpx 24rpx 20rpx;
+ background: linear-gradient(180deg, #f7dc51 0%, #ffd061 85%, #fff8e1 100%);
+ box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.06);
+}
+.tab-bar {
+ display: flex;
+ background: rgba(255, 255, 255, 0.75);
+ border-radius: 999rpx;
+ padding: 6rpx;
+ margin-bottom: 20rpx;
+}
+
+.tab-item {
+ flex: 1;
+ text-align: center;
+ padding: 16rpx 8rpx;
+ font-size: 26rpx;
+ color: #666;
+ border-radius: 999rpx;
+ transition: all 0.2s;
+}
+
+.tab-item.active {
+ background: linear-gradient(180deg, #fae04d, #ffc0a3);
+ color: #492f00;
+ font-weight: 700;
+ box-shadow: 0 4rpx 12rpx rgba(250, 180, 80, 0.35);
+}
+
+.stats-card {
+ background: #fef6d4;
+ border-radius: 24rpx;
+ padding: 28rpx 24rpx;
+ border: 2rpx solid rgba(255, 255, 255, 0.8);
+ box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
+}
+
+.stats-main {
+ text-align: center;
+ padding-bottom: 20rpx;
+ margin-bottom: 20rpx;
+ border-bottom: 1rpx solid rgba(0, 0, 0, 0.06);
+}
+
+.stats-label,
+.stats-label-sm {
+ display: block;
+ font-size: 24rpx;
+ color: #888;
+ margin-bottom: 8rpx;
+}
+
+.stats-amount {
+ display: block;
+ font-size: 52rpx;
+ font-weight: 800;
+ color: #e65100;
+ line-height: 1.2;
+}
+
+.stats-amount-sm {
+ display: block;
+ font-size: 36rpx;
+ font-weight: 700;
+ color: #e65100;
+}
+
+.stats-tip {
+ display: block;
+ font-size: 22rpx;
+ color: #999;
+ margin-top: 6rpx;
+}
+
+.stats-row {
+ display: flex;
+ align-items: center;
+ justify-content: space-around;
+}
+
+.stats-row.three .stats-cell {
+ flex: 1;
+ text-align: center;
+}
+
+.stats-cell {
+ text-align: center;
+ flex: 1;
+}
+
+.stats-num {
+ display: block;
+ font-size: 36rpx;
+ font-weight: 700;
+ color: #333;
+}
+
+.stats-sub {
+ display: block;
+ font-size: 22rpx;
+ color: #888;
+ margin-top: 4rpx;
+}
+
+.stats-divider {
+ width: 1rpx;
+ height: 48rpx;
+ background: rgba(0, 0, 0, 0.08);
+}
+
+.dashou-hd {
+ text-align: center;
+ padding: 32rpx 24rpx;
+}
+
+.dashou-title {
+ display: block;
+ font-size: 32rpx;
+ font-weight: 700;
+ color: #333;
+}
+
+.dashou-sub {
+ display: block;
+ font-size: 24rpx;
+ color: #888;
+ margin-top: 8rpx;
+}
+
+.refresh-btn {
+ position: absolute;
+ top: 20rpx;
+ right: 36rpx;
+ width: 64rpx;
+ height: 64rpx;
+ background: rgba(255, 255, 255, 0.9);
+ border-radius: 50%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08);
+}
+
+.refresh-icon {
+ font-size: 32rpx;
+ color: #e65100;
+}
+
+.refresh-icon.spin {
+ animation: spin 1s linear infinite;
+ opacity: 0.5;
+}
+
+@keyframes spin {
+ from { transform: rotate(0deg); }
+ to { transform: rotate(360deg); }
+}
-/* 调整滚动区域的顶部距离,增加间隔 */
.scroll-area {
- position: fixed;
- top: 400rpx; /* 从 340rpx 增加到 360rpx,增加20rpx的间隔 */
- left: 0;
- right: 0;
- bottom: 0;
- z-index: 50;
- }
-
- /* 如果觉得还不够,可以再增加列表标题的上边距 */
- .list-title {
- margin: 10rpx 30rpx 20rpx; /* 从 0 30rpx 20rpx 改为 10rpx 30rpx 20rpx */
- display: flex;
- align-items: baseline;
- }
\ No newline at end of file
+ position: fixed;
+ top: 280rpx;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ z-index: 50;
+}
+
+.scroll-area.has-tabs.dashou { top: 300rpx; }
+.scroll-area.has-tabs.guanshi { top: 420rpx; }
+.scroll-area.has-tabs.zuzhang { top: 320rpx; }
+.scroll-area.guanshi:not(.has-tabs) { top: 400rpx; }
+.scroll-area.zuzhang:not(.has-tabs) { top: 300rpx; }
+
+.state-box,
+.empty-box {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ padding: 80rpx 40rpx;
+ margin: 24rpx;
+ background: #fff;
+ border-radius: 24rpx;
+ box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.05);
+}
+
+.spinner {
+ width: 64rpx;
+ height: 64rpx;
+ border: 4rpx solid #ffe082;
+ border-top-color: #e65100;
+ border-radius: 50%;
+ animation: spin 0.8s linear infinite;
+ margin-bottom: 20rpx;
+}
+
+.spinner.sm {
+ width: 36rpx;
+ height: 36rpx;
+ margin-bottom: 0;
+ margin-right: 12rpx;
+}
+
+.empty-icon {
+ font-size: 72rpx;
+ margin-bottom: 16rpx;
+}
+
+.empty-title {
+ font-size: 30rpx;
+ font-weight: 600;
+ color: #333;
+ margin-bottom: 8rpx;
+}
+
+.empty-tip {
+ font-size: 24rpx;
+ color: #999;
+ margin-bottom: 32rpx;
+ text-align: center;
+}
+
+.empty-btn {
+ padding: 16rpx 48rpx;
+ background: linear-gradient(180deg, #fae04d, #ffc0a3);
+ color: #492f00;
+ font-size: 28rpx;
+ font-weight: 600;
+ border-radius: 999rpx;
+}
+
+.list-hd {
+ display: flex;
+ align-items: baseline;
+ margin: 8rpx 24rpx 16rpx;
+}
+
+.list-title {
+ font-size: 30rpx;
+ font-weight: 700;
+ color: #333;
+ margin-right: 12rpx;
+}
+
+.list-count {
+ font-size: 24rpx;
+ color: #999;
+}
+
+.record-list {
+ padding: 0 24rpx 40rpx;
+}
+
+.record-card {
+ display: flex;
+ align-items: center;
+ padding: 24rpx;
+ margin-bottom: 16rpx;
+ background: #fff;
+ border-radius: 20rpx;
+ box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.05);
+}
+
+.record-card.avatar-card .avatar {
+ width: 88rpx;
+ height: 88rpx;
+ border-radius: 50%;
+ margin-right: 20rpx;
+ flex-shrink: 0;
+ background: #eee;
+}
+
+.record-main {
+ flex: 1;
+ min-width: 0;
+}
+
+.record-title {
+ display: block;
+ font-size: 28rpx;
+ font-weight: 600;
+ color: #333;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.record-time {
+ display: block;
+ font-size: 22rpx;
+ color: #999;
+ margin-top: 6rpx;
+}
+
+.record-amt {
+ font-size: 30rpx;
+ font-weight: 700;
+ flex-shrink: 0;
+}
+
+.record-amt.plus {
+ color: #2e7d32;
+}
+
+.amt-col {
+ text-align: right;
+}
+
+.bonus-card {
+ display: flex;
+ align-items: center;
+ padding: 20rpx;
+ margin-bottom: 16rpx;
+ background: #fff;
+ border-radius: 20rpx;
+ box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.05);
+}
+
+.bonus-left,
+.bonus-right {
+ display: flex;
+ align-items: center;
+ flex: 1;
+ min-width: 0;
+}
+
+.bonus-right {
+ flex-direction: row;
+ justify-content: flex-end;
+}
+
+.avatar.sm {
+ width: 64rpx;
+ height: 64rpx;
+ border-radius: 50%;
+ margin-right: 12rpx;
+ flex-shrink: 0;
+ background: #eee;
+}
+
+.bonus-info {
+ min-width: 0;
+ flex: 1;
+}
+
+.bonus-mid {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ padding: 0 8rpx;
+ flex-shrink: 0;
+}
+
+.bonus-tag {
+ font-size: 20rpx;
+ color: #999;
+}
+
+.bonus-arrow {
+ font-size: 24rpx;
+ color: #e65100;
+}
+
+.footer-tip {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 24rpx;
+ font-size: 24rpx;
+ color: #999;
+}
+
+.footer-tip.muted {
+ padding-bottom: 60rpx;
+}
+
+.error-bar {
+ position: fixed;
+ bottom: 40rpx;
+ left: 24rpx;
+ right: 24rpx;
+ z-index: 200;
+ background: #fff;
+ border-radius: 16rpx;
+ padding: 20rpx 24rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.12);
+ font-size: 26rpx;
+ color: #666;
+}
+
+.error-btn {
+ padding: 10rpx 28rpx;
+ background: linear-gradient(180deg, #fae04d, #ffc0a3);
+ color: #492f00;
+ font-size: 24rpx;
+ font-weight: 600;
+ border-radius: 999rpx;
+}
diff --git a/pages/withdraw/components/mode1/mode1.js b/pages/withdraw/components/mode1/mode1.js
index 8f702a7..4bc9d01 100644
--- a/pages/withdraw/components/mode1/mode1.js
+++ b/pages/withdraw/components/mode1/mode1.js
@@ -1,484 +1,440 @@
-// pages/withdraw/withdraw.js
-// 子组件版本 - 完整代码,仅适配生命周期,业务逻辑不动
-
+// pages/withdraw/components/mode1/mode1.js — 收款码手动审核纯提现
import request from '../../../../utils/request.js';
import upload from '../../../../utils/upload.js';
import PopupService from '../../../../services/popupService.js';
const app = getApp();
-const PAGE_SIZE = 10;
-let lastPullDownTime = 0;
-const PULL_DOWN_INTERVAL = 2000;
+
+const ASSET_TYPES = {
+ dashou_yue: { leixing: 1, label: '接单员佣金' },
+ dashou_yajin: { leixing: 5, label: '接单员保证金' },
+ shangjia_yue: { leixing: 6, label: '商家余额' },
+ guanshi_fenyong: { leixing: 2, label: '管事分红' },
+ zuzhang_fenyong: { leixing: 3, label: '组长分红' },
+ kaoheguan_fenyong: { leixing: 4, label: '考核官分佣' },
+};
+
+const FROM_ASSET_MAP = {
+ dashou: 'dashou_yue',
+ guanshi: 'guanshi_fenyong',
+ zuzhang: 'zuzhang_fenyong',
+ kaoheguan: 'kaoheguan_fenyong',
+ kaohe: 'kaoheguan_fenyong',
+ shangjia: 'shangjia_yue',
+ yajin: 'dashou_yajin',
+};
Component({
- data: {
- imgUrls: {
- pageBg: '',
- cardBg: '',
- iconWechat: '',
- iconAlipay: '',
- iconRecord: '',
- iconRefresh: '',
- },
- assetList: [],
- totalAmount: '0.00',
- selectedAsset: null,
- txfangshi: null,
- txdianhua: '',
- txzh: '',
- txtupian: '',
- ossImageUrl: '',
- showTixianModal: false,
- tixianAmount: '',
- shouxufei: '0.00',
- shijidaozhang: '0.00',
- currentRate: '0.00',
- recordList: [],
- page: 1,
- nomore: false,
- loading: false,
- isRefreshing: false,
- canloadmore: true,
- showSkfsModal: false,
- tempTxfangshi: null,
- tempTxPhone: '',
- tempTxAccount: '',
- tempTxImage: '',
- choosingImage: false,
- showModifyModal: false,
- modifyingRecord: null,
- modifyTxfangshi: null,
- modifyTxPhone: '',
- modifyTxAccount: '',
- modifyTxImage: '',
- modifyImageUrl: '',
- showFailModal: false,
- currentFailReason: '',
- isLoading: false,
- },
-
- attached() {
- this.initImageUrls();
- this.loadAllAssets();
- this.loadWithdrawMethod();
- this.loadWithdrawRecords(true);
- },
-
- pageLifetimes: {
- show() {
- this.registerNotification();
- PopupService.checkAndShow(this, 'tixian');
- },
- hide() {
- const popup = this.selectComponent('#popupNotice');
- popup?.cleanup?.();
- }
- },
-
- methods: {
- // 下拉刷新
- onPullDownRefresh() {
- if (this.data.isRefreshing) {
- wx.stopPullDownRefresh();
- return;
- }
- this.setData({ isRefreshing: true });
- this.loadWithdrawRecords(true).then(() => {
- wx.stopPullDownRefresh();
- this.setData({ isRefreshing: false });
- }).catch(() => {
- wx.stopPullDownRefresh();
- this.setData({ isRefreshing: false });
- });
- },
-
- // 底部按钮加载更多
- loadMoreRecords() {
- if (this.data.nomore) {
- wx.showToast({ title: '没有更多记录了', icon: 'none' });
- return;
- }
- if (this.data.loading) return;
- this.loadWithdrawRecords();
- },
-
- initImageUrls() {
- const ossBase = app.globalData.ossImageUrl || '';
- const imgDir = `${ossBase}beijing/tixian/`;
- this.setData({
- imgUrls: {
- pageBg: `${imgDir}page_bg.png`,
- cardBg: `${imgDir}card_bg.png`,
- iconWechat: `${imgDir}icon_wechat.png`,
- iconAlipay: `${imgDir}icon_alipay.png`,
- iconRecord: `${imgDir}icon_record.png`,
- iconRefresh: `${imgDir}icon_refresh.png`,
- assetTileBg: `${imgDir}asset_tile_bg.png`,
- }
- });
- },
-
- async loadAllAssets() {
- this.setData({ isLoading: true });
- try {
- const res = await request({ url: '/yonghu/tixianzichan', method: 'POST' });
- if (res?.data?.code === 200) {
- const data = res.data.data;
- const assets = [];
- if (data.dashou_yue && parseFloat(data.dashou_yue) > 0) {
- assets.push({ type: 'dashou_yue', label: '接单员佣金', amount: data.dashou_yue, rate: data.dashou_rate || 0 });
- }
- if (data.dashou_yajin && parseFloat(data.dashou_yajin) > 0) {
- assets.push({ type: 'dashou_yajin', label: '接单员保证金', amount: data.dashou_yajin, rate: data.dashou_yajin_rate || 0 });
- }
- if (data.shangjia_yue && parseFloat(data.shangjia_yue) > 0) {
- assets.push({ type: 'shangjia_yue', label: '商家余额', amount: data.shangjia_yue, rate: data.shangjia_rate || 0 });
- }
- if (data.guanshi_fenyong && parseFloat(data.guanshi_fenyong) > 0) {
- assets.push({ type: 'guanshi_fenyong', label: '管事分红', amount: data.guanshi_fenyong, rate: data.guanshi_rate || 0 });
- }
- if (data.zuzhang_fenyong && parseFloat(data.zuzhang_fenyong) > 0) {
- assets.push({ type: 'zuzhang_fenyong', label: '组长分红', amount: data.zuzhang_fenyong, rate: data.zuzhang_rate || 0 });
- }
- if (data.kaoheguan_fenyong && parseFloat(data.kaoheguan_fenyong) > 0) {
- assets.push({ type: 'kaoheguan_fenyong', label: '考核官分佣', amount: data.kaoheguan_fenyong, rate: data.kaoheguan_rate || 0 });
- }
- let total = 0;
- assets.forEach(item => { total += parseFloat(item.amount); });
- this.setData({ assetList: assets, totalAmount: total.toFixed(2), isLoading: false });
- // 缓存费率
- wx.setStorageSync('dashouRate', data.dashou_rate || 0);
- wx.setStorageSync('dashou_yajin_rate', data.dashou_yajin_rate || 0);
- wx.setStorageSync('shangjia_rate', data.shangjia_rate || 0);
- wx.setStorageSync('guanshi_rate', data.guanshi_rate || 0);
- wx.setStorageSync('zuzhang_rate', data.zuzhang_rate || 0);
- wx.setStorageSync('kaoheguan_rate', data.kaoheguan_rate || 0);
- } else {
- throw new Error(res?.data?.msg || '获取资产失败');
- }
- } catch (err) {
- console.error(err);
- wx.showToast({ title: '加载失败', icon: 'none' });
- this.setData({ isLoading: false });
- }
- },
-
- async loadWithdrawMethod() {
- const txzh = wx.getStorageSync('txzh') || '';
- const txtupian = wx.getStorageSync('txtupian') || '';
- const txfangshi = wx.getStorageSync('txfangshi') || null;
- const txdianhua = wx.getStorageSync('txdianhua') || '';
- if (txzh || txtupian) {
- this.setData({ txzh, txtupian, txfangshi, txdianhua, ossImageUrl: app.globalData.ossImageUrl || '' });
- } else {
- try {
- const res = await request({ url: '/yonghu/tixianhq', method: 'POST' });
- if (res?.data?.code === 0) {
- const data = res.data.data;
- this.setData({
- txzh: data.txzh || '',
- txtupian: data.txtupian || '',
- txfangshi: data.txfangshi || null,
- txdianhua: data.txdianhua || '',
- });
- wx.setStorageSync('txzh', data.txzh || '');
- wx.setStorageSync('txtupian', data.txtupian || '');
- wx.setStorageSync('txfangshi', data.txfangshi || null);
- wx.setStorageSync('txdianhua', data.txdianhua || '');
- }
- } catch (err) {}
- }
- },
-
- onSelectAsset(e) {
- const index = e.currentTarget.dataset.index;
- const asset = this.data.assetList[index];
- if (!asset || parseFloat(asset.amount) <= 0) {
- wx.showToast({ title: '无可提现金额', icon: 'none' });
- return;
- }
- this.setData({
- selectedAsset: asset,
- showTixianModal: true,
+ properties: { options: { type: Object, value: {} } },
+ data: {
+ imgUrls: { iconWechat: '', iconAlipay: '' },
+ assetList: [],
+ displayAssetList: [],
+ totalAmount: '0.00',
+ canWithdraw: false,
+ isLoadingAssets: false,
+ selectedAsset: null,
tixianAmount: '',
+ feeRateText: '--',
+ currentRate: '0%',
shouxufei: '0.00',
shijidaozhang: '0.00',
- currentRate: asset.rate
- });
+ showTixianModal: false,
+ submitting: false,
+ txfangshi: null,
+ txdianhua: '',
+ txzh: '',
+ txtupian: '',
+ showSkfsModal: false,
+ tempTxfangshi: null,
+ tempTxPhone: '',
+ tempTxAccount: '',
+ tempTxImage: '',
+ choosingImage: false,
},
- onAmountInput(e) {
- let val = e.detail.value;
- if (val && !/^\d*\.?\d{0,2}$/.test(val)) return;
- this.setData({ tixianAmount: val });
- if (val && parseFloat(val) > 0) {
- const amount = parseFloat(val);
- const rate = parseFloat(this.data.selectedAsset.rate) || 0;
- const fee = amount * rate;
- const actual = amount - fee;
- this.setData({ shouxufei: fee.toFixed(2), shijidaozhang: actual.toFixed(2) });
- } else {
- this.setData({ shouxufei: '0.00', shijidaozhang: '0.00' });
- }
+ attached() {
+ this.initImageUrls();
+ this.loadAllAssets();
+ this.loadWithdrawMethod();
},
- onQuickAmount(e) {
- const val = e.currentTarget.dataset.value;
- this.setData({ tixianAmount: val.toString() });
- this.onAmountInput({ detail: { value: val.toString() } });
+ pageLifetimes: {
+ show() {
+ this.registerNotification();
+ this.loadAllAssets();
+ PopupService.checkAndShow(this, 'tixian');
+ },
+ hide() {
+ const popup = this.selectComponent('#popupNotice');
+ popup?.cleanup?.();
+ },
},
- async onConfirmWithdraw() {
- const { selectedAsset, tixianAmount, txfangshi, txzh, txtupian, txdianhua } = this.data;
- if (!selectedAsset) { wx.showToast({ title: '请选择提现项目', icon: 'none' }); return; }
- const amount = parseFloat(tixianAmount);
- if (isNaN(amount) || amount <= 0) { wx.showToast({ title: '请输入有效金额', icon: 'none' }); return; }
- if (amount > parseFloat(selectedAsset.amount)) { wx.showToast({ title: '超过可提现金额', icon: 'none' }); return; }
- if (!txfangshi || (!txzh && !txtupian)) {
- wx.showToast({ title: '请先设置收款方式', icon: 'none' });
- this.setData({ showTixianModal: false });
- this.onSetSkfs();
- return;
- }
- let leixing = 1;
- switch (selectedAsset.type) {
- case 'dashou_yue': leixing = 1; break;
- case 'dashou_yajin': leixing = 5; break;
- case 'shangjia_yue': leixing = 6; break;
- case 'guanshi_fenyong': leixing = 2; break;
- case 'zuzhang_fenyong': leixing = 3; break;
- case 'kaoheguan_fenyong': leixing = 4; break;
- }
- let txskfs = 0;
- if (txzh && txtupian) txskfs = 3;
- else if (txzh) txskfs = 1;
- else if (txtupian) txskfs = 2;
- try {
- const res = await request({
- url: '/yonghu/tixian',
- method: 'POST',
- data: { leixing, jine: amount.toFixed(2), fangshi: txfangshi, txskfs }
- });
- if (res?.data?.code === 0) {
- const newAssetList = this.data.assetList.map(item => {
- if (item.type === selectedAsset.type) {
- const newAmount = (parseFloat(item.amount) - amount).toFixed(2);
- return { ...item, amount: newAmount };
+ methods: {
+ formatRatePercent(rate) {
+ const r = parseFloat(rate) || 0;
+ if (r <= 1 && r > 0) return `${(r * 100).toFixed(0)}%`;
+ return `${r}%`;
+ },
+
+ registerNotification() {
+ const comp = this.selectComponent('#global-notification');
+ if (comp?.showNotification) {
+ app.globalData.globalNotification = {
+ show: (data) => comp.showNotification(data),
+ hide: () => comp.hideNotification(),
+ };
}
- return item;
- });
- let newTotal = 0;
- newAssetList.forEach(item => { newTotal += parseFloat(item.amount); });
- this.setData({ assetList: newAssetList, totalAmount: newTotal.toFixed(2), showTixianModal: false, selectedAsset: null });
- this.loadWithdrawRecords(true);
- wx.showToast({ title: '提现申请已提交', icon: 'success' });
- } else {
- wx.showToast({ title: res?.data?.msg || '提现失败', icon: 'none' });
- }
- } catch (err) {
- wx.showToast({ title: '网络错误', icon: 'none' });
- }
- },
+ },
- onCloseTixianModal() {
- this.setData({ showTixianModal: false, selectedAsset: null, tixianAmount: '' });
- },
+ initImageUrls() {
+ const ossBase = app.globalData.ossImageUrl || '';
+ const imgDir = `${ossBase}beijing/tixian/`;
+ this.setData({
+ imgUrls: {
+ iconWechat: `${imgDir}icon_wechat.png`,
+ iconAlipay: `${imgDir}icon_alipay.png`,
+ },
+ });
+ },
- onSetSkfs() {
- this.setData({
- showSkfsModal: true,
- tempTxfangshi: this.data.txfangshi,
- tempTxPhone: this.data.txdianhua,
- tempTxAccount: this.data.txzh,
- tempTxImage: ''
- });
- },
+ /** 顶部展示:不含保证金的可提现合计 */
+ calcDisplayTotal(assets) {
+ let total = 0;
+ (assets || []).forEach((item) => {
+ if (item.type === 'dashou_yajin') return;
+ total += parseFloat(item.amount) || 0;
+ });
+ return total;
+ },
- onSelectFangshi(e) {
- this.setData({ tempTxfangshi: e.currentTarget.dataset.fangshi });
- },
+ hasAnyWithdrawable(assets) {
+ return (assets || []).some((item) => parseFloat(item.amount) > 0);
+ },
- onPhoneInput(e) { this.setData({ tempTxPhone: e.detail.value }); },
- onAccountInput(e) { this.setData({ tempTxAccount: e.detail.value }); },
-
- onChooseImage() {
- if (this.data.choosingImage) return;
- this.setData({ choosingImage: true });
- wx.chooseMedia({
- count: 1, mediaType: ['image'],
- success: (res) => { this.setData({ tempTxImage: res.tempFiles[0].tempFilePath }); },
- complete: () => { this.setData({ choosingImage: false }); }
- });
- },
-
- onPreviewImage() {
- if (this.data.tempTxImage) wx.previewImage({ urls: [this.data.tempTxImage] });
- },
-
- onDeleteImage() { this.setData({ tempTxImage: '' }); },
-
- async onConfirmSkfs() {
- const { tempTxfangshi, tempTxPhone, tempTxAccount, tempTxImage } = this.data;
- if (!tempTxfangshi) { wx.showToast({ title: '请选择提现方式', icon: 'none' }); return; }
- if (!tempTxPhone) { wx.showToast({ title: '请输入收款人电话', icon: 'none' }); return; }
- if (tempTxfangshi == 1 && !tempTxImage) { wx.showToast({ title: '请上传微信收款码', icon: 'none' }); return; }
- if (tempTxfangshi == 2 && !tempTxAccount && !tempTxImage) {
- wx.showToast({ title: '请填写支付宝账号或上传收款码', icon: 'none' }); return;
- }
- const formData = { txdianhua: tempTxPhone, txzh: tempTxAccount || '' };
- try {
- const res = await upload({ url: '/yonghu/sksc', formData, filePath: tempTxImage || null, fileName: 'file' });
- if (res?.data?.code === 0) {
- const data = res.data.data;
- this.setData({
- txfangshi: tempTxfangshi, txdianhua: tempTxPhone, txzh: data.txzh || '', txtupian: data.txtupian || '', showSkfsModal: false
- });
- wx.setStorageSync('txfangshi', tempTxfangshi);
- wx.setStorageSync('txdianhua', tempTxPhone);
- wx.setStorageSync('txzh', data.txzh || '');
- wx.setStorageSync('txtupian', data.txtupian || '');
- wx.showToast({ title: '设置成功', icon: 'success' });
- } else {
- wx.showToast({ title: res?.data?.msg || '保存失败', icon: 'none' });
- }
- } catch (err) {
- wx.showToast({ title: '网络错误', icon: 'none' });
- }
- },
-
- onCloseSkfsModal() { this.setData({ showSkfsModal: false }); },
-
- async loadWithdrawRecords(refresh = false) {
- const now = Date.now();
- if (now - lastPullDownTime < PULL_DOWN_INTERVAL && !refresh) return;
- if (this.data.loading || this.data.isRefreshing) return;
- const page = refresh ? 1 : this.data.page;
- if (this.data.nomore && !refresh) return;
- this.setData({ loading: true, isRefreshing: refresh });
- lastPullDownTime = now;
- try {
- const res = await request({ url: '/yonghu/tixianjiluhq', method: 'POST', data: { page, limit: PAGE_SIZE } });
- if (res?.data?.code === 0) {
- const list = (res.data.data.list || []).map(item => ({
- ...item,
- statusText: this.getStatusText(item.zhuangtai),
- statusColor: this.getStatusColor(item.zhuangtai)
- }));
- const newList = refresh ? list : [...this.data.recordList, ...list];
- const hasMore = res.data.data.has_more === true;
- this.setData({
- recordList: newList, page: page + 1, nomore: !hasMore, canloadmore: hasMore,
- loading: false, isRefreshing: false
- });
- } else {
- this.setData({ loading: false, isRefreshing: false });
- }
- } catch (err) {
- this.setData({ loading: false, isRefreshing: false });
- }
- },
-
- onModifyRecord(e) {
- const record = e.currentTarget.dataset.record;
- if (parseInt(record.zhuangtai) !== 1) {
- wx.showToast({ title: '只有审核中的记录可修改', icon: 'none' });
- return;
- }
- this.setData({
- modifyingRecord: record,
- modifyTxfangshi: record.fangshi,
- modifyTxPhone: record.txdianhua || '',
- modifyTxAccount: record.txzh || '',
- modifyTxImage: '',
- modifyImageUrl: record.txtupian ? (app.globalData.ossImageUrl + record.txtupian) : '',
- showModifyModal: true
- });
- },
-
- onSelectModifyFangshi(e) { this.setData({ modifyTxfangshi: e.currentTarget.dataset.fangshi }); },
- onModifyPhoneInput(e) { this.setData({ modifyTxPhone: e.detail.value }); },
- onModifyAccountInput(e) { this.setData({ modifyTxAccount: e.detail.value }); },
-
- onChooseModifyImage() {
- if (this.data.choosingImage) return;
- this.setData({ choosingImage: true });
- wx.chooseMedia({
- count: 1, mediaType: ['image'],
- success: (res) => { this.setData({ modifyTxImage: res.tempFiles[0].tempFilePath }); },
- complete: () => { this.setData({ choosingImage: false }); }
- });
- },
-
- onPreviewModifyImage() {
- if (this.data.modifyTxImage) wx.previewImage({ urls: [this.data.modifyTxImage] });
- else if (this.data.modifyImageUrl) wx.previewImage({ urls: [this.data.modifyImageUrl] });
- },
-
- onDeleteModifyImage() { this.setData({ modifyTxImage: '' }); },
-
- async onConfirmModify() {
- const { modifyTxfangshi, modifyTxPhone, modifyTxAccount, modifyTxImage, modifyingRecord } = this.data;
- if (!modifyTxfangshi) { wx.showToast({ title: '请选择提现方式', icon: 'none' }); return; }
- if (!modifyTxPhone) { wx.showToast({ title: '请输入收款人电话', icon: 'none' }); return; }
- if (modifyTxfangshi == 1 && !modifyTxImage) { wx.showToast({ title: '请上传微信收款码', icon: 'none' }); return; }
- if (modifyTxfangshi == 2 && !modifyTxAccount && !modifyTxImage) {
- wx.showToast({ title: '请填写支付宝账号或上传收款码', icon: 'none' }); return;
- }
- const formData = { tixian_id: modifyingRecord.id, fangshi: modifyTxfangshi, txdianhua: modifyTxPhone, txzh: modifyTxAccount || '' };
- try {
- const res = await upload({ url: '/yonghu/yonghutxshxg', formData, filePath: modifyTxImage || null, fileName: 'file' });
- if (res?.data?.code === 0) {
- const data = res.data.data;
- const newList = this.data.recordList.map(item => {
- if (item.id === modifyingRecord.id) {
- return { ...item, fangshi: modifyTxfangshi, txdianhua: modifyTxPhone, txzh: modifyTxAccount || '', txtupian: data.txtupian || modifyingRecord.txtupian };
+ applyRouteOptions(assets) {
+ const opts = this.properties.options || {};
+ const fromKey = FROM_ASSET_MAP[opts.from];
+ let selected = null;
+ if (fromKey) {
+ selected = assets.find((a) => a.type === fromKey) || null;
+ } else if (assets.length === 1) {
+ selected = assets[0];
}
- return item;
- });
- this.setData({ recordList: newList, showModifyModal: false, modifyingRecord: null });
- wx.showToast({ title: '修改成功', icon: 'success' });
- } else {
- wx.showToast({ title: res?.data?.msg || '修改失败', icon: 'none' });
- }
- } catch (err) {
- wx.showToast({ title: '网络错误', icon: 'none' });
- }
- },
+ const patch = {};
+ if (selected) {
+ patch.selectedAsset = selected;
+ patch.feeRateText = selected.rateText;
+ }
+ if (opts.amount && parseFloat(opts.amount) > 0) {
+ const amt = parseFloat(opts.amount);
+ const max = selected ? parseFloat(selected.amount) : amt;
+ patch.tixianAmount = Math.min(amt, max).toFixed(2);
+ }
+ if (Object.keys(patch).length) {
+ this.setData(patch, () => {
+ this.recalcFee(this.data.tixianAmount, this.data.selectedAsset);
+ });
+ }
+ },
- onCloseModifyModal() { this.setData({ showModifyModal: false, modifyingRecord: null }); },
+ onSelectAsset(e) {
+ const index = e.currentTarget.dataset.index;
+ const asset = this.data.displayAssetList[index];
+ if (!asset || parseFloat(asset.amount) <= 0) {
+ wx.showToast({ title: '该账户无可提余额', icon: 'none' });
+ return;
+ }
+ let amount = this.data.tixianAmount;
+ const max = parseFloat(asset.amount);
+ if (amount && parseFloat(amount) > max) {
+ amount = asset.amount;
+ }
+ this.setData({ selectedAsset: asset, tixianAmount: amount });
+ this.recalcFee(amount, asset);
+ },
- onViewFailReason(e) {
- const record = e.currentTarget.dataset.record;
- const reason = record.fail_reason || record.shibaiyuanyin || '暂无详细信息';
- this.setData({ currentFailReason: reason, showFailModal: true });
- },
+ async loadAllAssets() {
+ this.setData({ isLoadingAssets: true, totalAmount: '0.00', canWithdraw: false, assetList: [] });
+ try {
+ const res = await request({ url: '/yonghu/tixianzichan', method: 'POST' });
+ if (res?.data?.code === 200 || res?.data?.code === 0) {
+ const data = res.data.data || {};
+ const assets = [];
+ const push = (type, amount, rate) => {
+ const cfg = ASSET_TYPES[type];
+ if (!cfg || !amount || parseFloat(amount) <= 0) return;
+ assets.push({
+ type,
+ leixing: cfg.leixing,
+ label: cfg.label,
+ amount: parseFloat(amount).toFixed(2),
+ rate: rate || 0,
+ rateText: this.formatRatePercent(rate || 0),
+ });
+ };
+ push('dashou_yue', data.dashou_yue, data.dashou_rate);
+ push('dashou_yajin', data.dashou_yajin, data.dashou_yajin_rate);
+ push('shangjia_yue', data.shangjia_yue, data.shangjia_rate);
+ push('guanshi_fenyong', data.guanshi_fenyong, data.guanshi_rate);
+ push('zuzhang_fenyong', data.zuzhang_fenyong, data.zuzhang_rate);
+ push('kaoheguan_fenyong', data.kaoheguan_fenyong, data.kaoheguan_rate);
- onCloseFailModal() { this.setData({ showFailModal: false }); },
+ const displayTotal = this.calcDisplayTotal(assets);
+ const firstRate = assets.find((a) => a.type !== 'dashou_yajin')?.rate || 0;
+ this.setData({
+ assetList: assets,
+ displayAssetList: assets,
+ totalAmount: displayTotal.toFixed(2),
+ canWithdraw: this.hasAnyWithdrawable(assets),
+ isLoadingAssets: false,
+ feeRateText: displayTotal > 0 ? this.formatRatePercent(firstRate) : '--',
+ }, () => this.applyRouteOptions(assets));
+ if (!this.data.selectedAsset) {
+ this.recalcFee(this.data.tixianAmount, null);
+ }
+ } else {
+ throw new Error(res?.data?.msg || '获取资产失败');
+ }
+ } catch (err) {
+ console.error('loadAllAssets', err);
+ this.setData({ isLoadingAssets: false, totalAmount: '0.00', canWithdraw: false, assetList: [] });
+ }
+ },
- getStatusText(zhuangtai) {
- const s = parseInt(zhuangtai);
- if (s === 1) return '审核中';
- if (s === 2) return '成功';
- if (s === 3) return '失败';
- return '未知';
- },
- getStatusColor(zhuangtai) {
- const s = parseInt(zhuangtai);
- if (s === 1) return '#F5A623';
- if (s === 2) return '#2ED158';
- if (s === 3) return '#FF4D4F';
- return '#999';
- },
+ async loadWithdrawMethod() {
+ const txzh = wx.getStorageSync('txzh') || '';
+ const txtupian = wx.getStorageSync('txtupian') || '';
+ const txfangshi = wx.getStorageSync('txfangshi') || null;
+ const txdianhua = wx.getStorageSync('txdianhua') || '';
+ if (txzh || txtupian || txfangshi) {
+ this.setData({ txzh, txtupian, txfangshi, txdianhua });
+ return;
+ }
+ try {
+ const res = await request({ url: '/yonghu/tixianhq', method: 'POST' });
+ if (res?.data?.code === 0) {
+ const data = res.data.data;
+ this.setData({
+ txzh: data.txzh || '',
+ txtupian: data.txtupian || '',
+ txfangshi: data.txfangshi || null,
+ txdianhua: data.txdianhua || '',
+ });
+ wx.setStorageSync('txzh', data.txzh || '');
+ wx.setStorageSync('txtupian', data.txtupian || '');
+ wx.setStorageSync('txfangshi', data.txfangshi || null);
+ wx.setStorageSync('txdianhua', data.txdianhua || '');
+ }
+ } catch (err) { /* ignore */ }
+ },
- registerNotification() {
- const comp = this.selectComponent('#global-notification');
- if (comp?.showNotification) {
- app.globalData.globalNotification = {
- show: (data) => comp.showNotification(data),
- hide: () => comp.hideNotification()
- };
- }
+ recalcFee(amountStr, asset) {
+ const amount = parseFloat(amountStr);
+ if (!amountStr || isNaN(amount) || amount <= 0 || !asset) {
+ this.setData({
+ shouxufei: '0.00',
+ shijidaozhang: '0.00',
+ feeRateText: asset ? asset.rateText : this.data.feeRateText,
+ });
+ return;
+ }
+ const rate = parseFloat(asset.rate) || 0;
+ const fee = amount * rate;
+ this.setData({
+ shouxufei: fee.toFixed(2),
+ shijidaozhang: (amount - fee).toFixed(2),
+ feeRateText: asset.rateText,
+ currentRate: asset.rateText,
+ });
+ },
+
+ onAmountInput(e) {
+ let val = e.detail.value;
+ if (val && !/^\d*\.?\d{0,2}$/.test(val)) return;
+ this.setData({ tixianAmount: val });
+ this.recalcFee(val, this.data.selectedAsset);
+ },
+
+ onWithdrawAll() {
+ const { selectedAsset } = this.data;
+ if (!selectedAsset) {
+ wx.showToast({ title: '请先选择提现账户', icon: 'none' });
+ return;
+ }
+ const max = selectedAsset.amount;
+ this.setData({ tixianAmount: max });
+ this.recalcFee(max, selectedAsset);
+ },
+
+ onTapWithdraw() {
+ if (this.data.submitting) return;
+ if (!this.hasAnyWithdrawable(this.data.assetList)) {
+ wx.showToast({ title: '暂无可提现余额', icon: 'none' });
+ return;
+ }
+ const { selectedAsset, tixianAmount } = this.data;
+ if (!selectedAsset) {
+ wx.showToast({ title: '请先选择要提现的账户', icon: 'none' });
+ return;
+ }
+ const amount = parseFloat(tixianAmount);
+ if (isNaN(amount) || amount <= 0) {
+ wx.showToast({ title: '请输入有效金额', icon: 'none' });
+ return;
+ }
+ if (amount > parseFloat(selectedAsset.amount)) {
+ wx.showToast({ title: `超过${selectedAsset.label}可提余额`, icon: 'none' });
+ return;
+ }
+ const { txfangshi, txzh, txtupian } = this.data;
+ if (!txfangshi || (!txzh && !txtupian)) {
+ wx.showToast({ title: '请先设置收款方式', icon: 'none' });
+ this.onSetSkfs();
+ return;
+ }
+ this.applyIdentityAndConfirm(selectedAsset);
+ },
+
+ applyIdentityAndConfirm(asset) {
+ this.recalcFee(this.data.tixianAmount, asset);
+ this.setData({ selectedAsset: asset, showTixianModal: true });
+ },
+
+ async onConfirmWithdraw() {
+ const { selectedAsset, tixianAmount, txfangshi, txzh, txtupian } = this.data;
+ if (!selectedAsset) {
+ wx.showToast({ title: '请选择提现身份', icon: 'none' });
+ return;
+ }
+ const amount = parseFloat(tixianAmount);
+ if (isNaN(amount) || amount <= 0) {
+ wx.showToast({ title: '请输入有效金额', icon: 'none' });
+ return;
+ }
+ if (amount > parseFloat(selectedAsset.amount)) {
+ wx.showToast({ title: '超过可提余额', icon: 'none' });
+ return;
+ }
+ const leixing = selectedAsset.leixing;
+ let txskfs = 0;
+ if (txzh && txtupian) txskfs = 3;
+ else if (txzh) txskfs = 1;
+ else if (txtupian) txskfs = 2;
+
+ this.setData({ submitting: true });
+ try {
+ const res = await request({
+ url: '/yonghu/tixian',
+ method: 'POST',
+ data: { leixing, jine: amount.toFixed(2), fangshi: txfangshi, txskfs },
+ });
+ if (res?.data?.code === 0) {
+ this.setData({
+ showTixianModal: false,
+ selectedAsset: null,
+ tixianAmount: '',
+ submitting: false,
+ });
+ await this.loadAllAssets();
+ wx.showModal({
+ title: '申请成功',
+ content: '提现申请已提交,请前往「提现记录」查看审核进度。',
+ confirmText: '查看提现记录',
+ cancelText: '知道了',
+ success: (res) => {
+ if (res.confirm) {
+ wx.navigateTo({ url: '/pages/withdraw/withdraw-records' });
+ }
+ },
+ });
+ } else {
+ wx.showToast({ title: res?.data?.msg || '提现失败', icon: 'none' });
+ this.setData({ submitting: false });
+ }
+ } catch (err) {
+ wx.showToast({ title: '网络错误', icon: 'none' });
+ this.setData({ submitting: false });
+ }
+ },
+
+ onCloseTixianModal() {
+ if (this.data.submitting) return;
+ this.setData({ showTixianModal: false, selectedAsset: null });
+ },
+
+ onSetSkfs() {
+ this.setData({
+ showSkfsModal: true,
+ tempTxfangshi: this.data.txfangshi,
+ tempTxPhone: this.data.txdianhua,
+ tempTxAccount: this.data.txzh,
+ tempTxImage: '',
+ });
+ },
+
+ onSelectFangshi(e) { this.setData({ tempTxfangshi: e.currentTarget.dataset.fangshi }); },
+ onPhoneInput(e) { this.setData({ tempTxPhone: e.detail.value }); },
+ onAccountInput(e) { this.setData({ tempTxAccount: e.detail.value }); },
+
+ onChooseImage() {
+ if (this.data.choosingImage) return;
+ this.setData({ choosingImage: true });
+ wx.chooseMedia({
+ count: 1,
+ mediaType: ['image'],
+ success: (res) => { this.setData({ tempTxImage: res.tempFiles[0].tempFilePath }); },
+ complete: () => { this.setData({ choosingImage: false }); },
+ });
+ },
+
+ onPreviewImage() {
+ if (this.data.tempTxImage) wx.previewImage({ urls: [this.data.tempTxImage] });
+ },
+
+ onDeleteImage() { this.setData({ tempTxImage: '' }); },
+
+ async onConfirmSkfs() {
+ const { tempTxfangshi, tempTxPhone, tempTxAccount, tempTxImage } = this.data;
+ if (!tempTxfangshi) { wx.showToast({ title: '请选择提现方式', icon: 'none' }); return; }
+ if (!tempTxPhone) { wx.showToast({ title: '请输入收款人电话', icon: 'none' }); return; }
+ if (tempTxfangshi == 1 && !tempTxImage && !this.data.txtupian) {
+ wx.showToast({ title: '请上传微信收款码', icon: 'none' }); return;
+ }
+ if (tempTxfangshi == 2 && !tempTxAccount && !tempTxImage && !this.data.txzh) {
+ wx.showToast({ title: '请填写支付宝账号或上传收款码', icon: 'none' }); return;
+ }
+ try {
+ const res = await upload({
+ url: '/yonghu/sksc',
+ formData: { txdianhua: tempTxPhone, txzh: tempTxAccount || '' },
+ filePath: tempTxImage || null,
+ fileName: 'file',
+ });
+ if (res?.data?.code === 0) {
+ const data = res.data.data;
+ this.setData({
+ txfangshi: tempTxfangshi,
+ txdianhua: tempTxPhone,
+ txzh: data.txzh || '',
+ txtupian: data.txtupian || this.data.txtupian,
+ showSkfsModal: false,
+ });
+ wx.setStorageSync('txfangshi', tempTxfangshi);
+ wx.setStorageSync('txdianhua', tempTxPhone);
+ wx.setStorageSync('txzh', data.txzh || '');
+ wx.setStorageSync('txtupian', data.txtupian || this.data.txtupian);
+ wx.showToast({ title: '设置成功', icon: 'success' });
+ } else {
+ wx.showToast({ title: res?.data?.msg || '保存失败', icon: 'none' });
+ }
+ } catch (err) {
+ wx.showToast({ title: '网络错误', icon: 'none' });
+ }
+ },
+
+ onCloseSkfsModal() { this.setData({ showSkfsModal: false }); },
+ stopPropagation() {},
},
- stopPropagation() {}
- }
-});
\ No newline at end of file
+});
diff --git a/pages/withdraw/components/mode1/mode1.wxml b/pages/withdraw/components/mode1/mode1.wxml
index c4f5f71..ce59995 100644
--- a/pages/withdraw/components/mode1/mode1.wxml
+++ b/pages/withdraw/components/mode1/mode1.wxml
@@ -1,133 +1,115 @@
-
-
-
-
-
-
-
-
-
-
-
-
- 可提总余额
- ¥{{totalAmount}}
-
-
-
-
-
-
- ← 左右滑动查看更多资产 →
-
-
-
-
-
-
-
- {{item.label}}
- ¥{{item.amount}}
- 费率 {{item.rate}}%
-
-
- 暂无可用资金
-
-
+
+
+
+
+
+
+
+ {{txfangshi == 1 ? '微信零钱' : (txfangshi == 2 ? '收款码' : '请先设置收款')}}
+
-
-
-
+ 设置收款方式
-
-
-
-
-
-
- ¥{{item.jine}}
- {{item.create}}
-
-
- {{item.fangshi == 1 ? '微信' : '支付宝'}}
- {{item.leixing == 1 ? '佣金' : (item.leixing == 2 ? '分红' : (item.leixing == 3 ? '组长' : (item.leixing == 4 ? '考核官' : '保证金')))}}
-
-
- {{item.statusText}} ✏修改
-
- {{item.statusText}}
- 详情
-
- {{item.statusText}}
-
+
+
+
+ {{item.label}}
+ ¥{{item.amount}}
- 加载中...
- —— 没有更多了 ——
- 加载更多记录
+ 请先选择上方提现账户
+ 当前:{{selectedAsset.label}}
-
+
+
+ 当前可提现:
+ ¥
+ {{selectedAsset ? selectedAsset.amount : totalAmount}}
+
+
+ ¥
+
+ 全部提现
+
+
+
+ 提示:提现手续费
+ {{feeRateText}}
+ 。
+
+
+
+
+
+ 处理中...
+ 确认提现
+
+
+
+
+ 📢 提现须知
+ 🕒 提交后将进入人工审核,请耐心等待
+ 📌 审核结果可在「提现记录」中查看
+ 💰 每笔只能从单个账户提现,请先选择对应账户
+ ✅ 请确保收款方式与收款码正确后再提交
+ 🎧 如有疑问请联系客服核实处理
+
-
-
-
+
- 项目{{selectedAsset.label}}
+ 身份{{selectedAsset.label}}
可提¥{{selectedAsset.amount}}
- 费率{{currentRate}}%
- 金额
- ¥{{item}}
+ 费率{{currentRate}}
+ 提现金额¥{{tixianAmount}}
手续费 ¥{{shouxufei}}到账 ¥{{shijidaozhang}}
- 收款方式 {{txfangshi == 1 ? '微信' : (txfangshi == 2 ? '支付宝' : '未设置')}}更换
+ 收款{{txfangshi == 1 ? '微信' : (txfangshi == 2 ? '支付宝' : '未设置')}}
+
+
-
-
-
- 微信支付宝
+
+
+ 微信
+ 支付宝
+
- + 上传收款码预览删除
+
+ + 上传收款码
+ 预览删除
+
-
-
-
-
-
-
-
-
-
- 微信支付宝
-
-
- + 上传新图片预览删除
+
-
-
-
-
-
-
-
-
- {{currentFailReason}}
-
-
\ No newline at end of file
+
diff --git a/pages/withdraw/components/mode1/mode1.wxss b/pages/withdraw/components/mode1/mode1.wxss
index 6ce2249..2d5e693 100644
--- a/pages/withdraw/components/mode1/mode1.wxss
+++ b/pages/withdraw/components/mode1/mode1.wxss
@@ -1,424 +1,85 @@
-/* pages/withdraw/withdraw.wxss - 终极优化版 */
+@import '../mode2/mode2.wxss';
-page {
- background-color: #f5f7fb;
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
- height: 100%;
- }
-
- .app {
- display: flex;
- flex-direction: column;
- min-height: 100vh;
- padding: 0 24rpx 0;
- position: relative;
- z-index: 1;
- box-sizing: border-box;
- }
-
- /* 页面背景模糊极低,不影响阅读 */
- .global-bg {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- z-index: -1;
- opacity: 0.1;
- object-fit: cover;
- filter: blur(1rpx);
- }
-
- /* 资产区域整体与顶部保持间距 */
- .assets-section {
- margin-top: 24rpx;
- flex-shrink: 0;
- }
-
- /* 主卡片玻璃质感 - 模糊加重避免抢眼,同时文字对比加强 */
- .main-card {
- background: rgba(248, 250, 252, 0.88); /* 稍微降低透明度,让背景更柔和 */
- backdrop-filter: blur(28rpx); /* 增强模糊,不抢眼 */
- -webkit-backdrop-filter: blur(28rpx);
- border-radius: 48rpx;
- padding: 30rpx 28rpx 24rpx; /* 稍微缩小高度 */
- margin-bottom: 20rpx;
- box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.04);
- border: 1rpx solid rgba(255, 255, 255, 0.4);
- background-size: cover;
- }
-
- /* 总余额 - 字体加深加粗,增加阴影提高可读性 */
- .balance-wrap {
- text-align: center;
- margin-bottom: 20rpx; /* 减小间距,让卡片更紧凑 */
- }
- .balance-label {
- font-size: 28rpx;
- color: #0f172a; /* 更深色 */
- letter-spacing: 1px;
- display: block;
- margin-bottom: 10rpx;
- font-weight: 700; /* 加粗 */
- text-shadow: 0 1rpx 2rpx rgba(255,255,255,0.8);
- }
- .balance-value {
- font-size: 68rpx;
- font-weight: 800;
- color: #0f172a;
- font-family: 'DIN', monospace;
- letter-spacing: -1rpx;
- text-shadow: 0 1rpx 2rpx rgba(255,255,255,0.6);
- }
-
- /* 内部分隔线(横杠)- 明显且保持层次 */
- .inner-divider {
- width: 60%;
- height: 2rpx;
- background: linear-gradient(90deg, transparent, #64748b, #64748b, transparent); /* 加深颜色 */
- margin: 0 auto 20rpx auto;
- border-radius: 2rpx;
- opacity: 0.9;
- }
-
- /* 左右滑动提示 - 字体明显 */
- .assets-hint {
- display: block;
- text-align: center;
- font-size: 24rpx;
- color: #334155; /* 深灰 */
- margin-bottom: 14rpx;
- font-weight: 600;
- }
-
- .assets-scroll {
- width: 100%;
- white-space: nowrap;
- }
- .assets-track {
- display: inline-flex;
- gap: 16rpx;
- }
-
- /* 资产小卡片 - 背景半透模糊,字体深色加粗 */
- .asset-tile {
- width: 170rpx;
- background: rgba(255, 255, 255, 0.75); /* 稍微提高透明度,让模糊背景透出 */
- backdrop-filter: blur(8rpx); /* 自身轻微模糊,不抢眼 */
- border-radius: 28rpx;
- padding: 18rpx 12rpx;
- display: inline-flex;
- flex-direction: column;
- align-items: center;
- text-align: center;
- border: 1rpx solid rgba(255,255,255,0.5);
- box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.02);
- transition: all 0.2s;
- white-space: normal;
- background-size: cover;
- background-position: center;
- }
- .asset-tile:active {
- background: rgba(255, 255, 255, 0.9);
- transform: scale(0.98);
- }
- .asset-name {
- font-size: 24rpx;
- font-weight: 700; /* 加粗 */
- color: #1e293b; /* 深色 */
- margin-bottom: 10rpx;
- text-shadow: 0 1rpx 1rpx rgba(255,255,255,0.5);
- }
- .asset-balance {
- font-size: 28rpx;
- font-weight: 800; /* 加粗 */
- color: #2d6a4f;
- font-family: monospace;
- margin-bottom: 6rpx;
- text-shadow: 0 1rpx 1rpx rgba(255,255,255,0.3);
- }
- .asset-fee {
- font-size: 20rpx;
- font-weight: 600; /* 加粗并加深 */
- color: #475569;
- text-shadow: 0 1rpx 1rpx rgba(255,255,255,0.3);
- }
- .assets-empty {
- width: 400rpx;
- text-align: center;
- color: #a0abb9;
- padding: 40rpx 0;
- }
-
- /* 外部层次分隔线 - 保持不变,保留分层 */
- .divider-line {
- height: 2rpx;
- background: linear-gradient(90deg, transparent, #cbd5e1, #cbd5e1, transparent);
- margin: 16rpx 0 20rpx;
- width: 80%;
- margin-left: auto;
- margin-right: auto;
- }
-
- /* 提现记录区 - 无改动,自然贴底 */
- .history-section {
- flex: 1;
- display: flex;
- flex-direction: column;
- min-height: 0;
- margin-top: 0;
- }
- .history-header {
- display: flex;
- justify-content: space-between;
- align-items: baseline;
- padding: 0 8rpx 20rpx;
- flex-shrink: 0;
- }
- .history-title {
- font-size: 34rpx;
- font-weight: 600;
- color: #1e293b;
- }
- .history-settings {
- font-size: 28rpx;
- color: #3b82f6;
- }
- .history-scroll {
- flex: 1;
- width: 100%;
- padding: 0 20rpx;
- box-sizing: border-box;
- }
- .history-item {
- display: flex;
- align-items: center;
- padding: 28rpx 0;
- border-bottom: 1rpx solid rgba(0,0,0,0.05);
- }
- .history-info {
- width: 160rpx;
- }
- .history-amount {
- font-size: 36rpx;
- font-weight: 700;
- color: #1e293b;
- display: block;
- }
- .history-time {
- font-size: 22rpx;
- color: #94a3b8;
- }
- .history-detail {
- flex: 1;
- padding: 0 20rpx;
- }
- .history-method {
- font-size: 30rpx;
- color: #334155;
- display: block;
- margin-bottom: 6rpx;
- }
- .history-type {
- font-size: 24rpx;
- color: #94a3b8;
- }
- .history-status {
- text-align: right;
- }
- .status-badge {
- font-size: 26rpx;
- font-weight: 500;
- padding: 6rpx 14rpx;
- border-radius: 30rpx;
- display: inline-block;
- }
- .status-wait {
- color: #f59e0b;
- background: rgba(245,158,11,0.1);
- }
- .status-done {
- color: #10b981;
- background: rgba(16,185,129,0.1);
- }
- .status-fail {
- color: #ef4444;
- background: rgba(239,68,68,0.1);
- }
- .fail-link {
- margin-left: 8rpx;
- text-decoration: underline;
- }
- .load-tip, .more-tip {
- text-align: center;
- padding: 30rpx;
- font-size: 24rpx;
- color: #94a3b8;
- }
- .load-more-btn {
- margin: 16rpx 0 20rpx;
- padding: 20rpx;
- text-align: center;
- background: rgba(255,255,255,0.7);
- backdrop-filter: blur(8rpx);
- border-radius: 40rpx;
- font-size: 28rpx;
- color: #3b82f6;
- border: 1rpx solid rgba(255,255,255,0.5);
- }
- .load-more-btn:active {
- background: rgba(255,255,255,0.9);
- }
- .safe-bottom {
- height: 12rpx;
- flex-shrink: 0;
- }
-
- /* ========== 弹窗样式(完整保留) ========== */
- .modal-mask {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background: rgba(0,0,0,0.5);
- display: flex;
- align-items: center;
- justify-content: center;
- z-index: 1000;
- }
- .modal-dialog {
- width: 600rpx;
- background: rgba(255,255,255,0.96);
- backdrop-filter: blur(20rpx);
- border-radius: 48rpx;
- overflow: hidden;
- box-shadow: 0 20rpx 40rpx rgba(0,0,0,0.1);
- border: 1rpx solid rgba(255,255,255,0.6);
- }
- .modal-header {
- padding: 36rpx 32rpx 20rpx;
- font-size: 36rpx;
- font-weight: 700;
- border-bottom: 1rpx solid rgba(0,0,0,0.05);
- }
- .modal-body {
- padding: 32rpx;
- }
- .info-row, .amount-row, .method-row {
- display: flex;
- justify-content: space-between;
- margin-bottom: 24rpx;
- font-size: 28rpx;
- }
- .amount-row input {
- border: 1rpx solid rgba(0,0,0,0.1);
- border-radius: 28rpx;
- padding: 16rpx 20rpx;
- width: 260rpx;
- background: rgba(255,255,255,0.9);
- }
- .quick-row {
- display: flex;
- gap: 16rpx;
- margin: 24rpx 0;
- }
- .quick-chip {
- flex: 1;
- background: rgba(241,245,249,0.8);
- text-align: center;
- padding: 12rpx;
- border-radius: 40rpx;
- font-size: 28rpx;
- }
- .fee-row {
- display: flex;
- justify-content: space-between;
- background: rgba(248,250,252,0.8);
- padding: 20rpx;
- border-radius: 28rpx;
- margin: 20rpx 0;
- }
- .link-text {
- color: #3b82f6;
- }
- .toggle-row {
- display: flex;
- gap: 20rpx;
- margin-bottom: 28rpx;
- }
- .toggle-item {
- flex: 1;
- text-align: center;
- padding: 20rpx;
- border: 1rpx solid rgba(0,0,0,0.08);
- border-radius: 30rpx;
- background: rgba(255,255,255,0.8);
- }
- .toggle-item.active {
- border-color: #3b82f6;
- background: #eff6ff;
- }
- .field-input {
- width: 100%;
- border: 1rpx solid rgba(0,0,0,0.08);
- border-radius: 28rpx;
- padding: 20rpx;
- margin-bottom: 20rpx;
- box-sizing: border-box;
- background: rgba(255,255,255,0.9);
- }
- .upload-trigger {
- background: rgba(241,245,249,0.8);
- border: 1rpx dashed #cbd5e1;
- border-radius: 28rpx;
- padding: 28rpx;
- text-align: center;
- }
- .image-preview {
- margin-top: 16rpx;
- position: relative;
- }
- .image-preview image {
- width: 100%;
- height: 200rpx;
- border-radius: 28rpx;
- }
- .image-actions {
- display: flex;
- justify-content: space-around;
- background: rgba(0,0,0,0.6);
- padding: 12rpx;
- position: absolute;
- bottom: 0;
- left: 0;
- right: 0;
- color: white;
- border-bottom-left-radius: 28rpx;
- border-bottom-right-radius: 28rpx;
- }
- .current-img {
- margin: 20rpx 0;
- }
- .current-img image {
- width: 100%;
- height: 140rpx;
- border-radius: 24rpx;
- }
- .modal-footer {
- display: flex;
- border-top: 1rpx solid rgba(0,0,0,0.05);
- }
- .modal-btn {
- flex: 1;
- text-align: center;
- padding: 28rpx;
- font-size: 30rpx;
- }
- .modal-btn.cancel {
- color: #8f9bb3;
- border-right: 1rpx solid rgba(0,0,0,0.05);
- }
- .modal-btn.confirm {
- color: #3b82f6;
- }
\ No newline at end of file
+.method-card--row {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding-right: 24rpx;
+}
+
+.method-setting {
+ font-size: 26rpx;
+ color: #ff8c00;
+ flex-shrink: 0;
+ padding: 16rpx 8rpx;
+}
+
+.method-tab-icon--placeholder {
+ background: #e0e0e0;
+ border-radius: 8rpx;
+}
+
+.skfs-body .toggle-row {
+ display: flex;
+ gap: 16rpx;
+ margin-bottom: 24rpx;
+}
+
+.toggle-item {
+ flex: 1;
+ text-align: center;
+ padding: 20rpx;
+ border-radius: 12rpx;
+ background: #f5f5f5;
+ font-size: 28rpx;
+ color: #666;
+}
+
+.toggle-item.active {
+ background: #fff8e1;
+ color: #ff8c00;
+ font-weight: 600;
+ border: 2rpx solid #FFD54F;
+}
+
+.field-input {
+ width: 100%;
+ box-sizing: border-box;
+ padding: 24rpx;
+ margin-bottom: 16rpx;
+ background: #f8f8f8;
+ border-radius: 12rpx;
+ font-size: 28rpx;
+}
+
+.upload-wrap {
+ margin-top: 16rpx;
+}
+
+.upload-trigger {
+ padding: 48rpx;
+ text-align: center;
+ border: 2rpx dashed #ddd;
+ border-radius: 12rpx;
+ color: #999;
+ font-size: 28rpx;
+}
+
+.image-preview {
+ position: relative;
+}
+
+.image-preview image {
+ width: 100%;
+ height: 320rpx;
+ border-radius: 12rpx;
+}
+
+.image-actions {
+ display: flex;
+ justify-content: center;
+ gap: 32rpx;
+ margin-top: 16rpx;
+ font-size: 28rpx;
+ color: #ff8c00;
+}
diff --git a/pages/withdraw/components/mode2/mode2.js b/pages/withdraw/components/mode2/mode2.js
index ee9b6d5..b393f71 100644
--- a/pages/withdraw/components/mode2/mode2.js
+++ b/pages/withdraw/components/mode2/mode2.js
@@ -1,21 +1,8 @@
-// pages/withdraw/components/mode2/mode2.js
-// UI 与 mode1 完全一致,业务逻辑为自动打款审核收款
+// pages/withdraw/components/mode2/mode2.js — 自动打款纯提现
import request from '../../../../utils/request.js';
import PopupService from '../../../../services/popupService.js';
const app = getApp();
-const yemianshuju = 5;
-let lastPullDownTime = 0;
-const PULL_DOWN_INTERVAL = 2000;
-
-const TX_STATUS = {
- SHENHEZHONG: 1,
- TIXIAN_CHENGGONG: 2,
- TIXIAN_SHIBAI: 3,
- SHENHE_CHENGGONG: 4,
- SHENHE_SHIBAI: 5,
- DAI_SHOUKUAN: 6,
-};
const ASSET_CONFIG = {
dashou_yue: { leixing: 1, label: '接单员佣金' },
@@ -26,58 +13,41 @@ const ASSET_CONFIG = {
shangjia_yue: { leixing: 6, label: '商家余额' },
};
-const LEIXING_LABEL = {
- 1: '接单员佣金', 2: '管事分红', 3: '组长分红',
- 4: '考核官分佣', 5: '接单员保证金', 6: '商家余额',
+/** 页面入参 from 与资产 type 映射 */
+const FROM_ASSET_MAP = {
+ dashou: 'dashou_yue',
+ guanshi: 'guanshi_fenyong',
+ zuzhang: 'zuzhang_fenyong',
+ kaoheguan: 'kaoheguan_fenyong',
+ kaohe: 'kaoheguan_fenyong',
+ shangjia: 'shangjia_yue',
+ yajin: 'dashou_yajin',
};
Component({
properties: { options: { type: Object, value: {} } },
data: {
- imgUrls: {
- pageBg: '', cardBg: '', assetTileBg: '',
- },
+ imgUrls: { iconWechat: '' },
assetList: [],
+ displayAssetList: [],
totalAmount: '0.00',
+ canWithdraw: false,
selectedAsset: null,
isLoadingAssets: false,
tixianleixing: null,
tixianjine: '',
currentRate: '0.00',
+ feeRateText: '--',
showTixian: false,
- recordList: [],
- page: 1,
- loading: false,
- nomore: false,
- canloadmore: true,
- isRefreshing: false,
shouxufei: '0.00',
shijidaozhang: '0.00',
- currentTixianId: null,
submitting: false,
- mchId: '',
- currentStatusFilter: 0,
- statusTabs: [
- { value: 0, label: '全部' },
- { value: 1, label: '审核中' },
- { value: 6, label: '待收款' },
- { value: 4, label: '审核成功' },
- { value: 5, label: '审核失败' },
- { value: 2, label: '提现成功' },
- { value: 3, label: '提现失败' },
- ],
- hasPendingCollect: false,
- showCollectConfirm: false,
- collectConfirmRecord: null,
- showDetailModal: false,
- detailTitle: '',
- detailContent: '',
},
lifetimes: {
attached() {
this.initImageUrls();
- this.chushihuashuju();
- }
+ this.loadAllAssets();
+ },
},
pageLifetimes: {
show() {
@@ -88,7 +58,7 @@ Component({
hide() {
const popupComp = this.selectComponent('#popupNotice');
if (popupComp && popupComp.cleanup) popupComp.cleanup();
- }
+ },
},
methods: {
registerNotificationComponent() {
@@ -96,127 +66,11 @@ Component({
if (notificationComp && notificationComp.showNotification) {
app.globalData.globalNotification = {
show: (data) => notificationComp.showNotification(data),
- hide: () => notificationComp.hideNotification()
+ hide: () => notificationComp.hideNotification(),
};
}
},
- initImageUrls() {
- const ossBase = app.globalData.ossImageUrl || '';
- const imgDir = `${ossBase}beijing/tixian/`;
- this.setData({
- imgUrls: {
- pageBg: `${imgDir}page_bg.png`,
- cardBg: `${imgDir}card_bg.png`,
- assetTileBg: `${imgDir}asset_tile_bg.png`,
- }
- });
- },
-
- parseZhuangtai(item) {
- const raw = item.zhuangtai ?? item.status ?? item.state;
- const n = parseInt(raw, 10);
- return Number.isNaN(n) ? -1 : n;
- },
-
- /** 规范化列表字段(兼容后端多种命名 / 嵌套 audit) */
- normalizeRecordFields(item) {
- const audit = item.audit || item.shenhe || item.shenhe_info || {};
- const shenheJiluId = item.shenhe_jilu_id ?? item.shenheJiluId
- ?? item.audit_id ?? item.shenheid ?? audit.id ?? audit.shenhe_jilu_id ?? null;
- const shenheDanhao = String(
- item.shenhe_danhao || item.shenheDanhao || item.audit_shenhe_danhao
- || audit.shenhe_danhao || audit.danhao || ''
- ).trim();
- const tixianjiluId = item.tixianjilu_id ?? item.tixianjiluId ?? item.id ?? null;
- const zhuangtai = this.parseZhuangtai(item);
- return {
- ...item,
- zhuangtai: zhuangtai >= 0 ? zhuangtai : item.zhuangtai,
- shenhe_jilu_id: shenheJiluId,
- shenhe_danhao: shenheDanhao,
- tixianjilu_id: tixianjiluId,
- };
- },
-
- hasAuditJiluId(item) {
- const id = item.shenhe_jilu_id;
- return id !== null && id !== undefined && id !== '' && id !== 0 && id !== '0';
- },
-
- hasShenheDanhao(item) {
- return !!(item.shenhe_danhao && String(item.shenhe_danhao).trim());
- },
-
- isNewAuditRecord(item) {
- return this.hasAuditJiluId(item) && this.hasShenheDanhao(item);
- },
-
- /** 待收款是否可点击:状态6 + 审核记录ID + 审核单号 缺一不可 */
- canCollectRecord(item) {
- return this.parseZhuangtai(item) === TX_STATUS.DAI_SHOUKUAN
- && this.hasAuditJiluId(item)
- && this.hasShenheDanhao(item);
- },
-
- getLeixingLabel(leixing) {
- return LEIXING_LABEL[parseInt(leixing)] || '提现';
- },
-
- getStatusBadgeClass(status) {
- switch (parseInt(status)) {
- case TX_STATUS.SHENHEZHONG: return 'status-wait';
- case TX_STATUS.TIXIAN_CHENGGONG:
- case TX_STATUS.SHENHE_CHENGGONG: return 'status-done';
- case TX_STATUS.DAI_SHOUKUAN: return 'status-pending';
- case TX_STATUS.TIXIAN_SHIBAI:
- case TX_STATUS.SHENHE_SHIBAI: return 'status-fail';
- default: return 'status-wait';
- }
- },
-
- processRecordItem(item) {
- item = this.normalizeRecordFields(item);
- const isNew = this.isNewAuditRecord(item);
- const status = this.parseZhuangtai(item);
- let statusText = '未知';
- let canCollect = false;
- let canShowDetail = false;
- let detailReason = '';
-
- switch (status) {
- case TX_STATUS.SHENHEZHONG: statusText = '审核中'; break;
- case TX_STATUS.TIXIAN_CHENGGONG: statusText = '提现成功'; break;
- case TX_STATUS.TIXIAN_SHIBAI:
- statusText = '提现失败';
- if (item.fail_reason || item.bhliyou) {
- canShowDetail = true;
- detailReason = item.fail_reason || item.bhliyou;
- }
- break;
- case TX_STATUS.SHENHE_CHENGGONG: statusText = '审核成功'; break;
- case TX_STATUS.SHENHE_SHIBAI:
- statusText = '审核失败';
- if (item.bhliyou) { canShowDetail = true; detailReason = item.bhliyou; }
- break;
- case TX_STATUS.DAI_SHOUKUAN:
- statusText = '待收款';
- canCollect = this.canCollectRecord(item);
- break;
- }
-
- return {
- ...item,
- isNewAudit: isNew,
- leixingLabel: this.getLeixingLabel(item.leixing),
- statusText,
- statusBadgeClass: this.getStatusBadgeClass(status),
- canCollect,
- canShowDetail,
- detailReason,
- };
- },
-
gengxinYue(data, leixing) {
if (!data) return;
if (data.new_yongjin !== undefined && data.new_yongjin !== null) {
@@ -239,51 +93,79 @@ Component({
}
},
- updatePendingCollectFlag(list) {
- const hasPending = (list || []).some(item => item.canCollect);
- if (hasPending !== this.data.hasPendingCollect) {
- this.setData({ hasPendingCollect: hasPending });
+ initImageUrls() {
+ const ossBase = app.globalData.ossImageUrl || '';
+ const imgDir = `${ossBase}beijing/tixian/`;
+ this.setData({
+ imgUrls: {
+ iconWechat: `${imgDir}icon_wechat.png`,
+ },
+ });
+ },
+
+ /** 顶部展示:不含保证金的可提现合计 */
+ calcDisplayTotal(assets) {
+ let total = 0;
+ (assets || []).forEach((item) => {
+ if (item.type === 'dashou_yajin') return;
+ total += parseFloat(item.amount) || 0;
+ });
+ return total;
+ },
+
+ hasAnyWithdrawable(assets) {
+ return (assets || []).some((item) => parseFloat(item.amount) > 0);
+ },
+
+ applyRouteOptions(assets) {
+ const opts = this.properties.options || {};
+ const fromKey = FROM_ASSET_MAP[opts.from];
+ let selected = null;
+ if (fromKey) {
+ selected = assets.find((a) => a.type === fromKey) || null;
+ } else if (assets.length === 1) {
+ selected = assets[0];
+ }
+ const patch = {};
+ if (selected) {
+ patch.selectedAsset = selected;
+ patch.tixianleixing = selected.leixing;
+ patch.feeRateText = selected.rateText;
+ }
+ if (opts.amount && parseFloat(opts.amount) > 0) {
+ const amt = parseFloat(opts.amount);
+ const max = selected ? parseFloat(selected.amount) : amt;
+ patch.tixianjine = Math.min(amt, max).toFixed(2);
+ }
+ if (Object.keys(patch).length) {
+ this.setData(patch, () => {
+ this.recalcFee(this.data.tixianjine, this.data.selectedAsset);
+ });
}
},
- /** 微信确认收款成功后,本地先把对应记录标为「提现成功」 */
- markLocalRecordWithdrawSuccess(record) {
- if (!record) return;
- const matchId = String(record.tixianjilu_id || record.id || '');
- const matchDanhao = String(record.shenhe_danhao || '').trim();
- if (!matchId && !matchDanhao) return;
-
- const newList = (this.data.recordList || []).map((item) => {
- const itemId = String(item.tixianjilu_id || item.id || '');
- const itemDanhao = String(item.shenhe_danhao || '').trim();
- const isMatch = (matchId && itemId === matchId)
- || (matchDanhao && itemDanhao === matchDanhao);
- if (!isMatch) return item;
- return this.processRecordItem({
- ...item,
- zhuangtai: TX_STATUS.TIXIAN_CHENGGONG,
- });
- });
- this.setData({ recordList: newList });
- this.updatePendingCollectFlag(newList);
- },
-
- async finishWxCollectSuccess(record) {
- this.markLocalRecordWithdrawSuccess(record);
- await this.loadAllAssets();
- await this.huoquJilu(true, true);
- // 后端若尚未落库,刷新后仍可能显示待收款,再覆盖一次本地成功态
- this.markLocalRecordWithdrawSuccess(record);
- PopupService.checkAndShow(this, 'tixianchenggong');
- wx.showToast({
- title: '提现成功',
- icon: 'success',
- duration: 3000,
+ onSelectAsset(e) {
+ const index = e.currentTarget.dataset.index;
+ const asset = this.data.displayAssetList[index];
+ if (!asset || parseFloat(asset.amount) <= 0) {
+ wx.showToast({ title: '该账户无可提余额', icon: 'none' });
+ return;
+ }
+ let jine = this.data.tixianjine;
+ const max = parseFloat(asset.amount);
+ if (jine && parseFloat(jine) > max) {
+ jine = asset.amount;
+ }
+ this.setData({
+ selectedAsset: asset,
+ tixianleixing: asset.leixing,
+ tixianjine: jine,
});
+ this.recalcFee(jine, asset);
},
async loadAllAssets() {
- this.setData({ isLoadingAssets: true });
+ this.setData({ isLoadingAssets: true, totalAmount: '0.00', canWithdraw: false, assetList: [] });
try {
const res = await request({ url: '/yonghu/tixianzichan', method: 'POST' });
if (res?.data?.code === 200 || res?.data?.code === 0) {
@@ -298,6 +180,7 @@ Component({
label: cfg.label,
amount: parseFloat(amount).toFixed(2),
rate: rate || 0,
+ rateText: this.formatRatePercent(rate || 0),
});
};
pushAsset('dashou_yue', data.dashou_yue, data.dashou_rate);
@@ -307,63 +190,114 @@ Component({
pushAsset('zuzhang_fenyong', data.zuzhang_fenyong, data.zuzhang_rate);
pushAsset('kaoheguan_fenyong', data.kaoheguan_fenyong, data.kaoheguan_rate);
- let total = 0;
- assets.forEach(item => { total += parseFloat(item.amount); });
- this.setData({ assetList: assets, totalAmount: total.toFixed(2), isLoadingAssets: false });
+ const displayTotal = this.calcDisplayTotal(assets);
+ const firstRate = assets.find((a) => a.type !== 'dashou_yajin')?.rate || 0;
+ this.setData({
+ assetList: assets,
+ displayAssetList: assets,
+ totalAmount: displayTotal.toFixed(2),
+ canWithdraw: this.hasAnyWithdrawable(assets),
+ isLoadingAssets: false,
+ feeRateText: displayTotal > 0 ? this.formatRatePercent(firstRate) : '--',
+ }, () => this.applyRouteOptions(assets));
+ if (!this.data.selectedAsset) {
+ this.recalcFee(this.data.tixianjine, null);
+ }
} else {
throw new Error(res?.data?.msg || '获取资产失败');
}
} catch (err) {
console.error('loadAllAssets', err);
- this.setData({ isLoadingAssets: false });
+ this.setData({ isLoadingAssets: false, totalAmount: '0.00', canWithdraw: false, assetList: [] });
}
},
- chushihuashuju() {
- this.loadAllAssets();
- this.huoquJilu(true);
+ formatRatePercent(rate) {
+ const r = parseFloat(rate) || 0;
+ if (r <= 1 && r > 0) return `${(r * 100).toFixed(0)}%`;
+ return `${r}%`;
},
- /** 点击资产卡片(与 mode1 一致) */
- onSelectAsset(e) {
- const index = e.currentTarget.dataset.index;
- const asset = this.data.assetList[index];
- if (!asset || parseFloat(asset.amount) <= 0) {
- wx.showToast({ title: '无可提现金额', icon: 'none' });
+ recalcFee(amountStr, asset) {
+ const amount = parseFloat(amountStr);
+ if (!amountStr || isNaN(amount) || amount <= 0 || !asset) {
+ this.setData({
+ shouxufei: '0.00',
+ shijidaozhang: '0.00',
+ feeRateText: asset ? this.formatRatePercent(asset.rate) : this.data.feeRateText,
+ });
return;
}
+ const rate = parseFloat(asset.rate) || 0;
+ const fee = amount * rate;
+ const actual = amount - fee;
this.setData({
- selectedAsset: asset,
- tixianleixing: asset.leixing,
- currentRate: asset.rate,
- tixianjine: '',
- shouxufei: '0.00',
- shijidaozhang: '0.00',
- showTixian: true,
+ shouxufei: fee.toFixed(2),
+ shijidaozhang: actual.toFixed(2),
+ feeRateText: this.formatRatePercent(rate),
+ currentRate: this.formatRatePercent(rate),
});
},
onJineInput(e) {
- this.setData({ tixianjine: e.detail.value, shouxufei: '0.00', shijidaozhang: '0.00' });
+ const val = e.detail.value;
+ this.setData({ tixianjine: val });
+ this.recalcFee(val, this.data.selectedAsset);
},
- onQuickAmountTap(e) {
- const value = e.currentTarget.dataset.value;
- this.setData({ tixianjine: value.toString(), shouxufei: '0.00', shijidaozhang: '0.00' });
+ onWithdrawAll() {
+ const { selectedAsset } = this.data;
+ if (!selectedAsset) {
+ wx.showToast({ title: '请先选择提现账户', icon: 'none' });
+ return;
+ }
+ const max = selectedAsset.amount;
+ this.setData({ tixianjine: max });
+ this.recalcFee(max, selectedAsset);
},
- onStatusFilterTap(e) {
- const value = parseInt(e.currentTarget.dataset.value);
- if (value === this.data.currentStatusFilter) return;
- this.setData({ currentStatusFilter: value });
- this.huoquJilu(true);
+ onTapWithdraw() {
+ if (this.data.submitting) return;
+ if (!this.hasAnyWithdrawable(this.data.assetList)) {
+ wx.showToast({ title: '暂无可提现余额', icon: 'none' });
+ return;
+ }
+ const { selectedAsset, tixianjine } = this.data;
+ if (!selectedAsset) {
+ wx.showToast({ title: '请先选择要提现的账户', icon: 'none' });
+ return;
+ }
+ const jineValue = parseFloat(tixianjine);
+ if (!tixianjine || isNaN(jineValue) || jineValue <= 0) {
+ wx.showToast({ title: '请输入有效金额', icon: 'none' });
+ return;
+ }
+ if (jineValue <= 0.1) {
+ wx.showToast({ title: '提现金额须大于0.1元', icon: 'none' });
+ return;
+ }
+ if (jineValue > parseFloat(selectedAsset.amount)) {
+ wx.showToast({ title: `超过${selectedAsset.label}可提余额`, icon: 'none' });
+ return;
+ }
+ this.applyIdentityAndConfirm(selectedAsset);
+ },
+
+ applyIdentityAndConfirm(asset) {
+ this.recalcFee(this.data.tixianjine, asset);
+ this.setData({
+ selectedAsset: asset,
+ tixianleixing: asset.leixing,
+ currentRate: this.formatRatePercent(asset.rate),
+ showTixian: true,
+ });
},
async onConfirmTixian() {
if (this.data.submitting) return;
const { tixianleixing, tixianjine, selectedAsset } = this.data;
if (!tixianleixing || !selectedAsset) {
- wx.showToast({ title: '请选择提现类型', icon: 'none' });
+ wx.showToast({ title: '请选择提现身份', icon: 'none' });
return;
}
const jineValue = parseFloat(tixianjine);
@@ -372,7 +306,7 @@ Component({
return;
}
if (jineValue > parseFloat(selectedAsset.amount)) {
- wx.showToast({ title: `超过可提${selectedAsset.label}`, icon: 'none' });
+ wx.showToast({ title: `超过${selectedAsset.label}可提余额`, icon: 'none' });
return;
}
@@ -381,24 +315,30 @@ Component({
const res = await request({
url: '/yonghu/zddksh',
method: 'POST',
- data: { leixing: tixianleixing, jine: jineValue.toFixed(2) }
+ data: { leixing: tixianleixing, jine: jineValue.toFixed(2) },
});
if (res.statusCode === 200 && res.data && res.data.code === 0) {
const data = res.data.data || {};
this.gengxinYue(data, tixianleixing);
- if (data.shouxufei !== undefined) {
- this.setData({
- shouxufei: parseFloat(data.shouxufei || 0).toFixed(2),
- shijidaozhang: parseFloat(data.shijidaozhang || 0).toFixed(2),
- });
- }
- this.setData({ showTixian: false, submitting: false, selectedAsset: null });
+ this.setData({
+ showTixian: false,
+ submitting: false,
+ selectedAsset: null,
+ tixianjine: '',
+ shouxufei: '0.00',
+ shijidaozhang: '0.00',
+ });
await this.loadAllAssets();
- this.huoquJilu(true);
wx.showModal({
- title: '申请已提交',
- content: '您的提现申请已提交,请等待后台审核。审核通过后,请在本页「提现记录」中点击「收款」按钮,主动确认后才能到账微信零钱。',
- showCancel: false,
+ title: '申请成功',
+ content: '提现申请已提交,请前往「提现记录」查看进度;审核通过后可在该页点击「收款」确认到账。',
+ confirmText: '查看提现记录',
+ cancelText: '知道了',
+ success: (res) => {
+ if (res.confirm) {
+ wx.navigateTo({ url: '/pages/withdraw/withdraw-records' });
+ }
+ },
});
} else {
wx.showModal({ title: '提现申请失败', content: res.data?.msg || '未知错误', showCancel: false });
@@ -410,233 +350,20 @@ Component({
}
},
- onCollectTap(e) {
- const index = e.currentTarget.dataset.index;
- const record = this.data.recordList[index];
- if (!record) return;
- if (this.parseZhuangtai(record) !== TX_STATUS.DAI_SHOUKUAN) {
- wx.showToast({ title: '当前状态不可收款', icon: 'none' });
- return;
- }
- if (!this.hasShenheDanhao(record) || !this.hasAuditJiluId(record)) {
- wx.showToast({ title: '审核信息不完整,请刷新后重试', icon: 'none' });
- return;
- }
+ onCloseTixian() {
if (this.data.submitting) {
wx.showToast({ title: '正在处理中,请稍后', icon: 'none' });
return;
}
- this.setData({ showCollectConfirm: true, collectConfirmRecord: record });
- },
-
- onCloseCollectConfirm() {
- if (this.data.submitting) return;
- this.setData({ showCollectConfirm: false, collectConfirmRecord: null });
- },
-
- async onConfirmCollect() {
- if (this.data.submitting) return;
- let record = this.data.collectConfirmRecord;
- if (!record) return;
-
- if (!this.canCollectRecord(record)) {
- await this.huoquJilu(true, true);
- const refreshed = (this.data.recordList || []).find(
- r => String(r.id) === String(record.id)
- || String(r.tixianjilu_id) === String(record.tixianjilu_id)
- );
- if (refreshed) record = refreshed;
- }
- if (!this.canCollectRecord(record)) {
- wx.showModal({
- title: '暂时无法收款',
- content: '缺少审核单号或审核记录ID,请下拉刷新后重试。仍不行请联系客服。',
- showCancel: false,
- });
- return;
- }
-
- this.setData({ showCollectConfirm: false, submitting: true, collectConfirmRecord: record });
- try {
- const res = await request({
- url: '/yonghu/tixiansq',
- method: 'POST',
- data: {
- shenhe_danhao: record.shenhe_danhao,
- shenhe_jilu_id: record.shenhe_jilu_id || '',
- tixianjilu_id: record.tixianjilu_id || record.id || '',
- leixing: record.leixing,
- }
- });
- if (res.statusCode === 200 && res.data && res.data.code === 0) {
- const data = res.data.data;
- this.setData({
- currentTixianId: data.tixian_id,
- mchId: data.mch_id || '',
- collectConfirmRecord: record,
- });
- this.tiaoqiWeixinQueRen(data.package_info);
- } else {
- wx.showModal({ title: '收款失败', content: res.data?.msg || '无法发起收款,请稍后重试', showCancel: false });
- this.setData({ submitting: false, collectConfirmRecord: null });
- }
- } catch (err) {
- wx.showModal({ title: '网络错误', content: '网络连接失败,请稍后重试', showCancel: false });
- this.setData({ submitting: false, collectConfirmRecord: null });
- }
- },
-
- tiaoqiWeixinQueRen(packageInfo) {
- const appId = app.globalData.appId;
- const mchId = this.data.mchId;
- if (!appId || !mchId) {
- wx.showModal({ title: '配置错误', content: '无法调起收款,请联系客服', showCancel: false });
- this.setData({ submitting: false, collectConfirmRecord: null });
- return;
- }
- wx.requestMerchantTransfer({
- appId, mchId, package: packageInfo,
- success: () => { this.tongzhiHouduanQueRen(1); },
- fail: () => {
- this.tongzhiHouduanQueRen(0);
- wx.showModal({
- title: '确认收款失败',
- content: '微信收款确认失败,您可在记录中再次点击「收款」重试。',
- showCancel: false,
- });
- }
- });
- },
-
- async tongzhiHouduanQueRen(result) {
- if (!this.data.currentTixianId) {
- this.setData({ submitting: false, collectConfirmRecord: null });
- return;
- }
- const record = this.data.collectConfirmRecord;
- const wxConfirmed = result === 1;
-
- try {
- const res = await request({
- url: '/yonghu/tixianqr',
- method: 'POST',
- data: {
- tixian_id: this.data.currentTixianId,
- result: result,
- shenhe_danhao: record ? record.shenhe_danhao : '',
- shenhe_jilu_id: record ? (record.shenhe_jilu_id || '') : '',
- tixianjilu_id: record ? (record.tixianjilu_id || record.id || '') : '',
- leixing: record ? record.leixing : '',
- }
- });
- if (res.statusCode === 200 && res.data && res.data.code === 0) {
- const data = res.data.data || {};
- this.gengxinYue(data, record ? record.leixing : null);
- }
-
- // 微信已确认收款:不论 tixianqr 返回什么,都刷新列表,不弹系统异常
- if (wxConfirmed) {
- await this.finishWxCollectSuccess(record);
- } else if (res.statusCode === 200 && res.data && res.data.code === 0) {
- await this.loadAllAssets();
- this.huoquJilu(true);
- wx.showToast({
- title: '收款已取消',
- icon: 'none',
- duration: 3000,
- });
- } else {
- wx.showModal({
- title: '确认状态失败',
- content: res.data?.msg || '操作失败',
- showCancel: false,
- });
- }
- } catch (err) {
- if (wxConfirmed) {
- await this.finishWxCollectSuccess(record);
- } else {
- wx.showModal({
- title: '网络错误',
- content: '网络连接失败',
- showCancel: false,
- });
- }
- } finally {
- this.setData({ submitting: false, currentTixianId: null, collectConfirmRecord: null });
- }
- },
-
- onViewDetail(e) {
- const index = e.currentTarget.dataset.index;
- const record = this.data.recordList[index];
- if (!record || !record.canShowDetail) return;
- const status = parseInt(record.zhuangtai);
- let detailTitle = '失败原因';
- if (status === TX_STATUS.SHENHE_SHIBAI) detailTitle = '审核失败原因';
- else if (status === TX_STATUS.TIXIAN_SHIBAI) detailTitle = '提现失败原因';
this.setData({
- showDetailModal: true,
- detailTitle,
- detailContent: record.detailReason || '暂无详细信息',
+ showTixian: false,
+ selectedAsset: null,
+ tixianleixing: null,
+ shouxufei: '0.00',
+ shijidaozhang: '0.00',
});
},
- onCloseDetailModal() {
- this.setData({ showDetailModal: false, detailTitle: '', detailContent: '' });
- },
-
- onCloseTixian() {
- if (this.data.submitting) { wx.showToast({ title: '正在处理中,请稍后', icon: 'none' }); return; }
- this.setData({
- showTixian: false, selectedAsset: null, tixianleixing: null,
- tixianjine: '', shouxufei: '0.00', shijidaozhang: '0.00', submitting: false,
- });
- },
-
- async huoquJilu(fresh = false, force = false) {
- const now = Date.now();
- if (!force && now - lastPullDownTime < 2000 && !fresh) return;
- if (!force && (this.data.loading || this.data.isRefreshing)) return;
- const page = fresh ? 1 : this.data.page;
- if (fresh) this.setData({ nomore: false, canloadmore: true, isRefreshing: true });
- if (this.data.nomore && !fresh) return;
- this.setData({ loading: true });
- lastPullDownTime = now;
- try {
- const res = await request({
- url: '/yonghu/tixianjiluhq',
- method: 'POST',
- data: { page, limit: yemianshuju, mode: 2, zhuangtai: this.data.currentStatusFilter }
- });
- if (res.statusCode === 200 && res.data && res.data.code === 0) {
- const data = res.data.data;
- const processedList = (data.list || []).map(item => this.processRecordItem(item));
- const newList = fresh ? processedList : [...this.data.recordList, ...processedList];
- this.setData({
- recordList: newList,
- page: page + 1,
- nomore: !(data.has_more === true),
- canloadmore: data.has_more === true,
- loading: false,
- isRefreshing: false,
- });
- this.updatePendingCollectFlag(newList);
- } else {
- this.setData({ loading: false, isRefreshing: false });
- }
- } catch (err) {
- this.setData({ loading: false, isRefreshing: false });
- }
- },
-
- onReachBottom() {
- if (this.data.canloadmore && !this.data.nomore && !this.data.loading && !this.data.isRefreshing) {
- const now = Date.now();
- if (now - lastPullDownTime >= PULL_DOWN_INTERVAL) this.huoquJilu();
- }
- },
-
- stopPropagation() {}
- }
+ stopPropagation() {},
+ },
});
diff --git a/pages/withdraw/components/mode2/mode2.wxml b/pages/withdraw/components/mode2/mode2.wxml
index 9f1a5cb..a2081d6 100644
--- a/pages/withdraw/components/mode2/mode2.wxml
+++ b/pages/withdraw/components/mode2/mode2.wxml
@@ -1,113 +1,91 @@
-
-
-
-
-
-
-
-
- 可提总余额
- ¥{{totalAmount}}
-
-
- ← 左右滑动查看更多资产 →
-
-
-
-
- {{item.label}}
- ¥{{item.amount}}
- 费率 {{item.rate}}%
-
-
- 暂无可用资金
-
-
+
+
+
+
+
+
+ 微信零钱
+
-
-
-
-
-
-
- 您有审核通过的提现待收款,请点击「收款」按钮,在微信中主动确认后才能到账。
-
-
-
-
- {{item.label}}
+
+
+
+
+ {{item.label}}
+ ¥{{item.amount}}
-
-
-
-
- ¥{{item.jine}}
- {{item.create}}
-
-
- 微信零钱
- {{item.leixingLabel}}
-
-
-
-
- {{item.statusText}}
- 点击收款
-
-
- {{item.statusText}}
- 详情
-
- {{item.statusText}}
-
-
- 加载中...
- —— 没有更多了 ——
- 加载更多记录
- 暂无提现记录
-
+ 请先选择上方提现账户
+ 当前:{{selectedAsset.label}}
-
+
+
+
+ 当前可提现:
+ ¥
+ {{selectedAsset ? selectedAsset.amount : totalAmount}}
+
+
+ ¥
+
+ 全部提现
+
+
+
+ 提示:提现手续费
+ {{feeRateText}}
+ 。
+
+
+
+
+
+
+ 处理中...
+ 确认提现
+
+
+
+
+
+ 📢 提现须知
+ 🕒 提交后需等待后台审核,请耐心等待
+ 📌 审核通过后,请前往「提现记录」点击「收款」确认到账
+ 💰 每笔只能从单个账户提现,请先选择对应账户再填写金额
+ ✅ 提现方式仅支持微信零钱,暂不支持支付宝
+ 🎧 运营账户不足时暂时无法提现,请稍后再试或联系客服
+
-
+
-
+
- 提交后需等待审核,审核通过后请在本页点击「收款」确认到账
- 项目{{selectedAsset.label}}
+ 提交后需等待审核,审核通过后请在「提现记录」中点击「收款」确认到账
+ 身份{{selectedAsset.label}}
可提¥{{selectedAsset.amount}}
- 费率{{currentRate}}%
-
- 金额
-
-
-
- ¥{{item}}
-
+ 费率{{currentRate}}
+ 提现金额¥{{tixianjine}}
手续费 ¥{{shouxufei}}
到账 ¥{{shijidaozhang}}
@@ -120,33 +98,5 @@
-
-
-
-
-
- 审核已通过,{{collectConfirmRecord.leixingLabel}} ¥{{collectConfirmRecord.jine}}
- 请点击「去收款」,然后在微信弹窗中主动确认,资金才会打入您的微信零钱。
- 审核单号:{{collectConfirmRecord.shenhe_danhao}}
- 注意:审核通过≠已到账,必须您本人点击确认才能完成收款!
-
-
-
-
-
-
-
-
-
- {{detailContent}}
-
-
-
-
diff --git a/pages/withdraw/components/mode2/mode2.wxss b/pages/withdraw/components/mode2/mode2.wxss
index bbbe546..7fbbc66 100644
--- a/pages/withdraw/components/mode2/mode2.wxss
+++ b/pages/withdraw/components/mode2/mode2.wxss
@@ -1,408 +1,325 @@
-/* mode2 自动打款 - UI 完全复用 mode1 样式 */
-
page {
- background-color: #f5f7fb;
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
- height: 100%;
- }
-
- .app {
- display: flex;
- flex-direction: column;
- min-height: 100vh;
- padding: 0 24rpx 0;
- position: relative;
- z-index: 1;
- box-sizing: border-box;
- }
-
- .global-bg {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- z-index: -1;
- opacity: 0.1;
- object-fit: cover;
- filter: blur(1rpx);
- }
-
- .assets-section {
- margin-top: 24rpx;
- flex-shrink: 0;
- }
-
- .main-card {
- background: rgba(248, 250, 252, 0.88);
- backdrop-filter: blur(28rpx);
- -webkit-backdrop-filter: blur(28rpx);
- border-radius: 48rpx;
- padding: 30rpx 28rpx 24rpx;
- margin-bottom: 20rpx;
- box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.04);
- border: 1rpx solid rgba(255, 255, 255, 0.4);
- background-size: cover;
- }
-
- .balance-wrap {
- text-align: center;
- margin-bottom: 20rpx;
- }
- .balance-label {
- font-size: 28rpx;
- color: #0f172a;
- letter-spacing: 1px;
- display: block;
- margin-bottom: 10rpx;
- font-weight: 700;
- text-shadow: 0 1rpx 2rpx rgba(255,255,255,0.8);
- }
- .balance-value {
- font-size: 68rpx;
- font-weight: 800;
- color: #0f172a;
- font-family: 'DIN', monospace;
- letter-spacing: -1rpx;
- text-shadow: 0 1rpx 2rpx rgba(255,255,255,0.6);
- }
-
- .inner-divider {
- width: 60%;
- height: 2rpx;
- background: linear-gradient(90deg, transparent, #64748b, #64748b, transparent);
- margin: 0 auto 20rpx auto;
- border-radius: 2rpx;
- opacity: 0.9;
- }
-
- .assets-hint {
- display: block;
- text-align: center;
- font-size: 24rpx;
- color: #334155;
- margin-bottom: 14rpx;
- font-weight: 600;
- }
-
- .assets-scroll {
- width: 100%;
- white-space: nowrap;
- }
- .assets-track {
- display: inline-flex;
- gap: 16rpx;
- }
-
- .asset-tile {
- width: 170rpx;
- background: rgba(255, 255, 255, 0.75);
- backdrop-filter: blur(8rpx);
- border-radius: 28rpx;
- padding: 18rpx 12rpx;
- display: inline-flex;
- flex-direction: column;
- align-items: center;
- text-align: center;
- border: 1rpx solid rgba(255,255,255,0.5);
- box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.02);
- transition: all 0.2s;
- white-space: normal;
- background-size: cover;
- background-position: center;
- }
- .asset-tile:active {
- background: rgba(255, 255, 255, 0.9);
- transform: scale(0.98);
- }
- .asset-name {
- font-size: 24rpx;
- font-weight: 700;
- color: #1e293b;
- margin-bottom: 10rpx;
- text-shadow: 0 1rpx 1rpx rgba(255,255,255,0.5);
- }
- .asset-balance {
- font-size: 28rpx;
- font-weight: 800;
- color: #2d6a4f;
- font-family: monospace;
- margin-bottom: 6rpx;
- text-shadow: 0 1rpx 1rpx rgba(255,255,255,0.3);
- }
- .asset-fee {
- font-size: 20rpx;
- font-weight: 600;
- color: #475569;
- text-shadow: 0 1rpx 1rpx rgba(255,255,255,0.3);
- }
- .assets-empty {
- width: 400rpx;
- text-align: center;
- color: #a0abb9;
- padding: 40rpx 0;
- }
-
- .divider-line {
- height: 2rpx;
- background: linear-gradient(90deg, transparent, #cbd5e1, #cbd5e1, transparent);
- margin: 16rpx 0 20rpx;
- width: 80%;
- margin-left: auto;
- margin-right: auto;
- }
-
- .history-section {
- flex: 1;
- display: flex;
- flex-direction: column;
- min-height: 0;
- margin-top: 0;
- }
- .history-header {
- display: flex;
- justify-content: space-between;
- align-items: baseline;
- padding: 0 8rpx 20rpx;
- flex-shrink: 0;
- }
- .history-title {
- font-size: 34rpx;
- font-weight: 600;
- color: #1e293b;
- }
- .history-scroll {
- flex: 1;
- width: 100%;
- padding: 0 20rpx;
- box-sizing: border-box;
- }
- .history-item {
- display: flex;
- align-items: center;
- padding: 28rpx 0;
- border-bottom: 1rpx solid rgba(0,0,0,0.05);
- }
- .history-info { width: 160rpx; }
- .history-amount {
- font-size: 36rpx;
- font-weight: 700;
- color: #1e293b;
- display: block;
- }
- .history-time {
- font-size: 22rpx;
- color: #94a3b8;
- }
- .history-detail {
- flex: 1;
- padding: 0 20rpx;
- }
- .history-method {
- font-size: 30rpx;
- color: #334155;
- display: block;
- margin-bottom: 6rpx;
- }
- .history-type {
- font-size: 24rpx;
- color: #94a3b8;
- }
- .history-status { text-align: right; }
-
- .status-badge {
- font-size: 26rpx;
- font-weight: 500;
- padding: 6rpx 14rpx;
- border-radius: 30rpx;
- display: inline-block;
- }
- .status-wait {
- color: #f59e0b;
- background: rgba(245,158,11,0.1);
- }
- .status-done {
- color: #10b981;
- background: rgba(16,185,129,0.1);
- }
- .status-fail {
- color: #ef4444;
- background: rgba(239,68,68,0.1);
- }
- .status-pending {
- color: #3b82f6;
- background: rgba(59,130,246,0.1);
- }
- .fail-link {
- margin-left: 8rpx;
- text-decoration: underline;
- }
- .collect-tappable {
- display: inline-flex;
- flex-direction: column;
- align-items: center;
- gap: 4rpx;
- padding: 10rpx 18rpx;
- cursor: pointer;
- border: 2rpx solid rgba(59,130,246,0.35);
- box-shadow: 0 4rpx 12rpx rgba(59,130,246,0.15);
- }
- .collect-tappable:active {
- transform: scale(0.97);
- opacity: 0.9;
- }
- .collect-sub {
- font-size: 22rpx;
- font-weight: 700;
- color: #1d4ed8;
- text-decoration: underline;
- }
-
- .load-tip, .more-tip {
- text-align: center;
- padding: 30rpx;
- font-size: 24rpx;
- color: #94a3b8;
- }
- .load-more-btn {
- margin: 16rpx 0 20rpx;
- padding: 20rpx;
- text-align: center;
- background: rgba(255,255,255,0.7);
- backdrop-filter: blur(8rpx);
- border-radius: 40rpx;
- font-size: 28rpx;
- color: #3b82f6;
- border: 1rpx solid rgba(255,255,255,0.5);
- }
- .load-more-btn:active { background: rgba(255,255,255,0.9); }
- .safe-bottom { height: 12rpx; flex-shrink: 0; }
-
- /* 自动打款专属(少量追加) */
- .pending-tip {
- margin: 0 8rpx 16rpx;
- padding: 16rpx 20rpx;
- font-size: 24rpx;
- color: #1d4ed8;
- background: rgba(59,130,246,0.08);
- border-radius: 20rpx;
- line-height: 1.5;
- }
- .filter-scroll {
- width: 100%;
- white-space: nowrap;
- margin-bottom: 12rpx;
- }
- .filter-track {
- display: inline-flex;
- gap: 12rpx;
- padding: 0 8rpx;
- }
- .filter-chip {
- flex-shrink: 0;
- padding: 10rpx 22rpx;
- font-size: 24rpx;
- color: #64748b;
- background: rgba(255,255,255,0.8);
- border-radius: 30rpx;
- border: 1rpx solid rgba(0,0,0,0.06);
- }
- .filter-chip.active {
- color: #3b82f6;
- background: #eff6ff;
- border-color: #3b82f6;
- }
- .auto-tip {
- font-size: 24rpx;
- color: #3b82f6;
- margin-bottom: 20rpx;
- line-height: 1.5;
- }
- .warn-tip {
- font-size: 24rpx;
- color: #f59e0b;
- margin-top: 16rpx;
- font-weight: 600;
- }
-
- /* 弹窗(与 mode1 一致) */
- .modal-mask {
- position: fixed;
- top: 0; left: 0; right: 0; bottom: 0;
- background: rgba(0,0,0,0.5);
- display: flex;
- align-items: center;
- justify-content: center;
- z-index: 1000;
- }
- .modal-dialog {
- width: 600rpx;
- background: rgba(255,255,255,0.96);
- backdrop-filter: blur(20rpx);
- border-radius: 48rpx;
- overflow: hidden;
- box-shadow: 0 20rpx 40rpx rgba(0,0,0,0.1);
- border: 1rpx solid rgba(255,255,255,0.6);
- }
- .modal-header {
- padding: 36rpx 32rpx 20rpx;
- font-size: 36rpx;
- font-weight: 700;
- border-bottom: 1rpx solid rgba(0,0,0,0.05);
- }
- .modal-body {
- padding: 32rpx;
- font-size: 28rpx;
- color: #334155;
- line-height: 1.6;
- }
- .info-row, .amount-row {
- display: flex;
- justify-content: space-between;
- margin-bottom: 24rpx;
- font-size: 28rpx;
- }
- .amount-row input {
- border: 1rpx solid rgba(0,0,0,0.1);
- border-radius: 28rpx;
- padding: 16rpx 20rpx;
- width: 260rpx;
- background: rgba(255,255,255,0.9);
- }
- .quick-row {
- display: flex;
- gap: 16rpx;
- margin: 24rpx 0;
- }
- .quick-chip {
- flex: 1;
- background: rgba(241,245,249,0.8);
- text-align: center;
- padding: 12rpx;
- border-radius: 40rpx;
- font-size: 28rpx;
- }
- .fee-row {
- display: flex;
- justify-content: space-between;
- background: rgba(248,250,252,0.8);
- padding: 20rpx;
- border-radius: 28rpx;
- margin: 20rpx 0;
- }
- .modal-footer {
- display: flex;
- border-top: 1rpx solid rgba(0,0,0,0.05);
- }
- .modal-btn {
- flex: 1;
- text-align: center;
- padding: 28rpx;
- font-size: 30rpx;
- }
- .modal-btn.cancel {
- color: #8f9bb3;
- border-right: 1rpx solid rgba(0,0,0,0.05);
- }
- .modal-btn.confirm { color: #3b82f6; }
-
\ No newline at end of file
+ background: #f5f5f5;
+ min-height: 100vh;
+}
+
+.ref-page {
+ min-height: 100vh;
+ padding: 24rpx 24rpx 48rpx;
+ box-sizing: border-box;
+}
+
+/* 提现方式 Tab */
+.method-card {
+ background: #fff;
+ border-radius: 16rpx;
+ padding: 0 32rpx;
+ margin-bottom: 20rpx;
+}
+
+.method-tab {
+ display: inline-flex;
+ flex-direction: column;
+ align-items: center;
+ padding: 28rpx 16rpx 20rpx;
+ position: relative;
+}
+
+.method-tab-icon {
+ width: 48rpx;
+ height: 48rpx;
+ margin-bottom: 8rpx;
+}
+
+.method-tab-text {
+ font-size: 28rpx;
+ color: #333;
+ font-weight: 500;
+}
+
+.method-tab-line {
+ position: absolute;
+ bottom: 0;
+ left: 50%;
+ transform: translateX(-50%);
+ width: 80rpx;
+ height: 6rpx;
+ background: #FFD54F;
+ border-radius: 3rpx;
+}
+
+/* 账户选择 */
+.account-card {
+ background: #fff;
+ border-radius: 16rpx;
+ padding: 20rpx 16rpx 16rpx;
+ margin-bottom: 20rpx;
+}
+
+.account-scroll {
+ white-space: nowrap;
+ display: flex;
+ flex-direction: row;
+}
+
+.account-chip {
+ display: inline-flex;
+ flex-direction: column;
+ align-items: center;
+ padding: 16rpx 24rpx;
+ margin-right: 16rpx;
+ border-radius: 12rpx;
+ background: #f8f8f8;
+ border: 2rpx solid transparent;
+ min-width: 160rpx;
+}
+
+.account-chip--active {
+ background: #fffbeb;
+ border-color: #FFD54F;
+}
+
+.account-chip--disabled {
+ opacity: 0.45;
+}
+
+.chip-label {
+ font-size: 24rpx;
+ color: #666;
+ margin-bottom: 4rpx;
+}
+
+.chip-amount {
+ font-size: 28rpx;
+ color: #333;
+ font-weight: 600;
+}
+
+.account-warn {
+ display: block;
+ margin-top: 12rpx;
+ font-size: 24rpx;
+ color: #ff8c00;
+ padding: 0 8rpx;
+}
+
+.account-ok {
+ display: block;
+ margin-top: 12rpx;
+ font-size: 24rpx;
+ color: #888;
+ padding: 0 8rpx;
+}
+
+/* 金额卡片 */
+.amount-card {
+ background: #fff;
+ border-radius: 16rpx;
+ padding: 32rpx 32rpx 28rpx;
+ margin-bottom: 32rpx;
+}
+
+.avail-row {
+ display: flex;
+ align-items: baseline;
+ margin-bottom: 32rpx;
+}
+
+.avail-label {
+ font-size: 28rpx;
+ color: #333;
+}
+
+.avail-symbol {
+ font-size: 28rpx;
+ color: #ff8c00;
+ margin-left: 4rpx;
+}
+
+.avail-amount {
+ font-size: 32rpx;
+ color: #ff8c00;
+ font-weight: 700;
+}
+
+.input-row {
+ display: flex;
+ align-items: center;
+ padding-bottom: 8rpx;
+}
+
+.input-symbol {
+ font-size: 64rpx;
+ font-weight: 700;
+ color: #333;
+ line-height: 1;
+ margin-right: 8rpx;
+}
+
+.amount-input {
+ flex: 1;
+ font-size: 56rpx;
+ font-weight: 600;
+ color: #333;
+ height: 80rpx;
+ min-height: 80rpx;
+}
+
+.amount-placeholder {
+ color: #ccc;
+ font-size: 40rpx;
+ font-weight: 400;
+}
+
+.withdraw-all {
+ font-size: 28rpx;
+ color: #ff8c00;
+ padding: 8rpx 0 8rpx 16rpx;
+ flex-shrink: 0;
+}
+
+.input-divider {
+ height: 1rpx;
+ background: #eee;
+ margin: 16rpx 0 20rpx;
+}
+
+.fee-tip {
+ font-size: 26rpx;
+ color: #666;
+}
+
+.fee-highlight {
+ color: #ff8c00;
+ font-weight: 600;
+}
+
+/* 确认按钮 */
+.submit-wrap {
+ padding: 0 8rpx;
+ margin-bottom: 32rpx;
+}
+
+.confirm-btn {
+ width: 100%;
+ height: 96rpx;
+ background: linear-gradient(90deg, #FFD54F 0%, #FFB300 100%);
+ border-radius: 48rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 34rpx;
+ font-weight: 700;
+ color: #333;
+ box-shadow: 0 8rpx 20rpx rgba(255, 179, 0, 0.35);
+}
+
+.confirm-btn:active {
+ opacity: 0.92;
+ transform: scale(0.99);
+}
+
+.confirm-btn--disabled {
+ background: linear-gradient(90deg, #e0e0e0, #bdbdbd);
+ box-shadow: none;
+ color: #999;
+}
+
+/* 须知 */
+.notice-box {
+ background: #ebebeb;
+ border-radius: 16rpx;
+ padding: 28rpx 28rpx 32rpx;
+}
+
+.notice-title {
+ font-size: 28rpx;
+ color: #333;
+ font-weight: 600;
+ margin-bottom: 20rpx;
+}
+
+.notice-item {
+ font-size: 26rpx;
+ color: #555;
+ line-height: 1.7;
+ margin-bottom: 8rpx;
+}
+
+/* 确认弹窗 */
+.modal-mask {
+ position: fixed;
+ inset: 0;
+ background: rgba(0, 0, 0, 0.5);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ z-index: 1001;
+}
+
+.modal-dialog {
+ width: 620rpx;
+ background: #fff;
+ border-radius: 20rpx;
+ overflow: hidden;
+}
+
+.modal-header {
+ padding: 32rpx;
+ font-size: 34rpx;
+ font-weight: 700;
+ text-align: center;
+ border-bottom: 1rpx solid #f0f0f0;
+}
+
+.modal-body {
+ padding: 32rpx;
+ font-size: 28rpx;
+ color: #333;
+}
+
+.auto-tip {
+ font-size: 24rpx;
+ color: #ff8c00;
+ margin-bottom: 20rpx;
+ line-height: 1.5;
+}
+
+.info-row {
+ display: flex;
+ justify-content: space-between;
+ margin-bottom: 16rpx;
+ font-size: 28rpx;
+}
+
+.fee-row {
+ display: flex;
+ justify-content: space-between;
+ background: #fff8e1;
+ padding: 20rpx;
+ border-radius: 12rpx;
+ margin-top: 16rpx;
+ color: #333;
+}
+
+.modal-footer {
+ display: flex;
+ border-top: 1rpx solid #f0f0f0;
+}
+
+.modal-btn {
+ flex: 1;
+ text-align: center;
+ padding: 28rpx;
+ font-size: 30rpx;
+}
+
+.modal-btn.cancel {
+ color: #999;
+ border-right: 1rpx solid #f0f0f0;
+}
+
+.modal-btn.confirm {
+ color: #ff8c00;
+ font-weight: 600;
+}
diff --git a/pages/withdraw/components/record-mode1/record-mode1.js b/pages/withdraw/components/record-mode1/record-mode1.js
new file mode 100644
index 0000000..08598ab
--- /dev/null
+++ b/pages/withdraw/components/record-mode1/record-mode1.js
@@ -0,0 +1,243 @@
+// pages/withdraw/components/record-mode1/record-mode1.js
+// 子组件版本 - 完整代码,仅适配生命周期,业务逻辑不动
+
+import request from '../../../../utils/request.js';
+import upload from '../../../../utils/upload.js';
+import PopupService from '../../../../services/popupService.js';
+
+const app = getApp();
+const PAGE_SIZE = 10;
+let lastPullDownTime = 0;
+const PULL_DOWN_INTERVAL = 2000;
+
+Component({
+ data: {
+ imgUrls: {
+ pageBg: '',
+ cardBg: '',
+ iconWechat: '',
+ iconAlipay: '',
+ iconRecord: '',
+ iconRefresh: '',
+ },
+ assetList: [],
+ totalAmount: '0.00',
+ selectedAsset: null,
+ txfangshi: null,
+ txdianhua: '',
+ txzh: '',
+ txtupian: '',
+ ossImageUrl: '',
+ showTixianModal: false,
+ tixianAmount: '',
+ shouxufei: '0.00',
+ shijidaozhang: '0.00',
+ currentRate: '0.00',
+ recordList: [],
+ page: 1,
+ nomore: false,
+ loading: false,
+ isRefreshing: false,
+ canloadmore: true,
+ showSkfsModal: false,
+ tempTxfangshi: null,
+ tempTxPhone: '',
+ tempTxAccount: '',
+ tempTxImage: '',
+ choosingImage: false,
+ showModifyModal: false,
+ modifyingRecord: null,
+ modifyTxfangshi: null,
+ modifyTxPhone: '',
+ modifyTxAccount: '',
+ modifyTxImage: '',
+ modifyImageUrl: '',
+ showFailModal: false,
+ currentFailReason: '',
+ isLoading: false,
+ },
+
+ attached() {
+ this.initImageUrls();
+ this.loadWithdrawRecords(true);
+ },
+
+ pageLifetimes: {
+ show() {
+ this.registerNotification();
+ PopupService.checkAndShow(this, 'tixian');
+ },
+ hide() {
+ const popup = this.selectComponent('#popupNotice');
+ popup?.cleanup?.();
+ }
+ },
+
+ methods: {
+ onPullDownRefresh() {
+ return this.loadWithdrawRecords(true);
+ },
+
+ onLoadMoreFromScroll() {
+ this.loadMoreRecords();
+ },
+
+ loadMoreRecords() {
+ if (this.data.nomore) {
+ wx.showToast({ title: '没有更多记录了', icon: 'none' });
+ return;
+ }
+ if (this.data.loading) return;
+ this.loadWithdrawRecords();
+ },
+
+ initImageUrls() {
+ const ossBase = app.globalData.ossImageUrl || '';
+ const imgDir = `${ossBase}beijing/tixian/`;
+ this.setData({
+ imgUrls: {
+ pageBg: `${imgDir}page_bg.png`,
+ cardBg: `${imgDir}card_bg.png`,
+ iconWechat: `${imgDir}icon_wechat.png`,
+ iconAlipay: `${imgDir}icon_alipay.png`,
+ iconRecord: `${imgDir}icon_record.png`,
+ iconRefresh: `${imgDir}icon_refresh.png`,
+ assetTileBg: `${imgDir}asset_tile_bg.png`,
+ }
+ });
+ },
+
+ async loadWithdrawRecords(refresh = false) {
+ const now = Date.now();
+ if (now - lastPullDownTime < PULL_DOWN_INTERVAL && !refresh) return;
+ if (this.data.loading || this.data.isRefreshing) return;
+ const page = refresh ? 1 : this.data.page;
+ if (this.data.nomore && !refresh) return;
+ this.setData({ loading: true, isRefreshing: refresh });
+ lastPullDownTime = now;
+ try {
+ const res = await request({ url: '/yonghu/tixianjiluhq', method: 'POST', data: { page, limit: PAGE_SIZE } });
+ if (res?.data?.code === 0) {
+ const list = (res.data.data.list || []).map(item => ({
+ ...item,
+ statusText: this.getStatusText(item.zhuangtai),
+ statusColor: this.getStatusColor(item.zhuangtai)
+ }));
+ const newList = refresh ? list : [...this.data.recordList, ...list];
+ const hasMore = res.data.data.has_more === true;
+ this.setData({
+ recordList: newList, page: page + 1, nomore: !hasMore, canloadmore: hasMore,
+ loading: false, isRefreshing: false
+ });
+ } else {
+ this.setData({ loading: false, isRefreshing: false });
+ }
+ } catch (err) {
+ this.setData({ loading: false, isRefreshing: false });
+ }
+ },
+
+ onModifyRecord(e) {
+ const record = e.currentTarget.dataset.record;
+ if (parseInt(record.zhuangtai) !== 1) {
+ wx.showToast({ title: '只有审核中的记录可修改', icon: 'none' });
+ return;
+ }
+ this.setData({
+ modifyingRecord: record,
+ modifyTxfangshi: record.fangshi,
+ modifyTxPhone: record.txdianhua || '',
+ modifyTxAccount: record.txzh || '',
+ modifyTxImage: '',
+ modifyImageUrl: record.txtupian ? (app.globalData.ossImageUrl + record.txtupian) : '',
+ showModifyModal: true
+ });
+ },
+
+ onSelectModifyFangshi(e) { this.setData({ modifyTxfangshi: e.currentTarget.dataset.fangshi }); },
+ onModifyPhoneInput(e) { this.setData({ modifyTxPhone: e.detail.value }); },
+ onModifyAccountInput(e) { this.setData({ modifyTxAccount: e.detail.value }); },
+
+ onChooseModifyImage() {
+ if (this.data.choosingImage) return;
+ this.setData({ choosingImage: true });
+ wx.chooseMedia({
+ count: 1, mediaType: ['image'],
+ success: (res) => { this.setData({ modifyTxImage: res.tempFiles[0].tempFilePath }); },
+ complete: () => { this.setData({ choosingImage: false }); }
+ });
+ },
+
+ onPreviewModifyImage() {
+ if (this.data.modifyTxImage) wx.previewImage({ urls: [this.data.modifyTxImage] });
+ else if (this.data.modifyImageUrl) wx.previewImage({ urls: [this.data.modifyImageUrl] });
+ },
+
+ onDeleteModifyImage() { this.setData({ modifyTxImage: '' }); },
+
+ async onConfirmModify() {
+ const { modifyTxfangshi, modifyTxPhone, modifyTxAccount, modifyTxImage, modifyingRecord } = this.data;
+ if (!modifyTxfangshi) { wx.showToast({ title: '请选择提现方式', icon: 'none' }); return; }
+ if (!modifyTxPhone) { wx.showToast({ title: '请输入收款人电话', icon: 'none' }); return; }
+ if (modifyTxfangshi == 1 && !modifyTxImage) { wx.showToast({ title: '请上传微信收款码', icon: 'none' }); return; }
+ if (modifyTxfangshi == 2 && !modifyTxAccount && !modifyTxImage) {
+ wx.showToast({ title: '请填写支付宝账号或上传收款码', icon: 'none' }); return;
+ }
+ const formData = { tixian_id: modifyingRecord.id, fangshi: modifyTxfangshi, txdianhua: modifyTxPhone, txzh: modifyTxAccount || '' };
+ try {
+ const res = await upload({ url: '/yonghu/yonghutxshxg', formData, filePath: modifyTxImage || null, fileName: 'file' });
+ if (res?.data?.code === 0) {
+ const data = res.data.data;
+ const newList = this.data.recordList.map(item => {
+ if (item.id === modifyingRecord.id) {
+ return { ...item, fangshi: modifyTxfangshi, txdianhua: modifyTxPhone, txzh: modifyTxAccount || '', txtupian: data.txtupian || modifyingRecord.txtupian };
+ }
+ return item;
+ });
+ this.setData({ recordList: newList, showModifyModal: false, modifyingRecord: null });
+ wx.showToast({ title: '修改成功', icon: 'success' });
+ } else {
+ wx.showToast({ title: res?.data?.msg || '修改失败', icon: 'none' });
+ }
+ } catch (err) {
+ wx.showToast({ title: '网络错误', icon: 'none' });
+ }
+ },
+
+ onCloseModifyModal() { this.setData({ showModifyModal: false, modifyingRecord: null }); },
+
+ onViewFailReason(e) {
+ const record = e.currentTarget.dataset.record;
+ const reason = record.fail_reason || record.shibaiyuanyin || '暂无详细信息';
+ this.setData({ currentFailReason: reason, showFailModal: true });
+ },
+
+ onCloseFailModal() { this.setData({ showFailModal: false }); },
+
+ getStatusText(zhuangtai) {
+ const s = parseInt(zhuangtai);
+ if (s === 1) return '审核中';
+ if (s === 2) return '成功';
+ if (s === 3) return '失败';
+ return '未知';
+ },
+ getStatusColor(zhuangtai) {
+ const s = parseInt(zhuangtai);
+ if (s === 1) return '#F5A623';
+ if (s === 2) return '#2ED158';
+ if (s === 3) return '#FF4D4F';
+ return '#999';
+ },
+
+ registerNotification() {
+ const comp = this.selectComponent('#global-notification');
+ if (comp?.showNotification) {
+ app.globalData.globalNotification = {
+ show: (data) => comp.showNotification(data),
+ hide: () => comp.hideNotification()
+ };
+ }
+ },
+ stopPropagation() {}
+ }
+});
\ No newline at end of file
diff --git a/pages/withdraw/components/record-mode1/record-mode1.json b/pages/withdraw/components/record-mode1/record-mode1.json
new file mode 100644
index 0000000..60741f8
--- /dev/null
+++ b/pages/withdraw/components/record-mode1/record-mode1.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "global-notification": "/components/global-notification/global-notification",
+ "popup-notice": "/components/popup-notice/popup-notice"
+ }
+}
diff --git a/pages/withdraw/components/record-mode1/record-mode1.wxml b/pages/withdraw/components/record-mode1/record-mode1.wxml
new file mode 100644
index 0000000..b8df4c1
--- /dev/null
+++ b/pages/withdraw/components/record-mode1/record-mode1.wxml
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
+ ¥{{item.jine}}
+ {{item.create}}
+
+
+ {{item.fangshi == 1 ? '微信' : '支付宝'}}
+ {{item.leixing == 1 ? '佣金' : (item.leixing == 2 ? '分红' : (item.leixing == 3 ? '组长' : (item.leixing == 4 ? '考核官' : '保证金')))}}
+
+
+ {{item.statusText}} ✏修改
+
+ {{item.statusText}}
+ 详情
+
+ {{item.statusText}}
+
+
+ 加载中...
+ —— 没有更多了 ——
+ 加载更多记录
+ 暂无提现记录
+
+
+
+
+
+
+
+
+
+
+ 微信支付宝
+
+
+ + 上传新图片预览删除
+
+
+
+
+
+
+
+
+ {{currentFailReason}}
+
+
+
+
+
+
diff --git a/pages/withdraw/components/record-mode1/record-mode1.wxss b/pages/withdraw/components/record-mode1/record-mode1.wxss
new file mode 100644
index 0000000..7341d35
--- /dev/null
+++ b/pages/withdraw/components/record-mode1/record-mode1.wxss
@@ -0,0 +1,67 @@
+@import "../record-mode2/record-mode2.wxss";
+
+.history-section--full {
+ flex: 1;
+ min-height: calc(100vh - 48rpx);
+ margin-top: 24rpx;
+}
+
+.history-section--full .history-scroll {
+ height: calc(100vh - 200rpx);
+}
+
+.toggle-row {
+ display: flex;
+ gap: 16rpx;
+ margin-bottom: 20rpx;
+}
+
+.toggle-item {
+ flex: 1;
+ text-align: center;
+ padding: 16rpx;
+ border-radius: 12rpx;
+ background: #f1f5f9;
+ font-size: 28rpx;
+ color: #64748b;
+}
+
+.toggle-item.active {
+ background: #eff6ff;
+ color: #3b82f6;
+ font-weight: 600;
+}
+
+.field-input {
+ width: 100%;
+ box-sizing: border-box;
+ padding: 20rpx;
+ border: 1rpx solid #e2e8f0;
+ border-radius: 12rpx;
+ margin-bottom: 16rpx;
+ font-size: 28rpx;
+}
+
+.upload-trigger {
+ padding: 40rpx;
+ text-align: center;
+ border: 2rpx dashed #cbd5e1;
+ border-radius: 12rpx;
+ color: #64748b;
+ font-size: 28rpx;
+}
+
+.image-preview image {
+ width: 100%;
+ height: 240rpx;
+ border-radius: 12rpx;
+}
+
+.image-actions {
+ display: flex;
+ gap: 24rpx;
+ justify-content: center;
+ margin-top: 12rpx;
+ font-size: 26rpx;
+ color: #3b82f6;
+}
diff --git a/pages/withdraw/components/record-mode2/record-mode2.js b/pages/withdraw/components/record-mode2/record-mode2.js
new file mode 100644
index 0000000..6d441ae
--- /dev/null
+++ b/pages/withdraw/components/record-mode2/record-mode2.js
@@ -0,0 +1,513 @@
+// pages/withdraw/components/record-mode2/record-mode2.js
+// UI 与 mode1 完全一致,业务逻辑为自动打款审核收款
+import request from '../../../../utils/request.js';
+import PopupService from '../../../../services/popupService.js';
+
+const app = getApp();
+const yemianshuju = 5;
+let lastPullDownTime = 0;
+const PULL_DOWN_INTERVAL = 2000;
+
+const TX_STATUS = {
+ SHENHEZHONG: 1,
+ TIXIAN_CHENGGONG: 2,
+ TIXIAN_SHIBAI: 3,
+ SHENHE_CHENGGONG: 4,
+ SHENHE_SHIBAI: 5,
+ DAI_SHOUKUAN: 6,
+};
+
+const ASSET_CONFIG = {
+ dashou_yue: { leixing: 1, label: '接单员佣金' },
+ guanshi_fenyong: { leixing: 2, label: '管事分红' },
+ zuzhang_fenyong: { leixing: 3, label: '组长分红' },
+ kaoheguan_fenyong: { leixing: 4, label: '考核官分佣' },
+ dashou_yajin: { leixing: 5, label: '接单员保证金' },
+ shangjia_yue: { leixing: 6, label: '商家余额' },
+};
+
+const LEIXING_LABEL = {
+ 1: '接单员佣金', 2: '管事分红', 3: '组长分红',
+ 4: '考核官分佣', 5: '接单员保证金', 6: '商家余额',
+};
+
+Component({
+ properties: { options: { type: Object, value: {} } },
+ data: {
+ imgUrls: {
+ pageBg: '', cardBg: '', assetTileBg: '',
+ },
+ assetList: [],
+ totalAmount: '0.00',
+ selectedAsset: null,
+ isLoadingAssets: false,
+ tixianleixing: null,
+ tixianjine: '',
+ currentRate: '0.00',
+ showTixian: false,
+ recordList: [],
+ page: 1,
+ loading: false,
+ nomore: false,
+ canloadmore: true,
+ isRefreshing: false,
+ shouxufei: '0.00',
+ shijidaozhang: '0.00',
+ currentTixianId: null,
+ submitting: false,
+ mchId: '',
+ currentStatusFilter: 0,
+ statusTabs: [
+ { value: 0, label: '全部' },
+ { value: 1, label: '审核中' },
+ { value: 6, label: '待收款' },
+ { value: 4, label: '审核成功' },
+ { value: 5, label: '审核失败' },
+ { value: 2, label: '提现成功' },
+ { value: 3, label: '提现失败' },
+ ],
+ hasPendingCollect: false,
+ showCollectConfirm: false,
+ collectConfirmRecord: null,
+ showDetailModal: false,
+ detailTitle: '',
+ detailContent: '',
+ },
+ lifetimes: {
+ attached() {
+ this.initImageUrls();
+ this.huoquJilu(true);
+ }
+ },
+ pageLifetimes: {
+ show() {
+ this.registerNotificationComponent();
+ PopupService.checkAndShow(this, 'tixian');
+ },
+ hide() {
+ const popupComp = this.selectComponent('#popupNotice');
+ if (popupComp && popupComp.cleanup) popupComp.cleanup();
+ }
+ },
+ methods: {
+ registerNotificationComponent() {
+ const notificationComp = this.selectComponent('#global-notification');
+ if (notificationComp && notificationComp.showNotification) {
+ app.globalData.globalNotification = {
+ show: (data) => notificationComp.showNotification(data),
+ hide: () => notificationComp.hideNotification()
+ };
+ }
+ },
+
+ initImageUrls() {
+ const ossBase = app.globalData.ossImageUrl || '';
+ const imgDir = `${ossBase}beijing/tixian/`;
+ this.setData({
+ imgUrls: {
+ pageBg: `${imgDir}page_bg.png`,
+ cardBg: `${imgDir}card_bg.png`,
+ assetTileBg: `${imgDir}asset_tile_bg.png`,
+ }
+ });
+ },
+
+ parseZhuangtai(item) {
+ const raw = item.zhuangtai ?? item.status ?? item.state;
+ const n = parseInt(raw, 10);
+ return Number.isNaN(n) ? -1 : n;
+ },
+
+ /** 规范化列表字段(兼容后端多种命名 / 嵌套 audit) */
+ normalizeRecordFields(item) {
+ const audit = item.audit || item.shenhe || item.shenhe_info || {};
+ const shenheJiluId = item.shenhe_jilu_id ?? item.shenheJiluId
+ ?? item.audit_id ?? item.shenheid ?? audit.id ?? audit.shenhe_jilu_id ?? null;
+ const shenheDanhao = String(
+ item.shenhe_danhao || item.shenheDanhao || item.audit_shenhe_danhao
+ || audit.shenhe_danhao || audit.danhao || ''
+ ).trim();
+ const tixianjiluId = item.tixianjilu_id ?? item.tixianjiluId ?? item.id ?? null;
+ const zhuangtai = this.parseZhuangtai(item);
+ return {
+ ...item,
+ zhuangtai: zhuangtai >= 0 ? zhuangtai : item.zhuangtai,
+ shenhe_jilu_id: shenheJiluId,
+ shenhe_danhao: shenheDanhao,
+ tixianjilu_id: tixianjiluId,
+ };
+ },
+
+ hasAuditJiluId(item) {
+ const id = item.shenhe_jilu_id;
+ return id !== null && id !== undefined && id !== '' && id !== 0 && id !== '0';
+ },
+
+ hasShenheDanhao(item) {
+ return !!(item.shenhe_danhao && String(item.shenhe_danhao).trim());
+ },
+
+ isNewAuditRecord(item) {
+ return this.hasAuditJiluId(item) && this.hasShenheDanhao(item);
+ },
+
+ /** 待收款是否可点击:状态6 + 审核记录ID + 审核单号 缺一不可 */
+ canCollectRecord(item) {
+ return this.parseZhuangtai(item) === TX_STATUS.DAI_SHOUKUAN
+ && this.hasAuditJiluId(item)
+ && this.hasShenheDanhao(item);
+ },
+
+ getLeixingLabel(leixing) {
+ return LEIXING_LABEL[parseInt(leixing)] || '提现';
+ },
+
+ getStatusBadgeClass(status) {
+ switch (parseInt(status)) {
+ case TX_STATUS.SHENHEZHONG: return 'status-wait';
+ case TX_STATUS.TIXIAN_CHENGGONG:
+ case TX_STATUS.SHENHE_CHENGGONG: return 'status-done';
+ case TX_STATUS.DAI_SHOUKUAN: return 'status-pending';
+ case TX_STATUS.TIXIAN_SHIBAI:
+ case TX_STATUS.SHENHE_SHIBAI: return 'status-fail';
+ default: return 'status-wait';
+ }
+ },
+
+ processRecordItem(item) {
+ item = this.normalizeRecordFields(item);
+ const isNew = this.isNewAuditRecord(item);
+ const status = this.parseZhuangtai(item);
+ let statusText = '未知';
+ let canCollect = false;
+ let canShowDetail = false;
+ let detailReason = '';
+
+ switch (status) {
+ case TX_STATUS.SHENHEZHONG: statusText = '审核中'; break;
+ case TX_STATUS.TIXIAN_CHENGGONG: statusText = '提现成功'; break;
+ case TX_STATUS.TIXIAN_SHIBAI:
+ statusText = '提现失败';
+ if (item.fail_reason || item.bhliyou) {
+ canShowDetail = true;
+ detailReason = item.fail_reason || item.bhliyou;
+ }
+ break;
+ case TX_STATUS.SHENHE_CHENGGONG: statusText = '审核成功'; break;
+ case TX_STATUS.SHENHE_SHIBAI:
+ statusText = '审核失败';
+ if (item.bhliyou) { canShowDetail = true; detailReason = item.bhliyou; }
+ break;
+ case TX_STATUS.DAI_SHOUKUAN:
+ statusText = '待收款';
+ canCollect = this.canCollectRecord(item);
+ break;
+ }
+
+ return {
+ ...item,
+ isNewAudit: isNew,
+ leixingLabel: this.getLeixingLabel(item.leixing),
+ statusText,
+ statusBadgeClass: this.getStatusBadgeClass(status),
+ canCollect,
+ canShowDetail,
+ detailReason,
+ };
+ },
+
+ gengxinYue(data, leixing) {
+ if (!data) return;
+ if (data.new_yongjin !== undefined && data.new_yongjin !== null) {
+ app.globalData.yongjin = data.new_yongjin;
+ }
+ if (data.new_fenyong !== undefined && data.new_fenyong !== null) {
+ app.globalData.guanshi.fenyongtixian = data.new_fenyong;
+ }
+ if (data.new_yajin !== undefined && data.new_yajin !== null) {
+ app.globalData.yajin = data.new_yajin;
+ }
+ if (data.new_shangjia_yue !== undefined && data.new_shangjia_yue !== null) {
+ if (app.globalData.shangjia) app.globalData.shangjia.sjyue = data.new_shangjia_yue;
+ }
+ if (data.current_rate !== undefined && leixing) {
+ const rate = parseFloat(data.current_rate);
+ const rateKeyMap = { 1: 'dashouRate', 5: 'dashou_yajin_rate', 6: 'shangjia_rate', 2: 'guanshi_rate', 3: 'zuzhang_rate', 4: 'kaoheguan_rate' };
+ const key = rateKeyMap[leixing];
+ if (key) wx.setStorageSync(key, rate);
+ }
+ },
+
+ updatePendingCollectFlag(list) {
+ const hasPending = (list || []).some(item => item.canCollect);
+ if (hasPending !== this.data.hasPendingCollect) {
+ this.setData({ hasPendingCollect: hasPending });
+ }
+ },
+
+ /** 微信确认收款成功后,本地先把对应记录标为「提现成功」 */
+ markLocalRecordWithdrawSuccess(record) {
+ if (!record) return;
+ const matchId = String(record.tixianjilu_id || record.id || '');
+ const matchDanhao = String(record.shenhe_danhao || '').trim();
+ if (!matchId && !matchDanhao) return;
+
+ const newList = (this.data.recordList || []).map((item) => {
+ const itemId = String(item.tixianjilu_id || item.id || '');
+ const itemDanhao = String(item.shenhe_danhao || '').trim();
+ const isMatch = (matchId && itemId === matchId)
+ || (matchDanhao && itemDanhao === matchDanhao);
+ if (!isMatch) return item;
+ return this.processRecordItem({
+ ...item,
+ zhuangtai: TX_STATUS.TIXIAN_CHENGGONG,
+ });
+ });
+ this.setData({ recordList: newList });
+ this.updatePendingCollectFlag(newList);
+ },
+
+ async finishWxCollectSuccess(record) {
+ this.markLocalRecordWithdrawSuccess(record);
+ await this.huoquJilu(true, true);
+ this.markLocalRecordWithdrawSuccess(record);
+ PopupService.checkAndShow(this, 'tixianchenggong');
+ wx.showToast({
+ title: '提现成功',
+ icon: 'success',
+ duration: 3000,
+ });
+ },
+
+ onPullDownRefresh() {
+ return this.huoquJilu(true, true);
+ },
+
+ onStatusFilterTap(e) {
+ const value = parseInt(e.currentTarget.dataset.value, 10);
+ if (value === this.data.currentStatusFilter) return;
+ this.setData({ currentStatusFilter: value });
+ this.huoquJilu(true);
+ },
+
+ onCollectTap(e) {
+ const index = e.currentTarget.dataset.index;
+ const record = this.data.recordList[index];
+ if (!record) return;
+ if (this.parseZhuangtai(record) !== TX_STATUS.DAI_SHOUKUAN) {
+ wx.showToast({ title: '当前状态不可收款', icon: 'none' });
+ return;
+ }
+ if (!this.hasShenheDanhao(record) || !this.hasAuditJiluId(record)) {
+ wx.showToast({ title: '审核信息不完整,请刷新后重试', icon: 'none' });
+ return;
+ }
+ if (this.data.submitting) {
+ wx.showToast({ title: '正在处理中,请稍后', icon: 'none' });
+ return;
+ }
+ this.setData({ showCollectConfirm: true, collectConfirmRecord: record });
+ },
+
+ onCloseCollectConfirm() {
+ if (this.data.submitting) return;
+ this.setData({ showCollectConfirm: false, collectConfirmRecord: null });
+ },
+
+ async onConfirmCollect() {
+ if (this.data.submitting) return;
+ let record = this.data.collectConfirmRecord;
+ if (!record) return;
+
+ if (!this.canCollectRecord(record)) {
+ await this.huoquJilu(true, true);
+ const refreshed = (this.data.recordList || []).find(
+ r => String(r.id) === String(record.id)
+ || String(r.tixianjilu_id) === String(record.tixianjilu_id)
+ );
+ if (refreshed) record = refreshed;
+ }
+ if (!this.canCollectRecord(record)) {
+ wx.showModal({
+ title: '暂时无法收款',
+ content: '缺少审核单号或审核记录ID,请下拉刷新后重试。仍不行请联系客服。',
+ showCancel: false,
+ });
+ return;
+ }
+
+ this.setData({ showCollectConfirm: false, submitting: true, collectConfirmRecord: record });
+ try {
+ const res = await request({
+ url: '/yonghu/tixiansq',
+ method: 'POST',
+ data: {
+ shenhe_danhao: record.shenhe_danhao,
+ shenhe_jilu_id: record.shenhe_jilu_id || '',
+ tixianjilu_id: record.tixianjilu_id || record.id || '',
+ leixing: record.leixing,
+ }
+ });
+ if (res.statusCode === 200 && res.data && res.data.code === 0) {
+ const data = res.data.data;
+ this.setData({
+ currentTixianId: data.tixian_id,
+ mchId: data.mch_id || '',
+ collectConfirmRecord: record,
+ });
+ this.tiaoqiWeixinQueRen(data.package_info);
+ } else {
+ wx.showModal({ title: '收款失败', content: res.data?.msg || '无法发起收款,请稍后重试', showCancel: false });
+ this.setData({ submitting: false, collectConfirmRecord: null });
+ }
+ } catch (err) {
+ wx.showModal({ title: '网络错误', content: '网络连接失败,请稍后重试', showCancel: false });
+ this.setData({ submitting: false, collectConfirmRecord: null });
+ }
+ },
+
+ tiaoqiWeixinQueRen(packageInfo) {
+ const appId = app.globalData.appId;
+ const mchId = this.data.mchId;
+ if (!appId || !mchId) {
+ wx.showModal({ title: '配置错误', content: '无法调起收款,请联系客服', showCancel: false });
+ this.setData({ submitting: false, collectConfirmRecord: null });
+ return;
+ }
+ wx.requestMerchantTransfer({
+ appId, mchId, package: packageInfo,
+ success: () => { this.tongzhiHouduanQueRen(1); },
+ fail: () => {
+ this.tongzhiHouduanQueRen(0);
+ wx.showModal({
+ title: '确认收款失败',
+ content: '微信收款确认失败,您可在记录中再次点击「收款」重试。',
+ showCancel: false,
+ });
+ }
+ });
+ },
+
+ async tongzhiHouduanQueRen(result) {
+ if (!this.data.currentTixianId) {
+ this.setData({ submitting: false, collectConfirmRecord: null });
+ return;
+ }
+ const record = this.data.collectConfirmRecord;
+ const wxConfirmed = result === 1;
+
+ try {
+ const res = await request({
+ url: '/yonghu/tixianqr',
+ method: 'POST',
+ data: {
+ tixian_id: this.data.currentTixianId,
+ result: result,
+ shenhe_danhao: record ? record.shenhe_danhao : '',
+ shenhe_jilu_id: record ? (record.shenhe_jilu_id || '') : '',
+ tixianjilu_id: record ? (record.tixianjilu_id || record.id || '') : '',
+ leixing: record ? record.leixing : '',
+ }
+ });
+ if (res.statusCode === 200 && res.data && res.data.code === 0) {
+ const data = res.data.data || {};
+ this.gengxinYue(data, record ? record.leixing : null);
+ }
+
+ // 微信已确认收款:不论 tixianqr 返回什么,都刷新列表,不弹系统异常
+ if (wxConfirmed) {
+ await this.finishWxCollectSuccess(record);
+ } else if (res.statusCode === 200 && res.data && res.data.code === 0) {
+ this.huoquJilu(true);
+ wx.showToast({
+ title: '收款已取消',
+ icon: 'none',
+ duration: 3000,
+ });
+ } else {
+ wx.showModal({
+ title: '确认状态失败',
+ content: res.data?.msg || '操作失败',
+ showCancel: false,
+ });
+ }
+ } catch (err) {
+ if (wxConfirmed) {
+ await this.finishWxCollectSuccess(record);
+ } else {
+ wx.showModal({
+ title: '网络错误',
+ content: '网络连接失败',
+ showCancel: false,
+ });
+ }
+ } finally {
+ this.setData({ submitting: false, currentTixianId: null, collectConfirmRecord: null });
+ }
+ },
+
+ onViewDetail(e) {
+ const index = e.currentTarget.dataset.index;
+ const record = this.data.recordList[index];
+ if (!record || !record.canShowDetail) return;
+ const status = parseInt(record.zhuangtai);
+ let detailTitle = '失败原因';
+ if (status === TX_STATUS.SHENHE_SHIBAI) detailTitle = '审核失败原因';
+ else if (status === TX_STATUS.TIXIAN_SHIBAI) detailTitle = '提现失败原因';
+ this.setData({
+ showDetailModal: true,
+ detailTitle,
+ detailContent: record.detailReason || '暂无详细信息',
+ });
+ },
+
+ onCloseDetailModal() {
+ this.setData({ showDetailModal: false, detailTitle: '', detailContent: '' });
+ },
+
+ async huoquJilu(fresh = false, force = false) {
+ const now = Date.now();
+ if (!force && now - lastPullDownTime < 2000 && !fresh) return;
+ if (!force && (this.data.loading || this.data.isRefreshing)) return;
+ const page = fresh ? 1 : this.data.page;
+ if (fresh) this.setData({ nomore: false, canloadmore: true, isRefreshing: true });
+ if (this.data.nomore && !fresh) return;
+ this.setData({ loading: true });
+ lastPullDownTime = now;
+ try {
+ const res = await request({
+ url: '/yonghu/tixianjiluhq',
+ method: 'POST',
+ data: { page, limit: yemianshuju, mode: 2, zhuangtai: this.data.currentStatusFilter }
+ });
+ if (res.statusCode === 200 && res.data && res.data.code === 0) {
+ const data = res.data.data;
+ const processedList = (data.list || []).map(item => this.processRecordItem(item));
+ const newList = fresh ? processedList : [...this.data.recordList, ...processedList];
+ this.setData({
+ recordList: newList,
+ page: page + 1,
+ nomore: !(data.has_more === true),
+ canloadmore: data.has_more === true,
+ loading: false,
+ isRefreshing: false,
+ });
+ this.updatePendingCollectFlag(newList);
+ } else {
+ this.setData({ loading: false, isRefreshing: false });
+ }
+ } catch (err) {
+ this.setData({ loading: false, isRefreshing: false });
+ }
+ },
+
+ onReachBottom() {
+ if (this.data.canloadmore && !this.data.nomore && !this.data.loading && !this.data.isRefreshing) {
+ const now = Date.now();
+ if (now - lastPullDownTime >= PULL_DOWN_INTERVAL) this.huoquJilu();
+ }
+ },
+
+ stopPropagation() {}
+ }
+});
diff --git a/pages/withdraw/components/record-mode2/record-mode2.json b/pages/withdraw/components/record-mode2/record-mode2.json
new file mode 100644
index 0000000..60741f8
--- /dev/null
+++ b/pages/withdraw/components/record-mode2/record-mode2.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "global-notification": "/components/global-notification/global-notification",
+ "popup-notice": "/components/popup-notice/popup-notice"
+ }
+}
diff --git a/pages/withdraw/components/record-mode2/record-mode2.wxml b/pages/withdraw/components/record-mode2/record-mode2.wxml
new file mode 100644
index 0000000..5f72a13
--- /dev/null
+++ b/pages/withdraw/components/record-mode2/record-mode2.wxml
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+ 您有审核通过的提现待收款,请点击「收款」按钮,在微信中主动确认后才能到账。
+
+
+
+
+ {{item.label}}
+
+
+
+
+
+
+ ¥{{item.jine}}
+ {{item.create}}
+
+
+ 微信零钱
+ {{item.leixingLabel}}
+
+
+
+ {{item.statusText}}
+ 点击收款
+
+
+ {{item.statusText}}
+ 详情
+
+ {{item.statusText}}
+
+
+ 加载中...
+ —— 没有更多了 ——
+ 加载更多记录
+ 暂无提现记录
+
+
+
+
+
+
+
+
+
+
+ 审核已通过,{{collectConfirmRecord.leixingLabel}} ¥{{collectConfirmRecord.jine}}
+ 请点击「去收款」,然后在微信弹窗中主动确认,资金才会打入您的微信零钱。
+ 审核单号:{{collectConfirmRecord.shenhe_danhao}}
+ 注意:审核通过≠已到账,必须您本人点击确认才能完成收款!
+
+
+
+
+
+
+
+
+ {{detailContent}}
+
+
+
+
+
+
diff --git a/pages/withdraw/components/record-mode2/record-mode2.wxss b/pages/withdraw/components/record-mode2/record-mode2.wxss
new file mode 100644
index 0000000..982008e
--- /dev/null
+++ b/pages/withdraw/components/record-mode2/record-mode2.wxss
@@ -0,0 +1,416 @@
+/* mode2 自动打款 - UI 完全复用 mode1 样式 */
+
+page {
+ background-color: #f5f7fb;
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
+ height: 100%;
+ }
+
+ .app {
+ display: flex;
+ flex-direction: column;
+ min-height: 100vh;
+ padding: 0 24rpx 0;
+ position: relative;
+ z-index: 1;
+ box-sizing: border-box;
+ }
+
+ .global-bg {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: -1;
+ opacity: 0.1;
+ object-fit: cover;
+ filter: blur(1rpx);
+ }
+
+ .assets-section {
+ margin-top: 24rpx;
+ flex-shrink: 0;
+ }
+
+ .main-card {
+ background: rgba(248, 250, 252, 0.88);
+ backdrop-filter: blur(28rpx);
+ -webkit-backdrop-filter: blur(28rpx);
+ border-radius: 48rpx;
+ padding: 30rpx 28rpx 24rpx;
+ margin-bottom: 20rpx;
+ box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.04);
+ border: 1rpx solid rgba(255, 255, 255, 0.4);
+ background-size: cover;
+ }
+
+ .balance-wrap {
+ text-align: center;
+ margin-bottom: 20rpx;
+ }
+ .balance-label {
+ font-size: 28rpx;
+ color: #0f172a;
+ letter-spacing: 1px;
+ display: block;
+ margin-bottom: 10rpx;
+ font-weight: 700;
+ text-shadow: 0 1rpx 2rpx rgba(255,255,255,0.8);
+ }
+ .balance-value {
+ font-size: 68rpx;
+ font-weight: 800;
+ color: #0f172a;
+ font-family: 'DIN', monospace;
+ letter-spacing: -1rpx;
+ text-shadow: 0 1rpx 2rpx rgba(255,255,255,0.6);
+ }
+
+ .inner-divider {
+ width: 60%;
+ height: 2rpx;
+ background: linear-gradient(90deg, transparent, #64748b, #64748b, transparent);
+ margin: 0 auto 20rpx auto;
+ border-radius: 2rpx;
+ opacity: 0.9;
+ }
+
+ .assets-hint {
+ display: block;
+ text-align: center;
+ font-size: 24rpx;
+ color: #334155;
+ margin-bottom: 14rpx;
+ font-weight: 600;
+ }
+
+ .assets-scroll {
+ width: 100%;
+ white-space: nowrap;
+ }
+ .assets-track {
+ display: inline-flex;
+ gap: 16rpx;
+ }
+
+ .asset-tile {
+ width: 170rpx;
+ background: rgba(255, 255, 255, 0.75);
+ backdrop-filter: blur(8rpx);
+ border-radius: 28rpx;
+ padding: 18rpx 12rpx;
+ display: inline-flex;
+ flex-direction: column;
+ align-items: center;
+ text-align: center;
+ border: 1rpx solid rgba(255,255,255,0.5);
+ box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.02);
+ transition: all 0.2s;
+ white-space: normal;
+ background-size: cover;
+ background-position: center;
+ }
+ .asset-tile:active {
+ background: rgba(255, 255, 255, 0.9);
+ transform: scale(0.98);
+ }
+ .asset-name {
+ font-size: 24rpx;
+ font-weight: 700;
+ color: #1e293b;
+ margin-bottom: 10rpx;
+ text-shadow: 0 1rpx 1rpx rgba(255,255,255,0.5);
+ }
+ .asset-balance {
+ font-size: 28rpx;
+ font-weight: 800;
+ color: #2d6a4f;
+ font-family: monospace;
+ margin-bottom: 6rpx;
+ text-shadow: 0 1rpx 1rpx rgba(255,255,255,0.3);
+ }
+ .asset-fee {
+ font-size: 20rpx;
+ font-weight: 600;
+ color: #475569;
+ text-shadow: 0 1rpx 1rpx rgba(255,255,255,0.3);
+ }
+ .assets-empty {
+ width: 400rpx;
+ text-align: center;
+ color: #a0abb9;
+ padding: 40rpx 0;
+ }
+
+ .divider-line {
+ height: 2rpx;
+ background: linear-gradient(90deg, transparent, #cbd5e1, #cbd5e1, transparent);
+ margin: 16rpx 0 20rpx;
+ width: 80%;
+ margin-left: auto;
+ margin-right: auto;
+ }
+
+ .history-section {
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ min-height: 0;
+ margin-top: 0;
+ }
+ .history-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: baseline;
+ padding: 0 8rpx 20rpx;
+ flex-shrink: 0;
+ }
+ .history-title {
+ font-size: 34rpx;
+ font-weight: 600;
+ color: #1e293b;
+ }
+ .history-scroll {
+ flex: 1;
+ width: 100%;
+ padding: 0 20rpx;
+ box-sizing: border-box;
+ }
+ .history-item {
+ display: flex;
+ align-items: center;
+ padding: 28rpx 0;
+ border-bottom: 1rpx solid rgba(0,0,0,0.05);
+ }
+ .history-info { width: 160rpx; }
+ .history-amount {
+ font-size: 36rpx;
+ font-weight: 700;
+ color: #1e293b;
+ display: block;
+ }
+ .history-time {
+ font-size: 22rpx;
+ color: #94a3b8;
+ }
+ .history-detail {
+ flex: 1;
+ padding: 0 20rpx;
+ }
+ .history-method {
+ font-size: 30rpx;
+ color: #334155;
+ display: block;
+ margin-bottom: 6rpx;
+ }
+ .history-type {
+ font-size: 24rpx;
+ color: #94a3b8;
+ }
+ .history-status { text-align: right; }
+
+ .status-badge {
+ font-size: 26rpx;
+ font-weight: 500;
+ padding: 6rpx 14rpx;
+ border-radius: 30rpx;
+ display: inline-block;
+ }
+ .status-wait {
+ color: #f59e0b;
+ background: rgba(245,158,11,0.1);
+ }
+ .status-done {
+ color: #10b981;
+ background: rgba(16,185,129,0.1);
+ }
+ .status-fail {
+ color: #ef4444;
+ background: rgba(239,68,68,0.1);
+ }
+ .status-pending {
+ color: #3b82f6;
+ background: rgba(59,130,246,0.1);
+ }
+ .fail-link {
+ margin-left: 8rpx;
+ text-decoration: underline;
+ }
+ .collect-tappable {
+ display: inline-flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 4rpx;
+ padding: 10rpx 18rpx;
+ cursor: pointer;
+ border: 2rpx solid rgba(59,130,246,0.35);
+ box-shadow: 0 4rpx 12rpx rgba(59,130,246,0.15);
+ }
+ .collect-tappable:active {
+ transform: scale(0.97);
+ opacity: 0.9;
+ }
+ .collect-sub {
+ font-size: 22rpx;
+ font-weight: 700;
+ color: #1d4ed8;
+ text-decoration: underline;
+ }
+
+ .load-tip, .more-tip {
+ text-align: center;
+ padding: 30rpx;
+ font-size: 24rpx;
+ color: #94a3b8;
+ }
+ .load-more-btn {
+ margin: 16rpx 0 20rpx;
+ padding: 20rpx;
+ text-align: center;
+ background: rgba(255,255,255,0.7);
+ backdrop-filter: blur(8rpx);
+ border-radius: 40rpx;
+ font-size: 28rpx;
+ color: #3b82f6;
+ border: 1rpx solid rgba(255,255,255,0.5);
+ }
+ .load-more-btn:active { background: rgba(255,255,255,0.9); }
+.history-section--full {
+ flex: 1;
+ min-height: calc(100vh - 48rpx);
+ margin-top: 24rpx;
+}
+
+.history-section--full .history-scroll {
+ height: calc(100vh - 280rpx);
+}
+
+ /* 自动打款专属(少量追加) */
+ .pending-tip {
+ margin: 0 8rpx 16rpx;
+ padding: 16rpx 20rpx;
+ font-size: 24rpx;
+ color: #1d4ed8;
+ background: rgba(59,130,246,0.08);
+ border-radius: 20rpx;
+ line-height: 1.5;
+ }
+ .filter-scroll {
+ width: 100%;
+ white-space: nowrap;
+ margin-bottom: 12rpx;
+ }
+ .filter-track {
+ display: inline-flex;
+ gap: 12rpx;
+ padding: 0 8rpx;
+ }
+ .filter-chip {
+ flex-shrink: 0;
+ padding: 10rpx 22rpx;
+ font-size: 24rpx;
+ color: #64748b;
+ background: rgba(255,255,255,0.8);
+ border-radius: 30rpx;
+ border: 1rpx solid rgba(0,0,0,0.06);
+ }
+ .filter-chip.active {
+ color: #3b82f6;
+ background: #eff6ff;
+ border-color: #3b82f6;
+ }
+ .auto-tip {
+ font-size: 24rpx;
+ color: #3b82f6;
+ margin-bottom: 20rpx;
+ line-height: 1.5;
+ }
+ .warn-tip {
+ font-size: 24rpx;
+ color: #f59e0b;
+ margin-top: 16rpx;
+ font-weight: 600;
+ }
+
+ /* 弹窗(与 mode1 一致) */
+ .modal-mask {
+ position: fixed;
+ top: 0; left: 0; right: 0; bottom: 0;
+ background: rgba(0,0,0,0.5);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ z-index: 1000;
+ }
+ .modal-dialog {
+ width: 600rpx;
+ background: rgba(255,255,255,0.96);
+ backdrop-filter: blur(20rpx);
+ border-radius: 48rpx;
+ overflow: hidden;
+ box-shadow: 0 20rpx 40rpx rgba(0,0,0,0.1);
+ border: 1rpx solid rgba(255,255,255,0.6);
+ }
+ .modal-header {
+ padding: 36rpx 32rpx 20rpx;
+ font-size: 36rpx;
+ font-weight: 700;
+ border-bottom: 1rpx solid rgba(0,0,0,0.05);
+ }
+ .modal-body {
+ padding: 32rpx;
+ font-size: 28rpx;
+ color: #334155;
+ line-height: 1.6;
+ }
+ .info-row, .amount-row {
+ display: flex;
+ justify-content: space-between;
+ margin-bottom: 24rpx;
+ font-size: 28rpx;
+ }
+ .amount-row input {
+ border: 1rpx solid rgba(0,0,0,0.1);
+ border-radius: 28rpx;
+ padding: 16rpx 20rpx;
+ width: 260rpx;
+ background: rgba(255,255,255,0.9);
+ }
+ .quick-row {
+ display: flex;
+ gap: 16rpx;
+ margin: 24rpx 0;
+ }
+ .quick-chip {
+ flex: 1;
+ background: rgba(241,245,249,0.8);
+ text-align: center;
+ padding: 12rpx;
+ border-radius: 40rpx;
+ font-size: 28rpx;
+ }
+ .fee-row {
+ display: flex;
+ justify-content: space-between;
+ background: rgba(248,250,252,0.8);
+ padding: 20rpx;
+ border-radius: 28rpx;
+ margin: 20rpx 0;
+ }
+ .modal-footer {
+ display: flex;
+ border-top: 1rpx solid rgba(0,0,0,0.05);
+ }
+ .modal-btn {
+ flex: 1;
+ text-align: center;
+ padding: 28rpx;
+ font-size: 30rpx;
+ }
+ .modal-btn.cancel {
+ color: #8f9bb3;
+ border-right: 1rpx solid rgba(0,0,0,0.05);
+ }
+ .modal-btn.confirm { color: #3b82f6; }
+
\ No newline at end of file
diff --git a/pages/withdraw/withdraw-records.js b/pages/withdraw/withdraw-records.js
new file mode 100644
index 0000000..0835813
--- /dev/null
+++ b/pages/withdraw/withdraw-records.js
@@ -0,0 +1,51 @@
+// pages/withdraw/withdraw-records.js — 提现记录独立页
+import { createPage, request } from '../../utils/base-page.js';
+
+Page(createPage({
+ data: {
+ pageMode: 0,
+ loadError: false,
+ },
+
+ onLoad() {
+ this.fetchPageMode();
+ },
+
+ async fetchPageMode() {
+ try {
+ const res = await request({
+ url: '/peizhi/hqtxzsym',
+ method: 'POST',
+ });
+ if (res.statusCode === 200 && res.data && res.data.code === 0) {
+ const mode = parseInt(res.data.data.mode, 10);
+ this.setData({
+ pageMode: (mode === 1 || mode === 2) ? mode : 1,
+ loadError: false,
+ });
+ } else {
+ this.setData({ pageMode: 1, loadError: false });
+ }
+ } catch (err) {
+ console.error('获取展示模式失败:', err);
+ this.setData({ loadError: true });
+ }
+ },
+
+ retryFetch() {
+ this.setData({ loadError: false, pageMode: 0 });
+ this.fetchPageMode();
+ },
+
+ onPullDownRefresh() {
+ const mode = this.data.pageMode;
+ const compId = mode === 1 ? '#record-mode2' : mode === 2 ? '#record-mode1' : null;
+ if (!compId) {
+ wx.stopPullDownRefresh();
+ return;
+ }
+ const comp = this.selectComponent(compId);
+ const p = comp && comp.onPullDownRefresh ? comp.onPullDownRefresh() : Promise.resolve();
+ Promise.resolve(p).finally(() => wx.stopPullDownRefresh());
+ },
+}));
diff --git a/pages/withdraw/withdraw-records.json b/pages/withdraw/withdraw-records.json
new file mode 100644
index 0000000..802472c
--- /dev/null
+++ b/pages/withdraw/withdraw-records.json
@@ -0,0 +1,11 @@
+{
+ "navigationBarTitleText": "提现记录",
+ "navigationBarBackgroundColor": "#ffffff",
+ "navigationBarTextStyle": "black",
+ "backgroundColor": "#f5f7fb",
+ "enablePullDownRefresh": true,
+ "usingComponents": {
+ "record-mode1": "./components/record-mode1/record-mode1",
+ "record-mode2": "./components/record-mode2/record-mode2"
+ }
+}
diff --git a/pages/withdraw/withdraw-records.wxml b/pages/withdraw/withdraw-records.wxml
new file mode 100644
index 0000000..592ebb8
--- /dev/null
+++ b/pages/withdraw/withdraw-records.wxml
@@ -0,0 +1,14 @@
+
+
+
+ 加载中...
+
+
+
+ 加载失败,请检查网络
+ 点击重试
+
+
+
+
+
diff --git a/pages/withdraw/withdraw-records.wxss b/pages/withdraw/withdraw-records.wxss
new file mode 100644
index 0000000..9e4215a
--- /dev/null
+++ b/pages/withdraw/withdraw-records.wxss
@@ -0,0 +1,41 @@
+.records-container {
+ width: 100%;
+ min-height: 100vh;
+ background: #f5f7fb;
+}
+
+.loading-center, .error-center {
+ height: 100vh;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ color: #64748b;
+}
+
+.loading-spinner {
+ width: 60rpx;
+ height: 60rpx;
+ border: 4rpx solid rgba(59, 130, 246, 0.2);
+ border-top-color: #3b82f6;
+ border-radius: 50%;
+ animation: spin 0.8s linear infinite;
+ margin-bottom: 24rpx;
+}
+
+@keyframes spin {
+ to { transform: rotate(360deg); }
+}
+
+.loading-text, .error-text {
+ font-size: 28rpx;
+}
+
+.retry-btn {
+ margin-top: 24rpx;
+ padding: 16rpx 48rpx;
+ background: #3b82f6;
+ color: #fff;
+ border-radius: 40rpx;
+ font-size: 28rpx;
+}
diff --git a/pages/withdraw/withdraw.json b/pages/withdraw/withdraw.json
index e2d5589..9fb4b06 100644
--- a/pages/withdraw/withdraw.json
+++ b/pages/withdraw/withdraw.json
@@ -1,14 +1,14 @@
{
- "usingComponents": {
- "mode1": "./components/mode1/mode1",
- "mode2": "./components/mode2/mode2"
- },
- "navigationBarTitleText": "提现中心",
- "navigationBarBackgroundColor": "#ffffff",
- "navigationBarTextStyle": "black",
- "backgroundColor": "#f5f7fb",
- "enablePullDownRefresh": false,
- "onReachBottomDistance": 50,
- "navigationStyle": "default",
- "disableScroll": false
- }
\ No newline at end of file
+ "usingComponents": {
+ "mode1": "./components/mode1/mode1",
+ "mode2": "./components/mode2/mode2"
+ },
+ "navigationBarTitleText": "提现",
+ "navigationBarBackgroundColor": "#FFD54F",
+ "navigationBarTextStyle": "black",
+ "backgroundColor": "#f5f5f5",
+ "enablePullDownRefresh": false,
+ "onReachBottomDistance": 50,
+ "navigationStyle": "default",
+ "disableScroll": false
+}
diff --git a/pages/withdraw/withdraw.wxss b/pages/withdraw/withdraw.wxss
index fe81d0a..2606acf 100644
--- a/pages/withdraw/withdraw.wxss
+++ b/pages/withdraw/withdraw.wxss
@@ -1,13 +1,19 @@
/* pages/withdraw/withdraw.wxss */
.tixian-container {
width: 100%;
+ min-height: 100vh;
+ background: #f5f5f5;
}
/* 加载状态 */
.loading-center, .error-center {
height: 100vh;
- color: #ffffff;
- background: #1a0b2e;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ color: #666;
+ background: #f5f5f5;
}
.loading-spinner {
diff --git a/project.config.json b/project.config.json
index ba985c2..cd3eb56 100644
--- a/project.config.json
+++ b/project.config.json
@@ -34,9 +34,34 @@
},
"libVersion": "3.14.3",
"packOptions": {
- "ignore": [],
+ "ignore": [
+ {
+ "value": "_backup_20260705_pre_split",
+ "type": "folder"
+ },
+ {
+ "value": "_backup_withdraw_20260705",
+ "type": "folder"
+ },
+ {
+ "value": "_backup_pre_redesign",
+ "type": "folder"
+ },
+ {
+ "value": "_backup_20260706",
+ "type": "folder"
+ },
+ {
+ "value": "_backup_ui_20260706",
+ "type": "folder"
+ },
+ {
+ "value": ".bak",
+ "type": "suffix"
+ }
+ ],
"include": []
},
- "appid": "wx0e4be86faac4a8d1",
+ "appid": "wxdefa454152e78a03",
"simulatorPluginLibVersion": {}
}
\ No newline at end of file
diff --git a/styles/dashou-xym-order-card.wxss b/styles/dashou-xym-order-card.wxss
index 47c0fbc..8bd7521 100644
--- a/styles/dashou-xym-order-card.wxss
+++ b/styles/dashou-xym-order-card.wxss
@@ -17,80 +17,47 @@
box-shadow: 0 10rpx 28rpx rgba(0, 0, 0, 0.09);
}
-/* 平台订单 - 机甲冷色 */
+/* 平台订单 */
.xym-pingtai-order {
padding-bottom: 5rpx;
- background: linear-gradient(145deg, rgba(18, 28, 48, 0.98), rgba(8, 18, 35, 0.98));
- border: 1rpx solid rgba(0, 200, 255, 0.12);
- box-shadow: 0 20rpx 40rpx rgba(0, 0, 0, 0.55);
-}
-
-.xym-pingtai-order::before {
- content: '';
- position: absolute;
- top: 0;
- left: 10%;
- width: 80%;
- height: 4rpx;
- background: linear-gradient(90deg, transparent, #00c8ff, transparent);
- border-radius: 2rpx;
- opacity: 0.75;
- z-index: 2;
+ background: #927a46;
}
.xym-pingtai-head {
height: 72rpx;
padding: 0 24rpx;
- background: transparent;
+ background: linear-gradient(50deg, #957c48, #5c4a28);
border-radius: 30rpx 30rpx 0 0;
- border-bottom: 1rpx dashed rgba(255, 255, 255, 0.08);
}
.xym-head-time {
font-size: 24rpx;
- color: #c0d0ff;
- text-shadow: 0 0 5px rgba(0, 200, 255, 0.3);
+ color: #fcd270;
}
.xym-head-tag {
font-size: 22rpx;
padding: 4rpx 16rpx;
- border-radius: 40rpx;
+ border-radius: 8rpx;
font-weight: 600;
- background: rgba(0, 200, 255, 0.08);
- color: #aac8ff;
- border: 1rpx solid rgba(0, 200, 255, 0.3);
- box-shadow: 0 0 10rpx rgba(0, 200, 255, 0.15);
+ background: rgba(252, 210, 112, 0.22);
+ color: #fcd270;
+ border: 1rpx solid rgba(252, 210, 112, 0.4);
}
.xym-pingtai-body {
- border-radius: 0 0 30rpx 30rpx;
+ border-radius: 40rpx 10rpx 30rpx 30rpx;
padding: 0 20rpx 24rpx;
- background: transparent;
+ background: linear-gradient(to bottom, #3a3220, #cec180);
}
-/* 商家订单 - 机甲暖色 */
+/* 商家订单 */
.xym-shangjia-order {
padding-bottom: 5rpx;
- background: linear-gradient(145deg, rgba(38, 18, 48, 0.98), rgba(25, 8, 35, 0.98));
- border: 1rpx solid rgba(255, 77, 109, 0.12);
- box-shadow: 0 20rpx 40rpx rgba(0, 0, 0, 0.55);
+ background: linear-gradient(to bottom, #fff8e1, #ffe0b2);
overflow: hidden;
}
-.xym-shangjia-order::before {
- content: '';
- position: absolute;
- top: 0;
- left: 10%;
- width: 80%;
- height: 4rpx;
- background: linear-gradient(90deg, transparent, #ff4d6d, transparent);
- border-radius: 2rpx;
- opacity: 0.75;
- z-index: 2;
-}
-
.xym-shangjia-body {
border-radius: 10rpx 10rpx 30rpx 30rpx;
padding: 0 20rpx 24rpx;
@@ -101,13 +68,13 @@
}
.xym-shangjia-head .xym-head-time {
- color: #ffc0d0;
+ color: #888;
}
.xym-shangjia-head .xym-head-tag {
- background: rgba(255, 77, 109, 0.12);
- color: #ffb3c6;
- border-color: rgba(255, 77, 109, 0.35);
+ background: rgba(255, 255, 255, 0.65);
+ color: #492f00;
+ border-color: rgba(255, 208, 97, 0.5);
}
.order-con {
@@ -126,23 +93,7 @@
border-radius: 12rpx;
margin-right: 14rpx;
flex-shrink: 0;
- background: rgba(255, 255, 255, 0.06);
-}
-
-.xym-pingtai-body .o-logo {
- border: 2rpx solid rgba(0, 200, 255, 0.45);
- box-shadow: 0 6rpx 18rpx rgba(0, 200, 255, 0.2);
-}
-
-.xym-shangjia-body .o-logo,
-.gold-card .o-logo {
- border: 2rpx solid rgba(255, 77, 109, 0.35);
- box-shadow: 0 6rpx 18rpx rgba(255, 77, 109, 0.15);
-}
-
-.gold-card .o-logo {
- border-color: rgba(255, 215, 0, 0.45);
- box-shadow: 0 6rpx 18rpx rgba(255, 215, 0, 0.2);
+ background: #eee;
}
.o-col {
@@ -156,11 +107,11 @@
font-weight: 700;
font-size: 30rpx;
line-height: 1.5;
- color: #ffb3c6;
+ color: #333;
}
.o-goods.light {
- color: #b0c8f0;
+ color: #fff;
}
.line2 {
@@ -189,7 +140,7 @@
.m-name-sm {
font-size: 26rpx;
font-weight: 600;
- color: #ffb3c6;
+ color: #333;
}
.zhiding-strip {
@@ -262,6 +213,7 @@
margin-top: 8rpx;
}
+/* 金牌卡底部商家条 */
.gold-card .merchant-strip {
margin: 16rpx 6rpx 0;
padding: 16rpx 20rpx;
@@ -344,7 +296,7 @@
}
.xym-pingtai-body .zhiding-strip .zhiding-name {
- color: #ffc0d0;
+ color: #f5e6b8;
}
.reward-badge {
@@ -357,21 +309,17 @@
display: flex;
align-items: baseline;
z-index: 3;
- box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.25);
+ box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08);
}
.reward-badge.normal-reward {
- color: #ffd700;
- background: rgba(0, 0, 0, 0.35);
- border: 1rpx solid rgba(255, 215, 0, 0.35);
- text-shadow: 0 0 12px rgba(255, 215, 0, 0.45);
+ color: #492f00;
+ background: linear-gradient(to bottom, #fae04d, #ffc0a3);
}
.reward-badge.platform-reward {
color: #fff;
- background: linear-gradient(145deg, rgba(0, 200, 255, 0.25), rgba(0, 120, 200, 0.15));
- border: 1rpx solid rgba(0, 200, 255, 0.35);
- box-shadow: 0 0 16rpx rgba(0, 200, 255, 0.2);
+ background: linear-gradient(to right, #dabd83, #704029);
}
.xym-shangjia-body .reward-badge:not(.member-tip) {
@@ -379,20 +327,13 @@
}
.reward-badge.member-tip {
- background: rgba(255, 77, 109, 0.15);
- border: 1rpx solid rgba(255, 77, 109, 0.35);
+ background: rgba(255, 255, 255, 0.85);
padding: 8rpx 16rpx;
border-radius: 20rpx;
top: 16rpx;
right: 10rpx;
}
-.reward-tip {
- font-size: 22rpx;
- color: #ff9aab;
- font-weight: 600;
-}
-
.reward-yen {
font-size: 28rpx;
}
@@ -403,7 +344,13 @@
}
.reward-num.dark {
- color: #ffd700;
+ color: #c00;
+}
+
+.reward-tip {
+ font-size: 22rpx;
+ color: #c0392b;
+ font-weight: 600;
}
.reward-yen.sm {
@@ -420,15 +367,15 @@
}
.remark-block.gold {
- color: #b0c8f0;
- border-color: rgba(0, 200, 255, 0.45);
- background: rgba(255, 255, 255, 0.03);
+ color: #fff;
+ border-color: #ffd700;
+ background: rgba(255, 215, 0, 0.12);
}
.remark-block.dark {
- color: #e0c8ff;
- border-color: rgba(255, 77, 109, 0.45);
- background: rgba(255, 255, 255, 0.03);
+ color: #666;
+ border-color: #87ceeb;
+ background: rgba(135, 206, 235, 0.12);
}
.remark-label {
@@ -436,11 +383,11 @@
}
.remark-block.gold .remark-label {
- color: #80d0ff;
+ color: #ffd700;
}
.remark-block.dark .remark-label {
- color: #ff9aab;
+ color: #87ceeb;
}
.xuqiu-tags-row {
@@ -450,20 +397,16 @@
}
.xym-shangjia-body .xuqiu-tags-row {
- border-top-color: rgba(255, 255, 255, 0.08);
+ border-top-color: rgba(0, 0, 0, 0.08);
}
.xuqiu-tags-row .xuqiu-label {
font-size: 22rpx;
- color: #80d0ff;
+ color: #87ceeb;
margin-bottom: 8rpx;
display: block;
}
-.xym-shangjia-body .xuqiu-tags-row .xuqiu-label {
- color: #ff9aab;
-}
-
.o-foot {
margin-top: 18rpx;
padding: 0 10rpx 8rpx;
@@ -475,62 +418,35 @@
}
.o-amt.light {
- color: #aac8ff;
+ color: #f5e6b8;
}
.btn-bg {
- background: linear-gradient(145deg, #1a2a48, #0e1a30);
- border-radius: 0;
- color: #fff;
- border: 1rpx solid rgba(255, 255, 255, 0.1);
- box-shadow:
- 0 8rpx 0 #0a1525,
- 0 12rpx 28rpx rgba(0, 0, 0, 0.55),
- inset 0 2rpx 6rpx rgba(0, 200, 255, 0.35);
+ background: linear-gradient(180deg, #fae04d, #ffc0a3);
+ border-radius: 60rpx;
+ color: #492f00;
}
.qiangdan {
- color: #fff;
+ color: #492f00;
width: 180rpx;
min-width: 100rpx;
padding: 15rpx 10rpx;
+ border: 2rpx solid #fff;
box-sizing: border-box;
font-size: 26rpx;
font-weight: 700;
flex-shrink: 0;
- clip-path: polygon(10% 0%, 90% 0%, 100% 25%, 100% 75%, 90% 100%, 10% 100%, 0% 75%, 0% 25%);
-}
-
-.xym-shangjia-order .qiangdan.btn-bg,
-.xym-shangjia-order .qiangdan {
- background: linear-gradient(145deg, #3a2048, #251030);
- box-shadow:
- 0 8rpx 0 #2a0a1a,
- 0 12rpx 28rpx rgba(0, 0, 0, 0.55),
- inset 0 2rpx 6rpx rgba(255, 77, 109, 0.35);
-}
-
-.gold-card .qiangdan.btn-bg,
-.gold-card .qiangdan {
- background: linear-gradient(145deg, #3a3018, #251a08);
- box-shadow:
- 0 8rpx 0 #1a1208,
- 0 12rpx 28rpx rgba(0, 0, 0, 0.55),
- inset 0 2rpx 6rpx rgba(255, 215, 0, 0.35);
}
.qiangdan.btn-qiang-brown {
- background: linear-gradient(145deg, #1a2a48, #0e1a30) !important;
- color: #fff !important;
- box-shadow:
- 0 8rpx 0 #0a1525,
- 0 12rpx 28rpx rgba(0, 0, 0, 0.55),
- inset 0 2rpx 6rpx rgba(0, 200, 255, 0.35) !important;
+ background: linear-gradient(to right, #7a4a2d 0%, #e4ce94 100%) !important;
+ color: #000 !important;
}
.view-more-inline {
font-size: 22rpx;
- color: #00c8ff;
+ color: #87ceeb;
margin-left: 4rpx;
}
@@ -547,41 +463,26 @@
padding-right: 12rpx;
}
-/* 优质商家 - 机甲金牌 */
+/* 优质商家金牌卡片 — 与逍遥梦 ui-preview 一致 */
.xym-order-item.gold-card {
margin-bottom: 20rpx;
border-radius: 30rpx;
- box-shadow: 0 20rpx 40rpx rgba(0, 0, 0, 0.55), 0 0 24rpx rgba(255, 215, 0, 0.08);
+ box-shadow: 0 12rpx 32rpx rgba(248, 211, 44, 0.28);
overflow: hidden;
- border: 1rpx solid rgba(255, 215, 0, 0.2);
}
.gold-card {
padding-bottom: 5rpx;
position: relative;
- background: linear-gradient(145deg, rgba(28, 22, 12, 0.98), rgba(18, 12, 6, 0.98));
-}
-
-.gold-card::before {
- content: '';
- position: absolute;
- top: 0;
- left: 10%;
- width: 80%;
- height: 4rpx;
- background: linear-gradient(90deg, transparent, #ffd700, transparent);
- border-radius: 2rpx;
- opacity: 0.85;
- z-index: 2;
+ background: linear-gradient(to bottom, #ffecc5, #fffbf3);
}
.gold-head {
height: 77rpx;
display: flex;
align-items: center;
- background: linear-gradient(145deg, rgba(58, 48, 24, 0.95), rgba(38, 28, 12, 0.95));
+ background: linear-gradient(127deg, #F8D32C 0%, #FFB26A 35%, #FFEE58 70%, #F8D32C 100%);
border-radius: 32rpx 32rpx 0 0;
- border-bottom: 1rpx dashed rgba(255, 215, 0, 0.15);
}
.kehuduan-banner-wrap,
@@ -611,21 +512,19 @@
.tag-pill.tag-youzhi,
.tag-youzhi {
- background: linear-gradient(145deg, rgba(255, 215, 0, 0.25), rgba(255, 140, 0, 0.15));
- color: #ffd700;
+ background: linear-gradient(180deg, #fae04d, #ffc0a3);
+ color: #492c00;
font-size: 24rpx;
padding: 4rpx 18rpx;
border-radius: 10rpx;
margin-right: 10rpx;
font-weight: 600;
- border: 1rpx solid rgba(255, 215, 0, 0.35);
- text-shadow: 0 0 8px rgba(255, 215, 0, 0.35);
}
.gold-body-wrap {
- border-radius: 0 0 30rpx 30rpx;
+ border-radius: 10rpx 10rpx 30rpx 30rpx;
padding: 0 20rpx 20rpx;
- background: linear-gradient(to bottom, rgba(20, 16, 10, 0.98) 0%, rgba(42, 34, 22, 0.95) 55%, rgba(58, 46, 28, 0.92) 100%);
+ background: linear-gradient(to bottom, #1f1a14 0%, #342b22 38%, #4a3d30 68%, #6b5638 100%);
}
.gold-inner {
@@ -774,31 +673,29 @@
padding: 0 10rpx 6rpx;
}
-.merchant-plain {
+/* 公告条 */
+.xym-gonggao-bar {
display: flex;
align-items: center;
+ background: #fdf9db;
+ margin: 0 24rpx 0;
+ border-radius: 10rpx;
+ padding: 10rpx 16rpx;
}
-.merchant-user {
- display: flex;
- align-items: center;
+.xym-gonggao-ico {
+ width: 40rpx;
+ height: 40rpx;
+ flex-shrink: 0;
+ margin-right: 12rpx;
}
-.m-info {
- flex: 1;
- min-width: 0;
-}
-
-.dark-t {
- color: #e8c547;
-}
-
-.o-amt-grey {
+.xym-gonggao-txt {
font-size: 24rpx;
- color: rgba(255, 255, 255, 0.65);
-}
-
-.kehuduan-foot {
- display: flex;
- align-items: center;
+ color: #666;
+ line-height: 1.5;
+ flex: 1;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
}
diff --git a/styles/dashou-xym-orders-page.wxss b/styles/dashou-xym-orders-page.wxss
new file mode 100644
index 0000000..145ef20
--- /dev/null
+++ b/styles/dashou-xym-orders-page.wxss
@@ -0,0 +1,119 @@
+/* 打手订单 Tab - 逍遥梦 order 页布局增强 */
+@import './xym-layout.wxss';
+
+.ds-page.xym-order-page {
+ background: #f5f5f5;
+ min-height: 100vh;
+ display: flex;
+ flex-direction: column;
+}
+
+.xym-order-page .xym-order-header {
+ position: relative;
+ flex-shrink: 0;
+ padding-bottom: 8rpx;
+}
+
+.xym-order-page .xym-order-bg {
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 200rpx;
+ z-index: 0;
+}
+
+.xym-order-page .xym-order-title-bar {
+ position: relative;
+ z-index: 2;
+ text-align: center;
+ padding: 16rpx 0 8rpx;
+}
+
+.xym-order-page .xym-order-title {
+ font-size: 34rpx;
+ font-weight: 700;
+ color: #343434;
+}
+
+.xym-order-page .main-container {
+ flex: 1;
+ min-height: 0;
+}
+
+.xym-order-page .order-card-xym {
+ margin: 0 0 16rpx;
+ padding: 20rpx;
+ border-radius: 16rpx;
+ background: #fff;
+ box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
+ display: flex;
+ align-items: flex-start;
+}
+
+.xym-order-page .card-hd-xym {
+ width: 100%;
+ display: flex;
+ justify-content: space-between;
+ margin-bottom: 12rpx;
+}
+
+.xym-order-page .card-time-xym {
+ font-size: 22rpx;
+ color: #999;
+}
+
+.xym-order-page .card-status-xym {
+ font-size: 24rpx;
+ font-weight: 600;
+}
+
+.xym-order-page .card-bd-xym {
+ display: flex;
+ width: 100%;
+}
+
+.xym-order-page .goods-img-xym {
+ width: 120rpx;
+ height: 120rpx;
+ border-radius: 12rpx;
+ flex-shrink: 0;
+ background: #f0f0f0;
+}
+
+.xym-order-page .goods-info-xym {
+ flex: 1;
+ margin-left: 16rpx;
+ min-width: 0;
+}
+
+.xym-order-page .goods-name-xym {
+ font-size: 28rpx;
+ font-weight: 600;
+ color: #222;
+ line-height: 1.4;
+ display: -webkit-box;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
+ overflow: hidden;
+}
+
+.xym-order-page .goods-sub-xym {
+ font-size: 24rpx;
+ color: #666;
+ margin-top: 8rpx;
+}
+
+.xym-order-page .goods-price-xym {
+ font-size: 30rpx;
+ font-weight: 700;
+ color: #492f00;
+ margin-top: 8rpx;
+}
+
+.xym-order-page .load-tip-xym {
+ text-align: center;
+ color: #999;
+ font-size: 24rpx;
+ padding: 20rpx 0 40rpx;
+}
diff --git a/styles/dashou-xym-orders-theme.wxss b/styles/dashou-xym-orders-theme.wxss
index 9eef9fb..75fe04d 100644
--- a/styles/dashou-xym-orders-theme.wxss
+++ b/styles/dashou-xym-orders-theme.wxss
@@ -13,8 +13,8 @@
}
.leixing-item.leixing-active {
- background: linear-gradient(180deg, #ede9fe, #c4b5fd) !important;
- box-shadow: 0 4rpx 12rpx rgba(147, 51, 234, 0.35) !important;
+ background: linear-gradient(180deg, #fff0c2, #f5d563) !important;
+ box-shadow: 0 4rpx 12rpx rgba(255, 208, 97, 0.35) !important;
}
.leixing-active .leixing-name {
@@ -32,14 +32,14 @@
}
.type-btn.type-active {
- background: linear-gradient(180deg, #c4b5fd, #a78bfa) !important;
+ background: linear-gradient(180deg, #fae04d, #ffc0a3) !important;
color: #492f00 !important;
box-shadow: 0 2rpx 8rpx rgba(180, 130, 20, 0.2) !important;
}
.search-box {
background: #fff !important;
- border: 1rpx solid rgba(147, 51, 234, 0.3) !important;
+ border: 1rpx solid rgba(255, 208, 97, 0.3) !important;
}
.left-status {
@@ -48,7 +48,7 @@
}
.status-item.status-active {
- background: #f5f3ff !important;
+ background: #fff8e1 !important;
}
.status-active .status-name {
@@ -56,7 +56,7 @@
}
.status-dot {
- background: #9333ea !important;
+ background: #ffd061 !important;
}
.right-list {
@@ -74,11 +74,11 @@
.loading-spinner,
.mini-spinner {
- border-top-color: #9333ea !important;
+ border-top-color: #ffd061 !important;
}
.load-more-btn {
- background: linear-gradient(180deg, #c4b5fd, #a78bfa) !important;
+ background: linear-gradient(180deg, #fae04d, #ffc0a3) !important;
color: #492f00 !important;
border: 2rpx solid #fff !important;
}
diff --git a/styles/dashou-xym-rank-theme.wxss b/styles/dashou-xym-rank-theme.wxss
index ec8b09a..e6eaa43 100644
--- a/styles/dashou-xym-rank-theme.wxss
+++ b/styles/dashou-xym-rank-theme.wxss
@@ -24,13 +24,13 @@ page {
.role-chip {
background: rgba(255, 255, 255, 0.8) !important;
color: #666 !important;
- border: 2rpx solid rgba(147, 51, 234, 0.25) !important;
+ border: 2rpx solid rgba(255, 208, 97, 0.25) !important;
}
.role-chip.on {
- background: linear-gradient(180deg, #c4b5fd, #a78bfa) !important;
+ background: linear-gradient(180deg, #fae04d, #ffc0a3) !important;
color: #492f00 !important;
- border-color: #9333ea !important;
+ border-color: #ffd061 !important;
font-weight: 700 !important;
}
@@ -40,7 +40,7 @@ page {
}
.date-chip.on {
- background: #ede9fe !important;
+ background: #fef6d4 !important;
color: #492f00 !important;
font-weight: 700 !important;
}
@@ -76,7 +76,7 @@ page {
}
.my-rank-bar {
- background: linear-gradient(180deg, #c4b5fd, #a78bfa) !important;
+ background: linear-gradient(180deg, #fae04d, #ffc0a3) !important;
}
.my-rank-bar text {
@@ -88,5 +88,5 @@ page {
}
.loader {
- border-top-color: #9333ea !important;
+ border-top-color: #ffd061 !important;
}
diff --git a/styles/dashou-xym-recharge-theme.wxss b/styles/dashou-xym-recharge-theme.wxss
index 3cdeb11..4b2d43a 100644
--- a/styles/dashou-xym-recharge-theme.wxss
+++ b/styles/dashou-xym-recharge-theme.wxss
@@ -1,7 +1,7 @@
/* 打手充值页 - 逍遥梦风格视觉覆盖(不改 wxml/逻辑) */
.page-container {
- background: linear-gradient(180deg, #c4b5fd 0%, #fff 22%, #f5f3ff 100%) !important;
+ background: linear-gradient(180deg, #f7dc51 0%, #fff 22%, #fff8e1 100%) !important;
}
.page-container::before {
@@ -19,18 +19,18 @@
.dec-line,
.dec-diamond {
- background: #9333ea !important;
+ background: #ffd061 !important;
}
.vip-card {
background: #fdfcfa !important;
- border: 2rpx solid rgba(147, 51, 234, 0.5) !important;
+ border: 2rpx solid rgba(255, 208, 97, 0.5) !important;
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.08) !important;
}
.vip-card.active {
- border-color: #9333ea !important;
- box-shadow: 0 8rpx 28rpx rgba(147, 51, 234, 0.35) !important;
+ border-color: #ffd061 !important;
+ box-shadow: 0 8rpx 28rpx rgba(255, 208, 97, 0.35) !important;
}
.card-frame,
@@ -69,7 +69,7 @@
.tech-buy-btn,
.tech-btn,
.modal-btn.confirm-btn {
- background: linear-gradient(180deg, #c4b5fd, #a78bfa) !important;
+ background: linear-gradient(180deg, #fae04d, #ffc0a3) !important;
border: 2rpx solid #fff !important;
border-radius: 44rpx !important;
box-shadow: 0 4rpx 12rpx rgba(180, 130, 20, 0.25) !important;
@@ -122,8 +122,8 @@
.huiyuan-tag,
.tech-tag {
- background: #ede9fe !important;
- border: 1rpx solid rgba(147, 51, 234, 0.4) !important;
+ background: #fef6d4 !important;
+ border: 1rpx solid rgba(255, 208, 97, 0.4) !important;
}
.tag-name {
@@ -135,7 +135,7 @@
}
.tech-line {
- background: linear-gradient(90deg, transparent, #9333ea, transparent) !important;
+ background: linear-gradient(90deg, transparent, #ffd061, transparent) !important;
}
.tech-modal .modal-container {
@@ -168,13 +168,13 @@
}
.quick-btn {
- background: #ede9fe !important;
- border: 2rpx solid rgba(147, 51, 234, 0.4) !important;
+ background: #fef6d4 !important;
+ border: 2rpx solid rgba(255, 208, 97, 0.4) !important;
}
.quick-btn.active {
- background: linear-gradient(180deg, #c4b5fd, #a78bfa) !important;
- border-color: #9333ea !important;
+ background: linear-gradient(180deg, #fae04d, #ffc0a3) !important;
+ border-color: #ffd061 !important;
}
.quick-text {
@@ -182,7 +182,7 @@
}
.pay-method-item {
- background: #ede9fe !important;
+ background: #fef6d4 !important;
border-radius: 16rpx !important;
}
@@ -204,8 +204,8 @@
}
.spinner-ring {
- border-color: rgba(147, 51, 234, 0.3) !important;
- border-top-color: #9333ea !important;
+ border-color: rgba(255, 208, 97, 0.3) !important;
+ border-top-color: #ffd061 !important;
}
.tech-footer .footer-text {
diff --git a/styles/dashou-xym-theme.wxss b/styles/dashou-xym-theme.wxss
index 7f25372..84fd7e1 100644
--- a/styles/dashou-xym-theme.wxss
+++ b/styles/dashou-xym-theme.wxss
@@ -1,13 +1,13 @@
-/* 打手端抢单页 - 机甲风格辅助样式(不改 wxml / 逻辑) */
+/* 打手端抢单页 - 逍遥梦风格视觉覆盖(不改 wxml 结构/class) */
.xym-lunbo-container {
margin: 8rpx 24rpx 10rpx;
border-radius: 20rpx;
overflow: hidden;
flex-shrink: 0;
- box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.45);
- border: 2rpx solid rgba(0, 200, 255, 0.25);
- background: rgba(18, 22, 38, 0.85);
+ box-shadow: 0 6rpx 18rpx rgba(0, 0, 0, 0.08);
+ border: 2rpx solid rgba(255, 255, 255, 0.7);
+ background: #fff;
}
.xym-section-gap {
@@ -15,34 +15,6 @@
flex-shrink: 0;
}
-.xym-gonggao-bar {
- display: flex;
- align-items: center;
- background: rgba(18, 22, 38, 0.88);
- margin: 0 24rpx 8rpx;
- border-radius: 12rpx;
- padding: 10rpx 16rpx;
- border: 1rpx solid rgba(0, 200, 255, 0.22);
- box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.35);
-}
-
-.xym-gonggao-ico {
- width: 40rpx;
- height: 40rpx;
- flex-shrink: 0;
- margin-right: 12rpx;
-}
-
-.xym-gonggao-txt {
- font-size: 24rpx;
- color: #b0c8f0;
- line-height: 1.5;
- flex: 1;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
-
.xym-lunbo-swiper {
height: 300rpx;
border-radius: 20rpx;
@@ -54,56 +26,331 @@
border-radius: 20rpx;
}
+.qiangdan-page {
+ background: linear-gradient(180deg, #f7dc51 0%, #fff 28%, #fff8e1 100%) !important;
+}
+
+.qiangdan-page::before {
+ display: none !important;
+}
+
+.leixing-quyu {
+ background: #fff !important;
+ border-bottom: none !important;
+ box-shadow: 0 4rpx 14rpx rgba(0, 0, 0, 0.06) !important;
+ margin: 6rpx 20rpx 8rpx !important;
+ border-radius: 28rpx !important;
+ padding: 14rpx 0 8rpx !important;
+ border: 2rpx solid rgba(255, 224, 130, 0.5) !important;
+}
+
+.leixing-scroll {
+ height: 132rpx !important;
+}
+
+.leixing-item {
+ width: 120rpx !important;
+}
+
+.leixing-tupian {
+ width: 88rpx !important;
+ height: 88rpx !important;
+ border-radius: 20rpx !important;
+ border: none !important;
+ box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08) !important;
+}
+
+.leixing-active .leixing-tupian {
+ border: 3rpx solid #ffd061 !important;
+ box-shadow: 0 6rpx 16rpx rgba(255, 208, 97, 0.45) !important;
+}
+
+.leixing-jieshao {
+ margin-top: 8rpx !important;
+ font-size: 22rpx !important;
+ color: #666 !important;
+ text-shadow: none !important;
+}
+
+.leixing-active .leixing-jieshao {
+ color: #492f00 !important;
+ font-weight: 700 !important;
+}
+
+.guangyun-effect {
+ background: radial-gradient(circle, rgba(255, 208, 97, 0.35) 0%, transparent 70%) !important;
+}
+
+.biaoqian-quyu {
+ background: transparent !important;
+ padding: 8rpx 20rpx 0 !important;
+}
+
+.biaoqian-item {
+ background: rgba(255, 255, 255, 0.65) !important;
+ border: 2rpx solid rgba(201, 162, 39, 0.25) !important;
+}
+
+.biaoqian-active {
+ background: linear-gradient(180deg, #fff0c2, #f5d563) !important;
+ border-color: rgba(180, 130, 20, 0.85) !important;
+}
+
+.fenge-xian {
+ background: linear-gradient(90deg, transparent, #ffd061, transparent) !important;
+ opacity: 0.6 !important;
+ margin: 6rpx 30rpx 0 !important;
+}
+
+.dingdan-list {
+ padding: 16rpx 20rpx 0 !important;
+ margin-top: 8rpx !important;
+}
+
.refreshing-text,
.pull-down-text {
- color: #6a9cff !important;
- text-shadow: 0 0 8px rgba(0, 200, 255, 0.35) !important;
+ color: #6b5420 !important;
+ text-shadow: none !important;
}
.tip-text {
- color: #8a9ac0 !important;
+ color: #999 !important;
}
.tip-icon {
- filter: drop-shadow(0 0 16px rgba(0, 200, 255, 0.25)) !important;
- opacity: 0.65 !important;
+ filter: none !important;
+}
+
+.dingdan-card {
+ border-radius: 28rpx !important;
+ box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.08) !important;
+ border: none !important;
+ backdrop-filter: none !important;
+}
+
+.pingtai-card {
+ background: linear-gradient(to bottom, #927a46, #cec180) !important;
+ padding: 0 0 16rpx !important;
+}
+
+.pingtai-card::before,
+.shangjia-card::before {
+ display: none !important;
+}
+
+.pingtai-card .card-top,
+.shangjia-card .card-top {
+ background: linear-gradient(50deg, #957c48, #5c4a28) !important;
+ border-radius: 28rpx 28rpx 0 0 !important;
+ margin: -28rpx -24rpx 16rpx !important;
+ padding: 16rpx 24rpx !important;
+}
+
+.pingtai-tag,
+.creat-time {
+ color: #fcd270 !important;
+}
+
+.shangjia-card {
+ background: linear-gradient(to bottom, #fff8e1, #ffe0b2) !important;
+}
+
+.card-content,
+.jieshao-box,
+.beizhu-box,
+.shangjia-jieshao,
+.shangjia-beizhu {
+ background: rgba(255, 255, 255, 0.55) !important;
+ border-radius: 12rpx !important;
+}
+
+.jieshao-label,
+.beizhu-label,
+.xuqiu-label {
+ color: #87ceeb !important;
+}
+
+.jieshao-text,
+.beizhu-text {
+ color: #333 !important;
+}
+
+.fenyong-box {
+ background: linear-gradient(to bottom, #fae04d, #ffc0a3) !important;
+ border-radius: 30rpx !important;
+}
+
+.fenyong-text,
+.fenyong-price,
+.fenyong-unit {
+ color: #492f00 !important;
+}
+
+.qiangdan-btn,
+.mecha-btn {
+ background: linear-gradient(180deg, #fae04d, #ffc0a3) !important;
+ border: 2rpx solid #fff !important;
+ box-shadow: 0 4rpx 12rpx rgba(180, 130, 20, 0.25) !important;
+}
+
+.qiangdan-btn .btn-text,
+.mecha-btn .btn-text {
+ color: #492f00 !important;
+}
+
+.btn-shine,
+.btn-glow,
+.mecha-overlay {
+ display: none !important;
}
.loading-mask {
- background: rgba(5, 8, 18, 0.92) !important;
+ background: rgba(255, 248, 225, 0.85) !important;
}
.loading-mask-text,
.loading-text,
.no-more-text {
- color: #6a9cff !important;
+ color: #999 !important;
}
.unauthorized-container {
- background: radial-gradient(ellipse at top, #1a1f30, #0b0f1a) !important;
+ background: linear-gradient(180deg, #f7dc51, #fff 50%) !important;
}
.unauthorized-card {
- background: rgba(18, 28, 48, 0.95) !important;
- border: 1rpx solid rgba(0, 200, 255, 0.2) !important;
- box-shadow: 0 12rpx 40rpx rgba(0, 0, 0, 0.55) !important;
+ background: #fdfcfa !important;
+ border: none !important;
+ box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.08) !important;
}
.unauthorized-card .title {
- color: #c0d0ff !important;
+ color: #343434 !important;
}
.unauthorized-card .message,
.unauthorized-card .description {
- color: #8a9ac0 !important;
+ color: #666 !important;
}
.btn-register {
- background: linear-gradient(145deg, #1a2a48, #0e1a30) !important;
- border: 1rpx solid rgba(0, 200, 255, 0.35) !important;
+ background: linear-gradient(180deg, #fae04d, #ffc0a3) !important;
border-radius: 44rpx !important;
}
.btn-register .btn-text {
- color: #fff !important;
+ color: #492f00 !important;
+}
+
+.card-glow {
+ display: none !important;
+}
+
+.order-type-tag {
+ font-size: 22rpx;
+ padding: 6rpx 16rpx;
+ border-radius: 8rpx;
+ font-weight: 600;
+ line-height: 1.4;
+}
+
+.tag-platform {
+ background: rgba(252, 210, 112, 0.22);
+ color: #fcd270;
+ border: 1rpx solid rgba(252, 210, 112, 0.45);
+}
+
+.tag-merchant {
+ background: rgba(255, 255, 255, 0.45);
+ color: #492f00;
+ border: 1rpx solid rgba(255, 208, 97, 0.55);
+}
+
+.fenyong-mark {
+ width: 36rpx;
+ height: 36rpx;
+ line-height: 36rpx;
+ text-align: center;
+ font-size: 22rpx;
+ font-weight: 700;
+ color: #492f00;
+ background: rgba(255, 255, 255, 0.72);
+ border-radius: 50%;
+ margin-right: 8rpx;
+ flex-shrink: 0;
+}
+
+.fenyong-icon {
+ display: none !important;
+}
+
+.qiangdan-btn {
+ min-width: 180rpx !important;
+ height: 68rpx !important;
+ border-radius: 34rpx !important;
+}
+
+.qiangdan-btn .btn-text {
+ font-size: 28rpx !important;
+ font-weight: 700 !important;
+ letter-spacing: 1rpx;
+}
+
+/* 手动刷新悬浮钮(抢单池 / 接单页) */
+.refresh-float {
+ position: fixed;
+ right: 24rpx;
+ top: calc(env(safe-area-inset-top) + 88rpx);
+ z-index: 20;
+ width: 64rpx;
+ height: 64rpx;
+ background: rgba(255, 255, 255, 0.92);
+ border-radius: 50%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ box-shadow: 0 6rpx 16rpx rgba(0, 0, 0, 0.12);
+ border: 2rpx solid rgba(255, 208, 97, 0.45);
+}
+
+.refresh-float:active {
+ transform: scale(0.96);
+}
+
+.refresh-float-ico {
+ width: 34rpx;
+ height: 34rpx;
+}
+
+.dingdanxiang1.filter-card {
+ margin: 12rpx 20rpx 8rpx !important;
+ border-radius: 24rpx !important;
+ background: rgba(255, 255, 255, 0.95) !important;
+ box-shadow: 0 6rpx 18rpx rgba(0, 0, 0, 0.06) !important;
+ border: 2rpx solid rgba(255, 224, 130, 0.45) !important;
+}
+
+.xym-gonggao-bar {
+ margin: 8rpx 20rpx 0;
+ padding: 12rpx 16rpx;
+ border-radius: 12rpx;
+ background: rgba(255, 255, 255, 0.9);
+ display: flex;
+ align-items: center;
+}
+
+.xym-gonggao-ico {
+ width: 32rpx;
+ height: 32rpx;
+ margin-right: 12rpx;
+ flex-shrink: 0;
+}
+
+.xym-gonggao-txt {
+ font-size: 24rpx;
+ color: #492f00;
+ flex: 1;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
}
diff --git a/styles/dashou-xym-user.wxss b/styles/dashou-xym-user.wxss
new file mode 100644
index 0000000..74ba2bf
--- /dev/null
+++ b/styles/dashou-xym-user.wxss
@@ -0,0 +1,292 @@
+/* 打手「我的」页 - 逍遥梦 user 页视觉(仅样式) */
+@import './xym-layout.wxss';
+
+.shadow {
+ box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
+}
+
+.user-page.xym-user {
+ background: linear-gradient(180deg, #f7dc51 0%, #fff 28%, #fff8e1 100%);
+}
+
+.user-page.xym-user .bg-img {
+ display: none;
+}
+
+.user-page.xym-user .wallet-card {
+ margin: 0 30rpx;
+ padding: 20rpx;
+ border-radius: 26rpx;
+ background: #fef6d4;
+}
+
+.user-page.xym-user .w-label {
+ color: #666;
+ font-size: 26rpx;
+}
+
+.user-page.xym-user .w-num {
+ font-size: 44rpx;
+ font-weight: 700;
+ color: #222;
+ margin-top: 10rpx;
+}
+
+.user-page.xym-user .w-sub {
+ color: #666;
+ font-size: 26rpx;
+ margin-top: 8rpx;
+}
+
+.user-page.xym-user .btn-outline {
+ padding: 10rpx 24rpx;
+ font-size: 26rpx;
+ font-weight: 700;
+ border: 2rpx solid #fff;
+ border-radius: 60rpx;
+ background: linear-gradient(180deg, #fae04d, #ffc0a3);
+ color: #492f00;
+ white-space: nowrap;
+ margin-left: 12rpx;
+}
+
+.user-page.xym-user .banner-row {
+ margin: 20rpx 24rpx 0;
+ align-items: flex-start;
+}
+
+.user-page.xym-user .banner-img {
+ width: 48%;
+ height: 150rpx;
+ border-radius: 16rpx;
+ overflow: hidden;
+ background: #eee;
+ display: block;
+}
+
+.user-page.xym-user .banner-row .banner-img:first-child {
+ margin-right: 2%;
+}
+
+.user-page.xym-user .qiepian-wrap {
+ margin: 20rpx 24rpx 0;
+ border-radius: 16rpx;
+ overflow: hidden;
+ box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);
+}
+
+.user-page.xym-user .qiepian-banner {
+ width: 100%;
+ display: block;
+ min-height: 120rpx;
+}
+
+.user-page.xym-user .tip-bar {
+ margin: 22rpx 30rpx 0;
+ padding: 20rpx;
+ border-radius: 20rpx;
+ background: #ffedee;
+ color: #ff4c45;
+ font-size: 26rpx;
+}
+
+.user-page.xym-user .tip-ico {
+ width: 28rpx;
+ height: 28rpx;
+ margin-right: 12rpx;
+}
+
+.user-page.xym-user .tip-arrow {
+ color: #ff4c45;
+ font-size: 36rpx;
+}
+
+.user-page.xym-user .my-box {
+ border-radius: 20rpx;
+ margin: 20rpx;
+ padding-bottom: 10rpx;
+ background: #fdfcfa;
+}
+
+.user-page.xym-user .panel-title {
+ padding: 35rpx 35rpx 0;
+ font-weight: 700;
+}
+
+.user-page.xym-user .lg {
+ font-size: 32rpx;
+ font-weight: 700;
+ color: #222;
+}
+
+.user-page.xym-user .muted {
+ color: #999;
+ font-size: 28rpx;
+}
+
+.user-page.xym-user .sm {
+ font-size: 24rpx;
+ color: #666;
+}
+
+.user-page.xym-user .order-nav {
+ padding: 26rpx 0 10rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-around;
+}
+
+.user-page.xym-user .nav-item {
+ width: 25%;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+}
+
+.user-page.xym-user .icon-wrap {
+ position: relative;
+ display: flex;
+ justify-content: center;
+}
+
+.user-page.xym-user .nav-badge {
+ position: absolute;
+ top: -8rpx;
+ right: 8rpx;
+ min-width: 32rpx;
+ height: 32rpx;
+ line-height: 32rpx;
+ text-align: center;
+ font-size: 20rpx;
+ background: #ff4c45;
+ color: #fff;
+ border-radius: 16rpx;
+ z-index: 1;
+ padding: 0 6rpx;
+}
+
+.user-page.xym-user .nav-icon {
+ width: 62rpx;
+ height: 62rpx;
+ margin-bottom: 10rpx;
+}
+
+.user-page.xym-user .section-hd {
+ font-weight: 700;
+ font-size: 32rpx;
+ padding: 30rpx 20rpx 0;
+ color: #222;
+}
+
+.user-page.xym-user .trade-list {
+ flex-wrap: wrap;
+ padding: 20rpx 10rpx;
+ display: flex;
+ align-items: center;
+ justify-content: flex-start;
+}
+
+.user-page.xym-user .trade-item {
+ width: 20%;
+ padding: 12rpx 0;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+}
+
+.user-page.xym-user .trade-icon {
+ width: 50rpx;
+ height: 50rpx;
+ margin-bottom: 10rpx;
+}
+
+.user-page.xym-user .invite-row {
+ padding: 20rpx 10rpx 30rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-around;
+}
+
+.user-page.xym-user .invite-item {
+ width: 33.33%;
+ padding: 10rpx 0;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+}
+
+.user-page.xym-user .invite-icon {
+ width: 50rpx;
+ height: 50rpx;
+ margin-bottom: 8rpx;
+}
+
+.user-page.xym-user .func-list {
+ display: flex;
+ flex-wrap: wrap;
+ padding: 10rpx 0;
+}
+
+.user-page.xym-user .func-item-xym {
+ width: 25%;
+ padding: 16rpx 0;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+}
+
+.user-page.xym-user .func-icon-wrap {
+ width: 88rpx;
+ height: 88rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-bottom: 8rpx;
+}
+
+.user-page.xym-user .func-icon-xym {
+ width: 48rpx;
+ height: 48rpx;
+}
+
+.user-page.xym-user .func-txt-xym {
+ font-size: 24rpx;
+ color: #666;
+ text-align: center;
+}
+
+.user-page.xym-user .follow-kuaishou {
+ position: fixed;
+ right: 0;
+ bottom: calc(280rpx + env(safe-area-inset-bottom));
+ z-index: 99;
+ display: flex;
+ align-items: center;
+ background: rgba(255, 255, 255, 0.95);
+ border-radius: 40rpx 0 0 40rpx;
+ padding: 12rpx 16rpx 12rpx 20rpx;
+ box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);
+}
+
+.user-page.xym-user .follow-kuaishou.expanded {
+ padding-right: 24rpx;
+}
+
+.user-page.xym-user .ks-icon {
+ width: 48rpx;
+ height: 48rpx;
+}
+
+.user-page.xym-user .ks-text {
+ font-size: 24rpx;
+ color: #333;
+ margin-left: 10rpx;
+ white-space: nowrap;
+}
+
+.user-page.xym-user .load-tip {
+ text-align: center;
+ color: #999;
+ font-size: 24rpx;
+ padding: 24rpx 0 40rpx;
+}
diff --git a/styles/shangjia-merchant-order-card.wxss b/styles/shangjia-merchant-order-card.wxss
index b189047..966be62 100644
--- a/styles/shangjia-merchant-order-card.wxss
+++ b/styles/shangjia-merchant-order-card.wxss
@@ -5,7 +5,7 @@
margin-bottom: 24rpx;
border-radius: 30rpx;
position: relative;
- background: linear-gradient(to bottom, #f5f3ff, #ddd6fe);
+ background: linear-gradient(to bottom, #fff8e1, #ffe0b2);
box-sizing: border-box;
overflow: hidden;
box-shadow: 0 12rpx 32rpx rgba(0, 0, 0, 0.12);
diff --git a/styles/shangjia-xym-common.wxss b/styles/shangjia-xym-common.wxss
index 1dfbc0d..e15ccb5 100644
--- a/styles/shangjia-xym-common.wxss
+++ b/styles/shangjia-xym-common.wxss
@@ -10,7 +10,7 @@
min-height: 100vh;
display: flex;
flex-direction: column;
- background: linear-gradient(180deg, #c4b5fd 0%, #fff 28%, #f5f3ff 100%);
+ background: linear-gradient(180deg, #f7dc51 0%, #fff 28%, #fff8e1 100%);
box-sizing: border-box;
overflow: hidden;
}
@@ -49,13 +49,13 @@
font-weight: 700;
border: 2rpx solid #fff;
border-radius: 60rpx;
- background: linear-gradient(180deg, #c4b5fd, #a78bfa);
+ background: linear-gradient(180deg, #fae04d, #ffc0a3);
color: #492f00;
white-space: nowrap;
}
.sj-btn-bg {
- background: linear-gradient(180deg, #c4b5fd, #a78bfa);
+ background: linear-gradient(180deg, #fae04d, #ffc0a3);
border-radius: 60rpx;
color: #492f00;
font-weight: 700;
@@ -66,7 +66,7 @@
font-size: 20rpx;
padding: 4rpx 12rpx;
border-radius: 8rpx;
- background: #8b5cf6;
+ background: #ffb74d;
color: #fff;
}
@@ -74,7 +74,7 @@
margin: 0 30rpx;
padding: 24rpx 20rpx;
border-radius: 26rpx;
- background: #ede9fe;
+ background: #fef6d4;
}
.sj-w-label {
@@ -129,11 +129,11 @@
}
.sj-fadan-btn--regular {
- background: linear-gradient(135deg, #f5f3ff, #ddd6fe);
+ background: linear-gradient(135deg, #fff8e1, #ffe0b2);
}
.sj-fadan-btn--custom {
- background: linear-gradient(135deg, #ede9fe, #c4b5fd);
+ background: linear-gradient(135deg, #fef6d4, #ffd061);
}
.sj-fadan-title {
@@ -219,7 +219,7 @@
text-align: center;
padding: 16rpx 8rpx;
border-radius: 12rpx;
- background: linear-gradient(180deg, #f5f3ff, #ede9fe);
+ background: linear-gradient(180deg, #fff8e1, #fef6d4);
font-size: 24rpx;
color: #492f00;
font-weight: 600;
diff --git a/styles/shangjia-xym-form.wxss b/styles/shangjia-xym-form.wxss
index 6239952..40b153c 100644
--- a/styles/shangjia-xym-form.wxss
+++ b/styles/shangjia-xym-form.wxss
@@ -7,11 +7,11 @@
padding: 24rpx;
padding-bottom: 160rpx;
box-sizing: border-box;
- background: linear-gradient(180deg, #c4b5fd 0%, #f5f5f5 18%, #f5f5f5 100%);
+ background: linear-gradient(180deg, #f7dc51 0%, #fff8e1 18%, #fff8e1 100%);
}
.sj-form-theme .balance-card {
- background: #ede9fe !important;
+ background: #fef6d4 !important;
border-radius: 26rpx !important;
padding: 28rpx 24rpx !important;
margin-bottom: 20rpx !important;
@@ -76,7 +76,7 @@
}
.sj-form-theme .card-dot {
- background: #9333ea !important;
+ background: #ffd061 !important;
}
.sj-form-theme .card-title,
@@ -108,12 +108,12 @@
.sj-form-theme .type-chip--active,
.sj-form-theme .type-active {
- background: linear-gradient(180deg, #c4b5fd, #a78bfa) !important;
+ background: linear-gradient(180deg, #fae04d, #ffc0a3) !important;
color: #492f00 !important;
font-weight: 700 !important;
border: none !important;
transform: none !important;
- box-shadow: 0 4rpx 12rpx rgba(147, 51, 234, 0.35) !important;
+ box-shadow: 0 4rpx 12rpx rgba(255, 208, 97, 0.45) !important;
}
.sj-form-theme .type-text {
@@ -161,11 +161,11 @@
}
.sj-form-theme .submit-btn {
- background: linear-gradient(180deg, #c4b5fd, #a78bfa) !important;
+ background: linear-gradient(180deg, #fae04d, #ffc0a3) !important;
color: #492f00 !important;
border-radius: 44rpx !important;
font-weight: 700 !important;
- box-shadow: 0 6rpx 16rpx rgba(147, 51, 234, 0.35) !important;
+ box-shadow: 0 6rpx 16rpx rgba(255, 208, 97, 0.45) !important;
}
.sj-form-theme .submit-bar {
@@ -174,7 +174,7 @@
}
.sj-form-theme switch {
- color: #9333ea !important;
+ color: #ffd061 !important;
}
.sj-form-theme .search-section {
@@ -197,7 +197,7 @@
}
.sj-form-theme .search-btn {
- background: linear-gradient(180deg, #c4b5fd, #a78bfa) !important;
+ background: linear-gradient(180deg, #fae04d, #ffc0a3) !important;
box-shadow: none !important;
}
@@ -233,7 +233,7 @@
.sj-form-theme .generate-grid-btn,
.sj-form-theme .copy-grid-btn,
.sj-form-theme .action-grid-btn {
- background: linear-gradient(180deg, #c4b5fd, #a78bfa) !important;
+ background: linear-gradient(180deg, #fae04d, #ffc0a3) !important;
color: #492f00 !important;
border: 2rpx solid #fff !important;
box-shadow: none !important;
@@ -250,7 +250,7 @@
}
.sj-form-theme .tutorial-btn {
- background: linear-gradient(180deg, #c4b5fd, #a78bfa) !important;
+ background: linear-gradient(180deg, #fae04d, #ffc0a3) !important;
color: #492f00 !important;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1) !important;
}
diff --git a/styles/xym-layout.wxss b/styles/xym-layout.wxss
new file mode 100644
index 0000000..491c41e
--- /dev/null
+++ b/styles/xym-layout.wxss
@@ -0,0 +1,5 @@
+/* 逍遥梦布局工具类 */
+.flex { display: flex; align-items: center; }
+.flexb { display: flex; align-items: center; justify-content: space-between; }
+.flexa { display: flex; align-items: center; justify-content: space-around; }
+.flexmc { display: flex; flex-direction: column; align-items: center; justify-content: center; }
diff --git a/styles/xym-recharge-shared.wxss b/styles/xym-recharge-shared.wxss
new file mode 100644
index 0000000..93243d9
--- /dev/null
+++ b/styles/xym-recharge-shared.wxss
@@ -0,0 +1,171 @@
+/* 会员/保证金充值页共用弹窗与 loading */
+.modal-mask {
+ position: fixed;
+ inset: 0;
+ background: rgba(0, 0, 0, 0.45);
+ z-index: 1000;
+ display: flex;
+ align-items: flex-end;
+ justify-content: center;
+}
+
+.modal-panel {
+ width: 100%;
+ background: #fff;
+ border-radius: 32rpx 32rpx 0 0;
+ padding: 32rpx 28rpx calc(24rpx + env(safe-area-inset-bottom));
+}
+
+.modal-title {
+ display: block;
+ font-size: 34rpx;
+ font-weight: 700;
+ text-align: center;
+ margin-bottom: 8rpx;
+}
+
+.modal-sub {
+ display: block;
+ text-align: center;
+ font-size: 24rpx;
+ color: #999;
+ margin-bottom: 24rpx;
+}
+
+.amount-input-wrap {
+ display: flex;
+ align-items: center;
+ border-bottom: 2rpx solid #f0e6d8;
+ padding-bottom: 12rpx;
+ margin-bottom: 20rpx;
+}
+
+.amount-prefix {
+ font-size: 40rpx;
+ font-weight: 700;
+ color: #492f00;
+ margin-right: 8rpx;
+}
+
+.amount-input {
+ flex: 1;
+ font-size: 36rpx;
+}
+
+.quick-row {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 16rpx;
+ margin-bottom: 24rpx;
+}
+
+.quick-chip {
+ padding: 12rpx 24rpx;
+ border-radius: 999rpx;
+ background: #f5f5f5;
+ font-size: 26rpx;
+ color: #666;
+}
+
+.quick-chip.active {
+ background: #fff3cd;
+ color: #492f00;
+ font-weight: 600;
+}
+
+.modal-actions {
+ display: flex;
+ gap: 20rpx;
+}
+
+.modal-btn {
+ flex: 1;
+ height: 88rpx;
+ border-radius: 44rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 30rpx;
+}
+
+.modal-btn.cancel {
+ background: #f5f5f5;
+ color: #666;
+}
+
+.modal-btn.confirm {
+ background: linear-gradient(90deg, #fae04d, #ffc0a3);
+ color: #492f00;
+ font-weight: 700;
+}
+
+.pay-method-item {
+ padding: 28rpx 20rpx;
+ border-bottom: 1rpx solid #f0f0f0;
+}
+
+.pay-method-name {
+ display: block;
+ font-size: 30rpx;
+ font-weight: 600;
+}
+
+.pay-method-desc {
+ display: block;
+ font-size: 24rpx;
+ color: #999;
+ margin-top: 6rpx;
+}
+
+.balance-item {
+ display: flex;
+ justify-content: space-between;
+ padding: 24rpx 12rpx;
+ border-bottom: 1rpx solid #f5f5f5;
+ font-size: 28rpx;
+}
+
+.balance-need {
+ color: #e6a23c;
+ font-weight: 600;
+}
+
+.confirm-row {
+ display: flex;
+ justify-content: space-between;
+ padding: 16rpx 0;
+ font-size: 28rpx;
+}
+
+.loading-mask {
+ position: fixed;
+ inset: 0;
+ background: rgba(0, 0, 0, 0.35);
+ z-index: 2000;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.loading-box {
+ background: #fff;
+ border-radius: 20rpx;
+ padding: 40rpx 48rpx;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 16rpx;
+}
+
+.loading-spinner {
+ width: 56rpx;
+ height: 56rpx;
+ border: 4rpx solid #f0e6d8;
+ border-top-color: #f5a623;
+ border-radius: 50%;
+ animation: spin 0.8s linear infinite;
+}
+
+@keyframes spin {
+ to { transform: rotate(360deg); }
+}
diff --git a/tab-bar/index.wxss b/tab-bar/index.wxss
index e9a5bd1..b348446 100644
--- a/tab-bar/index.wxss
+++ b/tab-bar/index.wxss
@@ -47,7 +47,7 @@
}
.c-tab-txt-on {
- color: #9333ea;
+ color: #ffd061;
font-weight: 600;
}
diff --git a/utils/dashou-profile.js b/utils/dashou-profile.js
index 938f57f..ee93a3d 100644
--- a/utils/dashou-profile.js
+++ b/utils/dashou-profile.js
@@ -29,7 +29,7 @@ export function userHasHuiyuan(huiyuanList, huiyuanId) {
const list = huiyuanList || [];
const req = String(huiyuanId);
return list.some((h) => {
- if (String(h.huiyuanid) === req) return true;
+ if (String(h.huiyuanid) === req || String(h.huiyuan_id) === req) return true;
const covers = h.included_huiyuan_ids || h.covers || [];
return Array.isArray(covers) && covers.some((id) => String(id) === req);
});
diff --git a/utils/miniapp-icons.js b/utils/miniapp-icons.js
index c17fc7f..6192e08 100644
--- a/utils/miniapp-icons.js
+++ b/utils/miniapp-icons.js
@@ -22,22 +22,76 @@ export const ICON_KEYS = {
MERCHANT_REFRESH: 'merchant_refresh',
FIGHTER_RECHARGE_MEMBER: 'fighter_recharge_member',
FIGHTER_RECHARGE_DEPOSIT: 'fighter_recharge_deposit',
+ FIGHTER_RECHARGE_VIP_BG: 'fighter_recharge_vip_bg',
+ FIGHTER_DEPOSIT_BG: 'fighter_deposit_bg',
+ FIGHTER_DEPOSIT_HERO: 'fighter_deposit_hero',
+ FIGHTER_DEPOSIT_BENEFIT_1: 'fighter_deposit_benefit_1',
+ FIGHTER_DEPOSIT_BENEFIT_2: 'fighter_deposit_benefit_2',
+ FIGHTER_DEPOSIT_BENEFIT_3: 'fighter_deposit_benefit_3',
+ FIGHTER_DEPOSIT_BENEFIT_4: 'fighter_deposit_benefit_4',
+ FIGHTER_RECHARGE_BENEFIT_1: 'fighter_recharge_benefit_1',
+ FIGHTER_RECHARGE_BENEFIT_2: 'fighter_recharge_benefit_2',
+ FIGHTER_RECHARGE_BENEFIT_3: 'fighter_recharge_benefit_3',
+ FIGHTER_RECHARGE_ADVANTAGE_1: 'fighter_recharge_advantage_1',
+ FIGHTER_RECHARGE_ADVANTAGE_2: 'fighter_recharge_advantage_2',
+ FIGHTER_RECHARGE_ADVANTAGE_3: 'fighter_recharge_advantage_3',
+ FIGHTER_RECHARGE_ADVANTAGE_4: 'fighter_recharge_advantage_4',
+ FIGHTER_ORDER_PENDING: 'fighter_order_pending',
+ FIGHTER_ORDER_SETTLING: 'fighter_order_settling',
+ FIGHTER_ORDER_DONE: 'fighter_order_done',
+ FIGHTER_ORDER_CLOSED: 'fighter_order_closed',
+ FIGHTER_TRADE_COMMISSION: 'fighter_trade_commission',
+ FIGHTER_TRADE_WITHDRAW: 'fighter_trade_withdraw',
+ FIGHTER_TRADE_SETTLE: 'fighter_trade_settle',
+ FIGHTER_TRADE_DEDUCT: 'fighter_trade_deduct',
+ FIGHTER_TRADE_RECHARGE: 'fighter_trade_recharge',
+ FIGHTER_INVITE_SUBORDINATE: 'fighter_invite_subordinate',
+ FIGHTER_INVITE_POSTER: 'fighter_invite_poster',
+ FIGHTER_INVITE_CODE: 'fighter_invite_code',
+ FIGHTER_KUAISHOU_CASH: 'fighter_kuaishou_cash',
+ FIGHTER_MINE_COPY: 'fighter_mine_copy',
+ FIGHTER_MINE_EDIT: 'fighter_mine_edit',
+ FIGHTER_MINE_QIEPIAN: 'fighter_mine_qiepian',
+ FIGHTER_MINE_PENALTY_TIP: 'fighter_mine_penalty_tip',
+ FIGHTER_MINE_KEFU: 'fighter_mine_kefu',
+ FIGHTER_MINE_SHANGJIA: 'fighter_mine_shangjia',
+ FIGHTER_MINE_PUNISH: 'fighter_mine_punish',
+ FIGHTER_MINE_MEDAL: 'fighter_mine_medal',
+ FIGHTER_MINE_BOOK: 'fighter_mine_book',
+ FIGHTER_MINE_RANK: 'fighter_mine_rank',
+ FIGHTER_MINE_INVITE: 'fighter_mine_invite',
+ FIGHTER_MINE_CONTACT: 'fighter_mine_contact',
+ FIGHTER_MINE_RECORD: 'fighter_mine_record',
+ FIGHTER_MINE_KAOHE_DAFEN: 'fighter_mine_kaohe_dafen',
+ FIGHTER_MINE_KAOHE_JILU: 'fighter_mine_kaohe_jilu',
+ FIGHTER_MINE_KAOHE_ZHONGXIN: 'fighter_mine_kaohe_zhongxin',
+ FIGHTER_MINE_DASHOU_AUTH: 'fighter_mine_dashou_auth',
+ FIGHTER_MINE_CLEAR: 'fighter_mine_clear',
+ FIGHTER_MINE_SWITCH: 'fighter_mine_switch',
MINE_PINDAO: 'mine_pindao',
ICON_REFRESH: 'icon_refresh',
};
-/** 仅后台上传后才展示,不使用 CDN/本地兜底 */
+/** 仅后台上传后才展示(页面大背景),横幅/功能图标走 resolveMiniappIcon */
export const CONFIG_ONLY_ICON_KEYS = new Set([
- ICON_KEYS.FIGHTER_RECHARGE_MEMBER,
- ICON_KEYS.FIGHTER_RECHARGE_DEPOSIT,
+ ICON_KEYS.FIGHTER_RECHARGE_VIP_BG,
+ ICON_KEYS.FIGHTER_DEPOSIT_BG,
+ ICON_KEYS.FIGHTER_DEPOSIT_HERO,
]);
+export const ICON_FOLDER = 'beijing/tubiao/chengxutubiao';
+
/** 逍遥梦原版金牌横幅(硬编码时代 82.png) */
export const MERCHANT_GOLD_BANNER_FALLBACK = 'https://bintao.xmxym88.com/xcx/bintao/82.png';
/** 频道入口图标默认相对路径(拼接 ossImageUrl;后台上传 mine_pindao 后覆盖) */
export const PINDAO_ICON_FALLBACK = 'beijing/tubiao/grzx_pindao.jpg';
+/** 打手中心图标默认相对路径(后台未上传时由后端 default 下发,此处仅离线兜底) */
+export function defaultIconRel(key) {
+ return `${ICON_FOLDER}/${key}.png`;
+}
+
function ossBase(app) {
return (app && app.globalData && app.globalData.ossImageUrl) || '';
}
@@ -69,7 +123,12 @@ export function resolveMiniappIcon(app, key, fallback = '') {
}
const icons = (app && app.globalData && app.globalData.miniappIcons) || {};
const path = icons[key];
- if (!path) return fallback;
+ if (!path) {
+ if (!fallback) return '';
+ if (fallback.startsWith('http')) return fallback;
+ const base = ossBase(app);
+ return base ? base + fallback : fallback;
+ }
if (path.startsWith('http')) return path;
return ossBase(app) + path;
}
@@ -97,7 +156,6 @@ export function resolvePindaoImages(app) {
}).filter(Boolean);
}
-/** 预加载频道图片,减少弹窗打开后等待 */
export function preloadPindaoImages(urls) {
(urls || []).forEach((src) => {
if (!src) return;
@@ -105,7 +163,6 @@ export function preloadPindaoImages(urls) {
});
}
-/** 打开频道前拉取最新 qdpzhq 配置(避免本地缓存无 pindao 数据) */
export async function refreshPindaoConfig(app) {
app = app || getApp();
try {
@@ -131,7 +188,6 @@ export async function refreshPindaoConfig(app) {
return { cfg, images };
}
-/** 后台静默预热频道(不打断 UI) */
export function warmupPindaoConfig(app) {
const cached = resolvePindaoImages(app || getApp());
if (cached.length) preloadPindaoImages(cached);
@@ -154,7 +210,6 @@ export function resolvePosterBg(app, role) {
return path.startsWith('http') ? path : base + path;
}
-/** 进入海报页拉取当前俱乐部背景配置 */
export async function refreshPosterConfig(app) {
app = app || getApp();
try {