restore: 恢复橙色逍遥梦UI版本(2ea2860)到主分支
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
513
pages/withdraw/components/record-mode2/record-mode2.js
Normal file
513
pages/withdraw/components/record-mode2/record-mode2.js
Normal file
@@ -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() {}
|
||||
}
|
||||
});
|
||||
7
pages/withdraw/components/record-mode2/record-mode2.json
Normal file
7
pages/withdraw/components/record-mode2/record-mode2.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"global-notification": "/components/global-notification/global-notification",
|
||||
"popup-notice": "/components/popup-notice/popup-notice"
|
||||
}
|
||||
}
|
||||
90
pages/withdraw/components/record-mode2/record-mode2.wxml
Normal file
90
pages/withdraw/components/record-mode2/record-mode2.wxml
Normal file
@@ -0,0 +1,90 @@
|
||||
<!-- record-mode2:仅提现记录(自动打款) -->
|
||||
<view class="app">
|
||||
<image class="global-bg" src="{{imgUrls.pageBg}}" mode="aspectFill" />
|
||||
|
||||
<view class="history-section history-section--full">
|
||||
<view class="history-header">
|
||||
<text class="history-title">提现记录</text>
|
||||
</view>
|
||||
|
||||
<view wx:if="{{hasPendingCollect}}" class="pending-tip">
|
||||
您有审核通过的提现待收款,请点击「收款」按钮,在微信中主动确认后才能到账。
|
||||
</view>
|
||||
|
||||
<scroll-view class="filter-scroll" scroll-x show-scrollbar="{{false}}">
|
||||
<view class="filter-track">
|
||||
<view
|
||||
wx:for="{{statusTabs}}"
|
||||
wx:key="value"
|
||||
class="filter-chip {{currentStatusFilter == item.value ? 'active' : ''}}"
|
||||
bindtap="onStatusFilterTap"
|
||||
data-value="{{item.value}}"
|
||||
>{{item.label}}</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<scroll-view class="history-scroll" scroll-y enable-back-to-top bindscrolltolower="onReachBottom">
|
||||
<view wx:for="{{recordList}}" wx:key="index" class="history-item">
|
||||
<view class="history-info">
|
||||
<text class="history-amount">¥{{item.jine}}</text>
|
||||
<text class="history-time">{{item.create}}</text>
|
||||
</view>
|
||||
<view class="history-detail">
|
||||
<text class="history-method">微信零钱</text>
|
||||
<text class="history-type">{{item.leixingLabel}}</text>
|
||||
</view>
|
||||
<view class="history-status">
|
||||
<view
|
||||
wx:if="{{item.canCollect}}"
|
||||
class="status-badge status-pending collect-tappable"
|
||||
bindtap="onCollectTap"
|
||||
data-index="{{index}}"
|
||||
>
|
||||
<text>{{item.statusText}}</text>
|
||||
<text class="collect-sub">点击收款</text>
|
||||
</view>
|
||||
<view wx:elif="{{item.canShowDetail}}" class="status-badge status-fail">
|
||||
{{item.statusText}}
|
||||
<text class="fail-link" bindtap="onViewDetail" data-index="{{index}}">详情</text>
|
||||
</view>
|
||||
<view wx:else class="status-badge {{item.statusBadgeClass}}">{{item.statusText}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{loading}}" class="load-tip">加载中...</view>
|
||||
<view wx:if="{{nomore && recordList.length > 0}}" class="more-tip">—— 没有更多了 ——</view>
|
||||
<view wx:if="{{!nomore && recordList.length > 0}}" class="load-more-btn" bindtap="onReachBottom">加载更多记录</view>
|
||||
<view wx:if="{{recordList.length === 0 && !loading}}" class="load-tip">暂无提现记录</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<view class="safe-bottom"></view>
|
||||
</view>
|
||||
|
||||
<view wx:if="{{showCollectConfirm}}" class="modal-mask" bindtap="onCloseCollectConfirm">
|
||||
<view class="modal-dialog" catchtap="stopPropagation">
|
||||
<view class="modal-header">确认收款</view>
|
||||
<view class="modal-body">
|
||||
<view class="auto-tip">审核已通过,{{collectConfirmRecord.leixingLabel}} ¥{{collectConfirmRecord.jine}}</view>
|
||||
<view>请点击「去收款」,然后在微信弹窗中主动确认,资金才会打入您的微信零钱。</view>
|
||||
<view class="warn-tip" wx:if="{{collectConfirmRecord.shenhe_danhao}}">审核单号:{{collectConfirmRecord.shenhe_danhao}}</view>
|
||||
<view class="warn-tip">注意:审核通过≠已到账,必须您本人点击确认才能完成收款!</view>
|
||||
</view>
|
||||
<view class="modal-footer">
|
||||
<view class="modal-btn cancel" bindtap="onCloseCollectConfirm">稍后再说</view>
|
||||
<view class="modal-btn confirm" bindtap="onConfirmCollect">{{submitting ? '处理中...' : '去收款'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view wx:if="{{showDetailModal}}" class="modal-mask" bindtap="onCloseDetailModal">
|
||||
<view class="modal-dialog" catchtap="stopPropagation">
|
||||
<view class="modal-header">{{detailTitle}}</view>
|
||||
<view class="modal-body">{{detailContent}}</view>
|
||||
<view class="modal-footer">
|
||||
<view class="modal-btn confirm" bindtap="onCloseDetailModal">知道了</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<global-notification id="global-notification" />
|
||||
<popup-notice id="popupNotice" />
|
||||
416
pages/withdraw/components/record-mode2/record-mode2.wxss
Normal file
416
pages/withdraw/components/record-mode2/record-mode2.wxss
Normal file
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user