1038 lines
26 KiB
Vue
1038 lines
26 KiB
Vue
<template>
|
||
<s-pages :bgStyle="{ color: 'var(--color1)' }" title="金种子兑换" pink_bg>
|
||
<view class="pages w100 h100">
|
||
<view class="content h100">
|
||
<view class="con h100">
|
||
<view class="top-card-wrap p-x-20 p-y-40">
|
||
<view class="top-card">
|
||
<view class="top-card__main">
|
||
<view class="top-card__price-head">
|
||
<view class="top-card__price-col">
|
||
<view class="top-card__label">{{ assetData.priceLabel }}</view>
|
||
<view class="top-card__price-row">
|
||
<text class="top-card__price">{{ assetData.priceText }}</text>
|
||
</view>
|
||
</view>
|
||
<view class="top-card__action">
|
||
<view class="top-card__btn" @click="openExchangePopup">兑换</view>
|
||
</view>
|
||
</view>
|
||
<view class="top-card__stats">
|
||
<view class="top-card__stat">
|
||
<view class="top-card__stat-label">{{ assetData.holdLabel }}</view>
|
||
<view class="top-card__stat-value">{{ assetData.holdText }}</view>
|
||
</view>
|
||
<view class="top-card__divider-v"></view>
|
||
<view class="top-card__stat">
|
||
<view class="top-card__stat-label">{{ assetData.frozenLabel }}</view>
|
||
<view class="top-card__stat-value">{{ assetData.frozenText }}</view>
|
||
</view>
|
||
<view class="top-card__divider-v"></view>
|
||
<view class="top-card__stat">
|
||
<view class="top-card__stat-label">{{ assetData.writeOffLabel }}</view>
|
||
<view class="top-card__stat-value">{{ assetData.writeOffText }}</view>
|
||
</view>
|
||
<view class="top-card__divider-v"></view>
|
||
<view class="top-card__stat">
|
||
<view class="top-card__stat-label">{{ assetData.dividendLabel }}</view>
|
||
<view class="top-card__stat-value top-card__stat-value--accent">{{ assetData.dividendText }}</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="record-card p-x-20 p-b-40">
|
||
<view class="record-card__inner r_16 p-20">
|
||
<view class="record-card__title center">兑换记录</view>
|
||
<view class="record-list__body">
|
||
<view v-for="(v, i) in detailList" :key="v.id || i" class="record-item">
|
||
<view class="record-item__left">
|
||
<view class="record-item__head">
|
||
<view class="record-item__title">兑换金种子</view>
|
||
<view class="record-item__amount">
|
||
{{ formatAmount(v.packageAmount) }} 枚
|
||
</view>
|
||
</view>
|
||
<view class="change-card" :class="Number(v.status) === 0 ? 'change-card--pending' : ''">
|
||
<view v-if="Number(v.status) === 0" class="change-card__pending-tag">
|
||
<text class="record-item__status record-item__status--pending">
|
||
{{ statusMap[Number(v.status)] || v.statusDesc || '' }}
|
||
</text>
|
||
</view>
|
||
<view class="change-card__left" :class="Number(v.status) === 0 ? 'change-card__left--pending' : ''">
|
||
<view class="change-card__price-label">兑换价格</view>
|
||
<view class="change-card__price-row" :class="Number(v.status) === 0 ? 'change-card__price-row--with-cancel' : ''">
|
||
<view class="change-card__price-main">
|
||
<text class="change-card__price-symbol">¥</text>
|
||
<text class="change-card__price-value">{{ formatRecordPrice(v.price) }}</text>
|
||
</view>
|
||
<view v-if="Number(v.status) === 0" class="cancel-btn cancel-btn--inline" @click="handleCancel(v)">撤单</view>
|
||
</view>
|
||
</view>
|
||
<view v-if="Number(v.status) !== 0" class="change-card__divider"></view>
|
||
<view v-if="Number(v.status) !== 0" class="change-card__right" :class="[getStatusRightClass(v.status)]">
|
||
<view class="change-card__right-top">
|
||
<view class="record-item__status" :class="getStatusClass(v.status)">
|
||
{{ statusMap[Number(v.status)] || v.statusDesc || '' }}
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="record-item__meta-row">
|
||
<text class="record-item__meta-label">创建时间:</text>
|
||
<text class="record-item__meta-value">{{ formatDateTime(v.createTime) }}</text>
|
||
</view>
|
||
<view v-if="v.approveTime" class="record-item__meta-row">
|
||
<text class="record-item__meta-label">{{ Number(v.status) === 3 ? '撤单时间:' : '审核时间:' }}</text>
|
||
<text class="record-item__meta-value">{{ formatDateTime(v.approveTime) }}</text>
|
||
</view>
|
||
<view v-if="v.approveRemark && Number(v.status) !== 3" class="record-item__remark-row">
|
||
<text class="record-item__remark-label">备注:</text>
|
||
<text class="record-item__remark-text">{{ v.approveRemark }}</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view v-if="detailList.length === 0 && !loadingList" class="empty-list">暂无兑换记录</view>
|
||
<view v-if="loadingList" class="empty-list">加载中...</view>
|
||
<view v-if="detailList.length > 0 && noMore" class="empty-list empty-list--hint">没有更多了</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view v-if="popupVisible" class="popup-mask" @click="closeExchangePopup">
|
||
<view class="popup-dialog" @click.stop>
|
||
<view class="popup-header">
|
||
<view class="popup-title">兑换金种子</view>
|
||
<view class="popup-close" @click="closeExchangePopup">×</view>
|
||
</view>
|
||
<view class="popup-body">
|
||
<view class="popup-balance">
|
||
<view class="popup-balance__item">
|
||
<text class="popup-balance-label">当前持有</text>
|
||
<text class="popup-balance-value">{{ assetData.holdText }} 枚</text>
|
||
</view>
|
||
<view class="popup-balance__divider"></view>
|
||
<view class="popup-balance__item">
|
||
<text class="popup-balance-label">冻结数量</text>
|
||
<text class="popup-balance-value">{{ assetData.frozenText }} 枚</text>
|
||
</view>
|
||
</view>
|
||
<view class="popup-fixed-box">
|
||
<view class="popup-fixed-label">本次兑换</view>
|
||
<view class="popup-fixed-value">
|
||
<text class="popup-fixed-num">{{ exchangeAmount }}</text>
|
||
<text class="popup-fixed-unit">枚</text>
|
||
</view>
|
||
<view class="popup-fixed-tag">每笔固定 {{ exchangeAmount }} 金种子</view>
|
||
</view>
|
||
<view class="popup-input-box">
|
||
<view class="popup-input-label">兑换价格</view>
|
||
<view class="popup-input-row">
|
||
<text class="popup-input-symbol">¥</text>
|
||
<input class="popup-input" type="digit" :value="inputPrice" @input="onPriceInput" placeholder="请输入兑换价格" />
|
||
</view>
|
||
</view>
|
||
<view class="popup-tip">
|
||
<uni-icons type="info" color="#C6C6C6" size="20" />
|
||
<text class="popup-tip-text">请慎重考虑,一经提交,不可撤销</text>
|
||
</view>
|
||
</view>
|
||
<view class="popup-footer">
|
||
<view class="popup-btn popup-btn--cancel" @click="closeExchangePopup">取消</view>
|
||
<view class="popup-btn popup-btn--confirm" @click="submitExchange">确认兑换</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</s-pages>
|
||
</template>
|
||
|
||
<script setup>
|
||
import { ref, reactive, computed, getCurrentInstance } from 'vue';
|
||
import { onShow, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app';
|
||
import sheep from '@/sheep';
|
||
import * as homeApi from '@/sheep/api/home/index';
|
||
|
||
const { proxy } = getCurrentInstance();
|
||
const PAGE_SIZE = 20;
|
||
|
||
const exchangeAmount = ref(100);
|
||
const inputPrice = ref('');
|
||
const popupVisible = ref(false);
|
||
const detailList = ref([]);
|
||
const dataObj = reactive({});
|
||
const load = ref(false);
|
||
const pageNo = ref(1);
|
||
const loadingList = ref(false);
|
||
const noMore = ref(false);
|
||
|
||
const statusMap = {
|
||
0: '待审核',
|
||
1: '审核通过',
|
||
2: '审核拒绝',
|
||
3: '已撤单',
|
||
};
|
||
|
||
const getStatusClass = (status) => {
|
||
const s = Number(status);
|
||
if (s === 1) return 'record-item__status--pass';
|
||
if (s === 2 || s === 3) return 'record-item__status--reject';
|
||
return 'record-item__status--pending';
|
||
};
|
||
|
||
const getStatusRightClass = (status) => {
|
||
const s = Number(status);
|
||
if (s === 1) return 'change-card__right--pass';
|
||
if (s === 2 || s === 3) return 'change-card__right--reject';
|
||
return 'change-card__right--pending';
|
||
};
|
||
|
||
const assetData = computed(() => {
|
||
const price = dataObj?.todayPrice;
|
||
const hold = dataObj?.myCount;
|
||
const frozen = dataObj?.frozenCount;
|
||
const writeOff = dataObj?.writeOffCount;
|
||
const dividend = dataObj?.dividendCount;
|
||
return {
|
||
priceLabel: '当前价格',
|
||
holdLabel: '持有数量',
|
||
frozenLabel: '冻结数量',
|
||
writeOffLabel: '已核销',
|
||
dividendLabel: '累计分红',
|
||
priceText: formatPrice(price) || '0.0000',
|
||
holdText: formatAmount(hold),
|
||
frozenText: formatAmount(frozen),
|
||
writeOffText: formatAmount(writeOff),
|
||
dividendText: `¥${formatAmount(dividend)}`,
|
||
};
|
||
});
|
||
|
||
const formatPrice = (val) => {
|
||
const n = Number(val);
|
||
if (!Number.isFinite(n)) return '0.0000';
|
||
return n.toLocaleString(undefined, {
|
||
minimumFractionDigits: 4,
|
||
maximumFractionDigits: 4,
|
||
});
|
||
};
|
||
|
||
const formatAmount = (val) => {
|
||
const n = Number(val);
|
||
if (!Number.isFinite(n)) return '0';
|
||
return n.toLocaleString();
|
||
};
|
||
|
||
const formatRecordPrice = (val) => {
|
||
const n = Number(val);
|
||
if (!Number.isFinite(n)) return '0.0000';
|
||
return n.toFixed(4);
|
||
};
|
||
|
||
const onPriceInput = (e) => {
|
||
let val = e?.detail?.value ?? '';
|
||
val = val.replace(/[^\d.]/g, '');
|
||
const firstDot = val.indexOf('.');
|
||
if (firstDot !== -1) {
|
||
val = val.slice(0, firstDot + 1) + val.slice(firstDot + 1).replace(/\./g, '');
|
||
}
|
||
const parts = val.split('.');
|
||
if (parts.length > 1 && parts[1].length > 4) {
|
||
val = parts[0] + '.' + parts[1].slice(0, 4);
|
||
}
|
||
inputPrice.value = val;
|
||
};
|
||
|
||
const formatDateTime = (val) => {
|
||
if (!val) return '';
|
||
const d = new Date(Number(val));
|
||
if (!Number.isFinite(d.getTime())) return '';
|
||
const pad2 = (n) => String(n).padStart(2, '0');
|
||
return `${d.getFullYear()}-${pad2(d.getMonth() + 1)}-${pad2(d.getDate())} ${pad2(d.getHours())}:${pad2(d.getMinutes())}`;
|
||
};
|
||
|
||
const fetchExchangeConfig = async () => {
|
||
const res = await homeApi.goldSeedExchangeGetConfig();
|
||
if (res?.code === 0) {
|
||
const n = Number(res?.data);
|
||
exchangeAmount.value = Number.isFinite(n) && n > 0 ? n : 0;
|
||
} else {
|
||
exchangeAmount.value = 0;
|
||
}
|
||
};
|
||
|
||
const fetchAsset = async () => {
|
||
const res = await homeApi.goldSeedIndex();
|
||
load.value = true;
|
||
if (res?.code === 0) {
|
||
Object.assign(dataObj, res?.data || {});
|
||
}
|
||
};
|
||
|
||
const getList = async (reset = false) => {
|
||
if (loadingList.value) return;
|
||
loadingList.value = true;
|
||
if (reset) {
|
||
pageNo.value = 1;
|
||
noMore.value = false;
|
||
}
|
||
try {
|
||
const params = { pageNo: pageNo.value, pageSize: PAGE_SIZE };
|
||
const res = await homeApi.goldSeedExchangePage(params);
|
||
if (res?.code === 0) {
|
||
const arr = res?.data?.list || [];
|
||
if (pageNo.value === 1) {
|
||
detailList.value = [];
|
||
}
|
||
detailList.value = detailList.value.concat(arr);
|
||
if (arr.length < PAGE_SIZE) {
|
||
noMore.value = true;
|
||
} else {
|
||
pageNo.value += 1;
|
||
}
|
||
} else {
|
||
noMore.value = true;
|
||
}
|
||
} finally {
|
||
loadingList.value = false;
|
||
}
|
||
};
|
||
|
||
const refresh = async () => {
|
||
await fetchAsset();
|
||
await getList(true);
|
||
try { uni.stopPullDownRefresh(); } catch (e) {}
|
||
};
|
||
|
||
const openExchangePopup = async () => {
|
||
await fetchExchangeConfig();
|
||
inputPrice.value = '';
|
||
popupVisible.value = true;
|
||
};
|
||
|
||
const closeExchangePopup = () => {
|
||
popupVisible.value = false;
|
||
inputPrice.value = '';
|
||
};
|
||
|
||
const submitExchange = async () => {
|
||
const price = Number(inputPrice.value);
|
||
if (!Number.isFinite(price) || price <= 0) {
|
||
uni.showToast({
|
||
title: '请输入兑换价格',
|
||
icon: 'none',
|
||
mask: true,
|
||
duration: 2000,
|
||
});
|
||
return;
|
||
}
|
||
let errorMsg = '';
|
||
try {
|
||
const res = await homeApi.goldSeedExchangeCreate({ price });
|
||
if (res?.code === 0) {
|
||
closeExchangePopup();
|
||
fetchAsset();
|
||
setTimeout(() => getList(true), 300);
|
||
return;
|
||
}
|
||
errorMsg = res?.msg
|
||
|| (res && typeof res.code === 'number' ? '操作失败' : '网络异常');
|
||
} catch (e) {
|
||
errorMsg = (e && (e.msg || e.message)) ? (e.msg || e.message) : '请求异常,请稍后重试';
|
||
}
|
||
if (errorMsg) {
|
||
closeExchangePopup();
|
||
setTimeout(() => {
|
||
uni.showToast({
|
||
title: errorMsg,
|
||
icon: 'none',
|
||
mask: true,
|
||
duration: 2500,
|
||
});
|
||
}, 250);
|
||
}
|
||
};
|
||
|
||
const handleCancel = (item) => {
|
||
uni.showModal({
|
||
title: '提示',
|
||
content: '确定要撤销该兑换申请吗?',
|
||
confirmColor: '#ee0a24',
|
||
success: async (res) => {
|
||
if (!res.confirm) return;
|
||
let errorMsg = '';
|
||
try {
|
||
const cancelRes = await homeApi.goldSeedExchangeCancel({
|
||
packageId: item.id,
|
||
});
|
||
if (cancelRes?.code === 0) {
|
||
uni.showToast({ title: '撤销成功', icon: 'none', duration: 1500 });
|
||
fetchAsset();
|
||
setTimeout(() => getList(true), 300);
|
||
return;
|
||
}
|
||
errorMsg = cancelRes?.msg
|
||
|| (cancelRes && typeof cancelRes.code === 'number' ? '操作失败' : '网络异常');
|
||
} catch (e) {
|
||
errorMsg = (e && (e.msg || e.message)) ? (e.msg || e.message) : '请求异常,请稍后重试';
|
||
}
|
||
if (errorMsg) {
|
||
uni.showToast({
|
||
title: errorMsg,
|
||
icon: 'none',
|
||
mask: true,
|
||
duration: 2500,
|
||
});
|
||
}
|
||
},
|
||
});
|
||
};
|
||
|
||
onShow(() => {
|
||
refresh();
|
||
});
|
||
|
||
onPullDownRefresh(() => {
|
||
refresh();
|
||
});
|
||
|
||
onReachBottom(() => {
|
||
if (!noMore.value) {
|
||
getList(false);
|
||
}
|
||
});
|
||
</script>
|
||
|
||
<style lang="scss" scoped>
|
||
.pages {
|
||
.content {
|
||
width: 100%;
|
||
padding-top: 30rpx;
|
||
}
|
||
.con {
|
||
padding: 0 0 100rpx;
|
||
box-sizing: border-box;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
}
|
||
.h100 { height: 100%; }
|
||
.w100 { width: 100%; }
|
||
.p-x-20 { padding-left: 40rpx; padding-right: 40rpx; }
|
||
.p-y-40 { padding-top: 80rpx; padding-bottom: 80rpx; }
|
||
.p-b-40 { padding-bottom: 80rpx; }
|
||
.p-20 { padding: 40rpx; }
|
||
.r_16 { border-radius: 32rpx; }
|
||
.center { text-align: center; }
|
||
|
||
.top-card-wrap {
|
||
padding-top: 40rpx;
|
||
padding-bottom: 20rpx;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.top-card {
|
||
background: rgba(255, 255, 255, 0.85);
|
||
backdrop-filter: blur(10px);
|
||
border: 1rpx solid rgba(255, 255, 255, 0.5);
|
||
border-radius: 28rpx;
|
||
padding: 32rpx 28rpx;
|
||
}
|
||
|
||
.top-card__main {
|
||
width: 100%;
|
||
min-width: 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 14rpx;
|
||
}
|
||
|
||
.top-card__price-head {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
gap: 18rpx;
|
||
}
|
||
|
||
.top-card__price-col {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 6rpx;
|
||
min-width: 0;
|
||
flex: 1;
|
||
}
|
||
|
||
.top-card__label {
|
||
font-size: 26rpx;
|
||
color: #585654;
|
||
opacity: 0.9;
|
||
}
|
||
|
||
.top-card__price-row {
|
||
margin-top: 6rpx;
|
||
display: flex;
|
||
align-items: flex-end;
|
||
gap: 10rpx;
|
||
}
|
||
|
||
.top-card__price {
|
||
font-size: 68rpx;
|
||
font-weight: 800;
|
||
color: #111;
|
||
line-height: 1;
|
||
}
|
||
|
||
.top-card__stats {
|
||
display: flex;
|
||
align-items: stretch;
|
||
justify-content: space-between;
|
||
margin-top: 22rpx;
|
||
}
|
||
|
||
.top-card__stat {
|
||
flex: 1;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 8rpx;
|
||
}
|
||
|
||
.top-card__stat-label {
|
||
font-size: 24rpx;
|
||
color: #585654;
|
||
opacity: 0.9;
|
||
}
|
||
|
||
.top-card__stat-value {
|
||
margin-top: 10rpx;
|
||
font-size: 28rpx;
|
||
font-weight: 700;
|
||
color: #111;
|
||
line-height: 1.1;
|
||
}
|
||
|
||
.top-card__stat-value--accent {
|
||
color: #e54035;
|
||
}
|
||
|
||
.top-card__divider-v {
|
||
width: 1rpx;
|
||
background: rgba(0, 0, 0, 0.08);
|
||
margin: 0 20rpx;
|
||
}
|
||
|
||
.top-card__action {
|
||
flex-shrink: 0;
|
||
display: flex;
|
||
align-items: center;
|
||
padding-top: 6rpx;
|
||
}
|
||
|
||
.top-card__btn {
|
||
height: 64rpx;
|
||
line-height: 64rpx;
|
||
padding: 0 32rpx;
|
||
border-radius: 32rpx;
|
||
background: linear-gradient(131deg, #f7772e 0%, #ee0a24 100%);
|
||
color: #fff;
|
||
font-size: 28rpx;
|
||
font-weight: 600;
|
||
text-align: center;
|
||
}
|
||
|
||
.record-card {
|
||
flex: 1;
|
||
min-height: 0;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.record-card__inner {
|
||
height: 100%;
|
||
display: flex;
|
||
flex-direction: column;
|
||
background: rgba(255, 255, 255, 0.85);
|
||
backdrop-filter: blur(10px);
|
||
border: 1rpx solid rgba(255, 255, 255, 0.5);
|
||
}
|
||
|
||
.record-card__title {
|
||
font-size: 30rpx;
|
||
font-weight: 700;
|
||
color: #111;
|
||
padding-bottom: 24rpx;
|
||
border-bottom: 1rpx solid rgba(0, 0, 0, 0.06);
|
||
margin-bottom: 20rpx;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.record-list__body {
|
||
flex: 1;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 20rpx;
|
||
min-height: 400rpx;
|
||
}
|
||
|
||
.empty-list {
|
||
padding: 80rpx 0;
|
||
text-align: center;
|
||
color: #999;
|
||
font-size: 26rpx;
|
||
}
|
||
.empty-list--hint {
|
||
padding: 40rpx 0;
|
||
font-size: 22rpx;
|
||
}
|
||
|
||
.record-item {
|
||
background: #ffffff;
|
||
border-radius: 20rpx;
|
||
padding: 24rpx 22rpx;
|
||
box-shadow: 0 4rpx 14rpx rgba(15, 23, 42, 0.05);
|
||
border: 1rpx solid rgba(0, 0, 0, 0.04);
|
||
}
|
||
|
||
.record-item__head {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
margin-bottom: 18rpx;
|
||
}
|
||
|
||
.record-item__title {
|
||
font-size: 30rpx;
|
||
font-weight: 700;
|
||
color: #111;
|
||
}
|
||
|
||
.record-item__amount {
|
||
font-size: 28rpx;
|
||
font-weight: 700;
|
||
color: #111;
|
||
}
|
||
|
||
.change-card {
|
||
display: flex;
|
||
align-items: stretch;
|
||
border-radius: 16rpx;
|
||
overflow: hidden;
|
||
margin-bottom: 16rpx;
|
||
position: relative;
|
||
}
|
||
|
||
.change-card--pending {
|
||
background: linear-gradient(135deg, rgba(107, 114, 128, 0.06) 0%, rgba(59, 130, 246, 0.05) 100%);
|
||
border: 1rpx solid rgba(107, 114, 128, 0.12);
|
||
}
|
||
|
||
.change-card__pending-tag {
|
||
position: absolute;
|
||
top: 10rpx;
|
||
right: 24rpx;
|
||
z-index: 2;
|
||
}
|
||
|
||
.change-card__left {
|
||
flex: 1;
|
||
padding: 22rpx 28rpx;
|
||
min-width: 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
justify-content: center;
|
||
background: linear-gradient(135deg, rgba(107, 114, 128, 0.06) 0%, rgba(59, 130, 246, 0.05) 100%);
|
||
border: 1rpx solid rgba(107, 114, 128, 0.12);
|
||
border-right: none;
|
||
border-radius: 16rpx 0 0 16rpx;
|
||
}
|
||
|
||
.change-card__left > view + view {
|
||
margin-top: 10rpx;
|
||
}
|
||
|
||
.change-card__left--pending {
|
||
border: none;
|
||
border-radius: 16rpx;
|
||
min-height: 120rpx;
|
||
}
|
||
|
||
.change-card__left--pending > view + view {
|
||
margin-top: 12rpx;
|
||
}
|
||
|
||
.change-card__price-row--with-cancel {
|
||
display: flex;
|
||
align-items: flex-end;
|
||
justify-content: flex-start;
|
||
}
|
||
|
||
.change-card__price-main {
|
||
display: inline-block;
|
||
min-width: 0;
|
||
flex-shrink: 1;
|
||
line-height: 44rpx;
|
||
height: 44rpx;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.cancel-btn--inline {
|
||
margin-left: auto;
|
||
height: 40rpx;
|
||
padding: 0 12rpx;
|
||
border-radius: 12rpx;
|
||
border: none;
|
||
color: #ee0a24;
|
||
font-size: 20rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
box-sizing: border-box;
|
||
border: 1rpx solid #ee0a24;
|
||
}
|
||
|
||
.change-card__price-label {
|
||
font-size: 22rpx;
|
||
color: #8b8b8b;
|
||
line-height: 30rpx;
|
||
}
|
||
|
||
.change-card__price-row {
|
||
line-height: 44rpx;
|
||
height: 44rpx;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.change-card__price-symbol {
|
||
display: inline-block;
|
||
font-size: 26rpx;
|
||
font-weight: 700;
|
||
color: #f7772e;
|
||
line-height: 44rpx;
|
||
height: 44rpx;
|
||
vertical-align: top;
|
||
margin-right: 4rpx;
|
||
}
|
||
|
||
.change-card__price-value {
|
||
display: inline-block;
|
||
font-size: 44rpx;
|
||
font-weight: 800;
|
||
color: #111;
|
||
line-height: 44rpx;
|
||
height: 44rpx;
|
||
vertical-align: top;
|
||
letter-spacing: 1rpx;
|
||
}
|
||
|
||
.change-card__divider {
|
||
width: 1rpx;
|
||
border-left: 2rpx dashed rgba(0, 0, 0, 0.15);
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.change-card__right {
|
||
width: 180rpx;
|
||
flex-shrink: 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: stretch;
|
||
justify-content: center;
|
||
padding: 22rpx 18rpx;
|
||
border-left: none;
|
||
border-radius: 0 16rpx 16rpx 0;
|
||
min-height: 120rpx;
|
||
}
|
||
|
||
.change-card__right-top {
|
||
flex: 1;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.change-card__right--pending {
|
||
background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(217, 119, 6, 0.06) 100%);
|
||
border: 1rpx solid rgba(245, 158, 11, 0.2);
|
||
border-left: none;
|
||
}
|
||
.change-card__right--pass {
|
||
background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.06) 100%);
|
||
border: 1rpx solid rgba(16, 185, 129, 0.2);
|
||
border-left: none;
|
||
}
|
||
.change-card__right--reject {
|
||
background: linear-gradient(135deg, rgba(156, 163, 175, 0.08) 0%, rgba(107, 114, 128, 0.06) 100%);
|
||
border: 1rpx solid rgba(156, 163, 175, 0.2);
|
||
border-left: none;
|
||
}
|
||
|
||
.record-item__status {
|
||
font-size: 26rpx;
|
||
font-weight: 700;
|
||
line-height: 1.2;
|
||
}
|
||
|
||
.record-item__status--pending { color: #f59e0b; }
|
||
.record-item__status--pass { color: #10b981; }
|
||
.record-item__status--reject { color: #9ca3af; }
|
||
|
||
.record-item__meta-row {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
margin-top: 14rpx;
|
||
font-size: 24rpx;
|
||
line-height: 1.4;
|
||
}
|
||
|
||
.record-item__meta-label {
|
||
color: #585654;
|
||
opacity: 0.85;
|
||
}
|
||
|
||
.record-item__meta-value {
|
||
color: #111;
|
||
text-align: right;
|
||
}
|
||
|
||
.record-item__remark-row {
|
||
display: flex;
|
||
align-items: flex-start;
|
||
justify-content: space-between;
|
||
margin-top: 14rpx;
|
||
font-size: 24rpx;
|
||
line-height: 1.5;
|
||
}
|
||
|
||
.record-item__remark-label {
|
||
color: #585654;
|
||
opacity: 0.85;
|
||
flex-shrink: 0;
|
||
margin-right: 12rpx;
|
||
}
|
||
|
||
.record-item__remark-text {
|
||
color: #111;
|
||
text-align: right;
|
||
flex: 1;
|
||
}
|
||
|
||
/* 兑换弹窗 */
|
||
.popup-mask {
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
background: rgba(0, 0, 0, 0.5);
|
||
z-index: 9999;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
padding: 40rpx;
|
||
}
|
||
|
||
.popup-dialog {
|
||
width: 100%;
|
||
max-width: 640rpx;
|
||
background: #fff;
|
||
border-radius: 24rpx;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.popup-header {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
padding: 28rpx 32rpx;
|
||
border-bottom: 1rpx solid rgba(0, 0, 0, 0.06);
|
||
}
|
||
|
||
.popup-title {
|
||
font-size: 32rpx;
|
||
font-weight: 700;
|
||
color: #111;
|
||
}
|
||
|
||
.popup-close {
|
||
font-size: 44rpx;
|
||
line-height: 1;
|
||
color: #999;
|
||
padding: 0 10rpx;
|
||
}
|
||
|
||
.popup-body {
|
||
padding: 10rpx 32rpx 20rpx;
|
||
}
|
||
|
||
.popup-balance {
|
||
background: #f6f5f5;
|
||
border-radius: 16rpx;
|
||
padding: 20rpx 12rpx;
|
||
display: flex;
|
||
align-items: stretch;
|
||
justify-content: space-between;
|
||
margin-bottom: 28rpx;
|
||
margin-top: 20rpx;
|
||
}
|
||
|
||
.popup-balance__item {
|
||
flex: 1;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
justify-content: center;
|
||
padding: 4rpx 12rpx;
|
||
gap: 10rpx;
|
||
}
|
||
|
||
.popup-balance__divider {
|
||
width: 1rpx;
|
||
background: rgba(0, 0, 0, 0.1);
|
||
margin: 10rpx 0;
|
||
}
|
||
|
||
.popup-balance-label {
|
||
font-size: 24rpx;
|
||
color: #666;
|
||
}
|
||
|
||
.popup-balance-value {
|
||
font-size: 32rpx;
|
||
font-weight: 700;
|
||
color: #111;
|
||
}
|
||
|
||
.popup-fixed-box {
|
||
background: linear-gradient(135deg, rgba(247, 119, 46, 0.1) 0%, rgba(238, 10, 36, 0.08) 100%);
|
||
border: 1rpx solid rgba(238, 10, 36, 0.15);
|
||
border-radius: 16rpx;
|
||
padding: 22rpx 24rpx;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
gap: 8rpx;
|
||
margin-bottom: 20rpx;
|
||
}
|
||
|
||
.popup-fixed-label {
|
||
font-size: 24rpx;
|
||
color: #585654;
|
||
}
|
||
|
||
.popup-fixed-value {
|
||
display: flex;
|
||
align-items: baseline;
|
||
gap: 6rpx;
|
||
margin-top: 4rpx;
|
||
}
|
||
|
||
.popup-fixed-num {
|
||
font-size: 56rpx;
|
||
font-weight: 900;
|
||
color: #e54035;
|
||
line-height: 1;
|
||
}
|
||
|
||
.popup-fixed-unit {
|
||
font-size: 28rpx;
|
||
color: #e54035;
|
||
font-weight: 600;
|
||
}
|
||
|
||
.popup-fixed-tag {
|
||
margin-top: 10rpx;
|
||
font-size: 22rpx;
|
||
color: #585654;
|
||
opacity: 0.85;
|
||
}
|
||
|
||
.popup-input-box {
|
||
background: #f6f5f5;
|
||
border-radius: 16rpx;
|
||
padding: 24rpx 24rpx 20rpx;
|
||
margin-bottom: 8rpx;
|
||
}
|
||
|
||
.popup-input-label {
|
||
font-size: 24rpx;
|
||
color: #585654;
|
||
font-weight: 600;
|
||
line-height: 34rpx;
|
||
}
|
||
|
||
.popup-input-row {
|
||
margin-top: 14rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
background: #fff;
|
||
border-radius: 12rpx;
|
||
padding: 0 20rpx;
|
||
height: 88rpx;
|
||
border: 1rpx solid rgba(0, 0, 0, 0.08);
|
||
}
|
||
|
||
.popup-input-symbol {
|
||
font-size: 32rpx;
|
||
font-weight: 800;
|
||
color: #f7772e;
|
||
margin-right: 8rpx;
|
||
line-height: 1;
|
||
}
|
||
|
||
.popup-input {
|
||
flex: 1;
|
||
min-width: 0;
|
||
font-size: 32rpx;
|
||
font-weight: 700;
|
||
color: #111;
|
||
height: 88rpx;
|
||
line-height: 88rpx;
|
||
}
|
||
|
||
.popup-tip {
|
||
margin-top: 8rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: flex-start;
|
||
gap: 8rpx;
|
||
padding: 14rpx 18rpx;
|
||
background: rgba(120, 120, 120, 0.06);
|
||
border-radius: 14rpx;
|
||
}
|
||
|
||
.popup-tip-text {
|
||
font-size: 22rpx;
|
||
color: #666;
|
||
line-height: 1.4;
|
||
}
|
||
|
||
.popup-footer {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 20rpx;
|
||
padding: 20rpx 32rpx 28rpx;
|
||
border-top: 1rpx solid rgba(0, 0, 0, 0.04);
|
||
}
|
||
|
||
.popup-btn {
|
||
flex: 1;
|
||
height: 88rpx;
|
||
line-height: 88rpx;
|
||
text-align: center;
|
||
border-radius: 44rpx;
|
||
font-size: 30rpx;
|
||
font-weight: 600;
|
||
}
|
||
|
||
.popup-btn--cancel {
|
||
background: #f2f2f2;
|
||
color: #555;
|
||
}
|
||
|
||
.popup-btn--confirm {
|
||
background: linear-gradient(131deg, #f7772e 0%, #ee0a24 100%);
|
||
color: #fff;
|
||
}
|
||
</style>
|