1045 行
29 KiB
Vue
1045 行
29 KiB
Vue
<template>
|
||
<s-layout class="voucher-wrap" title="兑换券">
|
||
<!-- 顶部黑金尊享资产卡片 -->
|
||
<view class="header-box">
|
||
<view class="asset-card">
|
||
<!-- 卡片顶栏 -->
|
||
<view class="card-top ss-flex ss-row-between ss-col-center">
|
||
<view class="top-tag ss-flex ss-col-center">
|
||
<text class="tag-badge">兑换权益</text>
|
||
<text class="top-title">可用兑换券总额</text>
|
||
</view>
|
||
<view class="rule-btn ss-flex ss-col-center" @tap="state.showHelp = true">
|
||
<text class="rule-btn-text">释放规则</text>
|
||
<text class="cicon-help-o ss-m-l-6"></text>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 兑换券核心大字数 -->
|
||
<view class="voucher-hero ss-flex ss-col-bottom ss-row-between">
|
||
<view class="hero-left ss-flex ss-col-bottom">
|
||
<text class="hero-num">{{ formatVoucher(state.info.voucher_available) }}</text>
|
||
<text class="hero-unit">个</text>
|
||
</view>
|
||
<button
|
||
class="ss-reset-button exchange-btn ss-flex ss-row-center ss-col-center"
|
||
@tap="sheep.$router.go('/pages/app/score-shop')"
|
||
>
|
||
<text class="cicon-goods-o ss-m-r-6"></text>
|
||
<text>去兑换</text>
|
||
</button>
|
||
</view>
|
||
|
||
<!-- 动态指示胶囊 -->
|
||
<view class="rate-capsule ss-flex ss-row-between ss-col-center">
|
||
<view class="capsule-left ss-flex ss-col-center">
|
||
<text class="capsule-dot"></text>
|
||
<text class="capsule-text">365天按日线性释放 · 每日自动到账可抵扣</text>
|
||
</view>
|
||
<text class="capsule-tag">全场通用</text>
|
||
</view>
|
||
|
||
<!-- 底部数据栏:累计获得 / 已释放 / 已使用 -->
|
||
<view class="card-footer ss-flex ss-row-between ss-col-center">
|
||
<view class="footer-metric">
|
||
<text class="metric-label">累计获得</text>
|
||
<view class="metric-val-wrap ss-flex ss-col-bottom">
|
||
<text class="metric-val">{{ formatVoucher(state.info.voucher_total) }}</text>
|
||
<text class="metric-unit">个</text>
|
||
</view>
|
||
</view>
|
||
<view class="footer-metric">
|
||
<text class="metric-label">已释放</text>
|
||
<view class="metric-val-wrap ss-flex ss-col-bottom">
|
||
<text class="metric-val">{{ formatVoucher(state.info.voucher_released) }}</text>
|
||
<text class="metric-unit">个</text>
|
||
</view>
|
||
</view>
|
||
<view class="footer-metric">
|
||
<text class="metric-label">已使用</text>
|
||
<view class="metric-val-wrap ss-flex ss-col-bottom">
|
||
<text class="metric-val">{{ formatVoucher(state.info.voucher_used) }}</text>
|
||
<text class="metric-unit">个</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 列表标题区 -->
|
||
<view class="section-header ss-flex ss-row-between ss-col-center">
|
||
<view class="section-title-wrap ss-flex ss-col-center">
|
||
<view class="title-bar"></view>
|
||
<text class="section-title">订单释放计划</text>
|
||
</view>
|
||
<text class="section-subtitle">按日释放明细</text>
|
||
</view>
|
||
|
||
<!-- 空状态 -->
|
||
<view class="empty-wrap" v-if="state.inited && state.plans.length === 0">
|
||
<s-empty
|
||
icon="/static/data-empty.png"
|
||
text="下单后将获得 1.5 倍兑换券,分 365 天释放。"
|
||
></s-empty>
|
||
</view>
|
||
|
||
<!-- 订单释放计划卡片列表 -->
|
||
<view class="list-container" v-if="state.plans.length > 0">
|
||
<view
|
||
class="log-card plan-clickable-card"
|
||
v-for="(item, index) in state.plans"
|
||
:key="item.id || index"
|
||
@tap="onOpenPlan(item)"
|
||
>
|
||
<view class="log-top ss-flex ss-row-between ss-col-center">
|
||
<view class="log-title-box ss-flex ss-col-center">
|
||
<view class="coin-icon ss-flex ss-row-center ss-col-center">
|
||
<text class="cicon-voucher"></text>
|
||
</view>
|
||
<view class="log-main-info">
|
||
<text class="log-title">订单 #{{ item.order_sn || item.order_id || '--' }}</text>
|
||
<text class="log-date">起算日期: {{ item.start_date || item.createtime || '--' }}</text>
|
||
</view>
|
||
</view>
|
||
<view class="log-amount ss-flex ss-col-center">
|
||
<text class="amount-num">{{ formatVoucher(item.total_amount || item.total || item.voucher_total) }} 个</text>
|
||
<text class="amount-status ss-m-l-12" :class="item.status === 2 ? 'finished' : 'releasing'">
|
||
{{ item.status_text || (item.status === 2 ? '已完成' : '释放中') }}
|
||
</text>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 释放天数进度条 -->
|
||
<view class="plan-progress-box ss-m-t-20">
|
||
<view class="progress-info ss-flex ss-row-between ss-col-center ss-m-b-8">
|
||
<text class="progress-txt">第 {{ planDay(item) }} / {{ planTotal(item) }} 天</text>
|
||
<text class="progress-percent">{{ planProgress(item) }}</text>
|
||
</view>
|
||
<view class="progress-bar">
|
||
<view class="progress-inner" :style="{ width: planProgress(item) }"></view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 详细指标标签 -->
|
||
<view class="log-tags ss-flex ss-col-center ss-m-t-16">
|
||
<view class="tag-item">
|
||
<text class="tag-txt">已释放 {{ formatVoucher(item.released_amount || item.released) }} 个</text>
|
||
</view>
|
||
<view class="tag-item" v-if="item.daily_amount">
|
||
<text class="tag-txt">每日释放 {{ formatVoucher(item.daily_amount) }} 个</text>
|
||
</view>
|
||
<view class="tag-item" v-if="calcRemain(item) !== null">
|
||
<text class="tag-txt">待释放 {{ formatVoucher(calcRemain(item)) }} 个</text>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 交互提示条 -->
|
||
<view class="plan-card-action ss-flex ss-row-between ss-col-center ss-m-t-16">
|
||
<text class="action-tip">按日线性释放</text>
|
||
<view class="action-right ss-flex ss-col-center">
|
||
<text class="action-text">查看释放明细</text>
|
||
<text class="cicon-forward action-arrow ss-m-l-4"></text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 释放明细弹窗 -->
|
||
<su-popup
|
||
:show="state.showLogs"
|
||
type="bottom"
|
||
round="24"
|
||
@close="onCloseLogs"
|
||
showClose
|
||
>
|
||
<view class="logs-popup-body">
|
||
<view class="logs-popup-header">
|
||
<view class="popup-main-title">释放明细</view>
|
||
<view class="popup-sub-title" v-if="state.activePlan">
|
||
订单 #{{ state.activePlan.order_sn || state.activePlan.order_id }} · 获赠总额 {{ formatVoucher(state.activePlan.total_amount) }} 个
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 计划概览摘要卡 -->
|
||
<view class="logs-plan-summary" v-if="state.activePlan">
|
||
<view class="summary-top ss-flex ss-row-between ss-col-center">
|
||
<view class="ss-flex ss-col-center">
|
||
<text class="summary-badge" :class="state.activePlan.status === 2 ? 'finished' : 'releasing'">
|
||
{{ state.activePlan.status_text || (state.activePlan.status === 2 ? '已完成' : '释放中') }}
|
||
</text>
|
||
<text class="summary-day">第 {{ planDay(state.activePlan) }} / {{ planTotal(state.activePlan) }} 天</text>
|
||
</view>
|
||
<text class="summary-percent">{{ planProgress(state.activePlan) }}</text>
|
||
</view>
|
||
<view class="summary-progress-bar ss-m-t-12">
|
||
<view class="summary-progress-inner" :style="{ width: planProgress(state.activePlan) }"></view>
|
||
</view>
|
||
<view class="summary-metrics ss-flex ss-row-between ss-col-center ss-m-t-16">
|
||
<view class="metric-col">
|
||
<text class="m-lbl">已释放</text>
|
||
<text class="m-val highlight">{{ formatVoucher(state.activePlan.released_amount) }} 个</text>
|
||
</view>
|
||
<view class="metric-col">
|
||
<text class="m-lbl">每日释放</text>
|
||
<text class="m-val">{{ formatVoucher(state.activePlan.daily_amount) }} 个</text>
|
||
</view>
|
||
<view class="metric-col">
|
||
<text class="m-lbl">待释放</text>
|
||
<text class="m-val">{{ formatVoucher(calcRemain(state.activePlan)) }} 个</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 释放明细流水列表 -->
|
||
<view class="logs-section-title ss-flex ss-row-between ss-col-center ss-m-t-24 ss-m-b-16">
|
||
<text class="sec-title">按日释放记录</text>
|
||
<text class="sec-count" v-if="state.planLogs.length > 0">共 {{ state.planLogs.length }} 期</text>
|
||
</view>
|
||
|
||
<scroll-view scroll-y class="logs-scroll-box">
|
||
<view v-if="state.logsLoading" class="logs-loading ss-flex ss-row-center ss-col-center">
|
||
<text class="loading-txt">正在加载明细...</text>
|
||
</view>
|
||
<view v-else-if="state.planLogs.length === 0" class="logs-empty ss-flex-col ss-col-center ss-row-center">
|
||
<text class="cicon-info empty-icon"></text>
|
||
<text class="empty-tip">暂无释放记录</text>
|
||
<text class="empty-subtip">该计划将于次日 00:30 起每日自动核算入账</text>
|
||
</view>
|
||
<view v-else class="logs-list">
|
||
<view
|
||
class="log-row ss-flex ss-row-between ss-col-center"
|
||
v-for="log in state.planLogs"
|
||
:key="log.id"
|
||
>
|
||
<view class="log-row-left">
|
||
<view class="log-row-title">{{ log.formula || '按日自动释放' }}</view>
|
||
<view class="log-row-time">{{ log.settle_date || log.createtime }}</view>
|
||
</view>
|
||
<view class="log-row-right ss-flex-col ss-col-bottom">
|
||
<text class="log-row-amount">+{{ formatVoucher(log.amount) }} 个</text>
|
||
<text class="log-row-status">{{ log.status_text || '已到账' }}</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</scroll-view>
|
||
|
||
<button class="ss-reset-button logs-close-btn ss-m-t-24" @tap="onCloseLogs">
|
||
关闭
|
||
</button>
|
||
</view>
|
||
</su-popup>
|
||
|
||
<!-- 规则说明弹窗 -->
|
||
<su-popup
|
||
:show="state.showHelp"
|
||
type="bottom"
|
||
round="24"
|
||
@close="state.showHelp = false"
|
||
showClose
|
||
>
|
||
<view class="rule-popup-body">
|
||
<view class="rule-popup-title ss-m-b-30">{{ state.ruleTitle }}</view>
|
||
<view
|
||
class="rule-item"
|
||
:class="index === state.rules.length - 1 ? 'ss-m-b-36' : 'ss-m-b-24'"
|
||
v-for="(item, index) in state.rules"
|
||
:key="index"
|
||
>
|
||
<view class="rule-item-title ss-flex ss-col-center ss-m-b-8">
|
||
<text class="rule-seq">{{ index + 1 }}</text>
|
||
<text class="rule-name">{{ item.title }}</text>
|
||
</view>
|
||
<view class="rule-item-desc">
|
||
{{ item.desc }}
|
||
</view>
|
||
</view>
|
||
|
||
<button class="ss-reset-button rule-confirm-btn" @tap="state.showHelp = false">
|
||
我知道了
|
||
</button>
|
||
</view>
|
||
</su-popup>
|
||
</s-layout>
|
||
</template>
|
||
|
||
<script setup>
|
||
import { reactive } from 'vue';
|
||
import { onLoad, onPullDownRefresh } from '@dcloudio/uni-app';
|
||
import sheep from '@/sheep';
|
||
|
||
const userInfo = sheep.$store('user').userInfo || {};
|
||
const agentInfo = sheep.$store('user').agentInfo || {};
|
||
|
||
const defaultRules = [
|
||
{
|
||
title: '赠送与释放天数',
|
||
desc: '会员在平台完成符合条件的商城订单后,系统将按订单金额(默认 1.5 倍)生成兑换券计划,分 365 天按日线性释放。',
|
||
},
|
||
{
|
||
title: '每日自动到账',
|
||
desc: '系统将于次日 00:30 起统一执行日结核算,按期释放的兑换券将自动计入您的「可用兑换券」账户,无需手动领取。',
|
||
},
|
||
{
|
||
title: '全场购物直接抵扣',
|
||
desc: '可用兑换券可在平台商城下单结算时作为现金抵扣使用,尊享优惠抵扣权益。',
|
||
},
|
||
];
|
||
|
||
const state = reactive({
|
||
info: {
|
||
voucher_total: agentInfo.voucher_total || userInfo.voucher_total || '0.00',
|
||
voucher_released: agentInfo.voucher_released || userInfo.voucher_released || '0.00',
|
||
voucher_used: agentInfo.voucher_used || userInfo.voucher_used || '0.00',
|
||
voucher_available: agentInfo.voucher_available || userInfo.voucher_available || '0.00',
|
||
},
|
||
ruleTitle: '兑换券释放与使用规则',
|
||
rules: defaultRules,
|
||
plans: [],
|
||
inited: false,
|
||
showHelp: false,
|
||
showLogs: false,
|
||
activePlan: null,
|
||
planLogs: [],
|
||
logsLoading: false,
|
||
});
|
||
|
||
async function onOpenPlan(plan) {
|
||
if (!plan) return;
|
||
state.activePlan = plan;
|
||
state.planLogs = [];
|
||
state.showLogs = true;
|
||
state.logsLoading = true;
|
||
try {
|
||
const res = await sheep.$api.partner.voucherLogs({ id: plan.id });
|
||
if (res?.code === 1) {
|
||
state.planLogs = res.data.logs || [];
|
||
if (res.data.plan) {
|
||
state.activePlan = { ...plan, ...res.data.plan };
|
||
}
|
||
}
|
||
} catch (e) {
|
||
console.error(e);
|
||
} finally {
|
||
state.logsLoading = false;
|
||
}
|
||
}
|
||
|
||
function onCloseLogs() {
|
||
state.showLogs = false;
|
||
}
|
||
|
||
function planDay(item = {}) {
|
||
return Number(item.released_days || item.day || item.current_day || 0);
|
||
}
|
||
|
||
function planTotal(item = {}) {
|
||
return Number(item.total_days || item.days || 365);
|
||
}
|
||
|
||
function planProgress(item = {}) {
|
||
const total = planTotal(item);
|
||
const current = planDay(item);
|
||
const percent = Math.min(100, Math.max(0, Math.round((current / (total || 1)) * 100)));
|
||
return `${percent}%`;
|
||
}
|
||
|
||
function calcRemain(item = {}) {
|
||
const total = parseFloat(item.total_amount || item.total || item.voucher_total || 0);
|
||
const released = parseFloat(item.released_amount || item.released || 0);
|
||
const remain = Math.max(0, total - released);
|
||
return remain.toFixed(2);
|
||
}
|
||
|
||
function formatVoucher(val) {
|
||
if (val === '' || val === null || val === undefined || val === '--') return '0';
|
||
const num = Number(val);
|
||
if (isNaN(num)) return '0';
|
||
return num % 1 === 0 ? String(Math.round(num)) : String(Number(num.toFixed(2)));
|
||
}
|
||
|
||
function pickPlans(payload) {
|
||
if (!payload) return [];
|
||
if (Array.isArray(payload.plans)) return payload.plans;
|
||
if (Array.isArray(payload.list)) return payload.list;
|
||
if (Array.isArray(payload.data)) return payload.data;
|
||
if (Array.isArray(payload)) return payload;
|
||
return [];
|
||
}
|
||
|
||
async function getVoucher() {
|
||
try {
|
||
const res = await sheep.$api.partner.voucher();
|
||
if (res?.code === 1) {
|
||
const data = res.data || {};
|
||
state.info.voucher_total = data.voucher_total ?? state.info.voucher_total;
|
||
state.info.voucher_released = data.voucher_released ?? state.info.voucher_released;
|
||
state.info.voucher_used = data.voucher_used ?? state.info.voucher_used;
|
||
state.info.voucher_available = data.voucher_available ?? state.info.voucher_available;
|
||
if (data.rule_title) {
|
||
state.ruleTitle = data.rule_title;
|
||
}
|
||
if (Array.isArray(data.rules) && data.rules.length > 0) {
|
||
state.rules = data.rules;
|
||
}
|
||
state.plans = pickPlans(data);
|
||
state.inited = true;
|
||
return;
|
||
}
|
||
} catch (e) {}
|
||
state.plans = [];
|
||
state.inited = true;
|
||
}
|
||
|
||
onLoad(() => {
|
||
getVoucher();
|
||
});
|
||
|
||
onPullDownRefresh(async () => {
|
||
await getVoucher();
|
||
uni.stopPullDownRefresh();
|
||
});
|
||
</script>
|
||
|
||
<style lang="scss" scoped>
|
||
.voucher-wrap {
|
||
min-height: 100vh;
|
||
background-color: #f7f8fa;
|
||
}
|
||
|
||
/* 顶部资产区域 */
|
||
.header-box {
|
||
padding: 24rpx 30rpx 10rpx;
|
||
|
||
.asset-card {
|
||
width: 100%;
|
||
box-sizing: border-box;
|
||
padding: 36rpx 32rpx 30rpx;
|
||
border-radius: 28rpx;
|
||
background: linear-gradient(138deg, #20222a 0%, #15161a 52%, #2c2419 100%);
|
||
box-shadow: 0 16rpx 36rpx rgba(18, 19, 23, 0.18), inset 0 1rpx 0 rgba(247, 219, 168, 0.28);
|
||
border: 1rpx solid rgba(235, 197, 131, 0.26);
|
||
position: relative;
|
||
overflow: hidden;
|
||
|
||
&::before {
|
||
content: '';
|
||
position: absolute;
|
||
right: -60rpx;
|
||
top: -60rpx;
|
||
width: 240rpx;
|
||
height: 240rpx;
|
||
background: radial-gradient(circle, rgba(235, 197, 131, 0.16) 0%, rgba(235, 197, 131, 0) 70%);
|
||
border-radius: 50%;
|
||
pointer-events: none;
|
||
}
|
||
|
||
.card-top {
|
||
position: relative;
|
||
z-index: 2;
|
||
|
||
.top-tag {
|
||
.tag-badge {
|
||
font-size: 20rpx;
|
||
color: #2a2012;
|
||
background: linear-gradient(90deg, #f7dfa6 0%, #e2be78 100%);
|
||
padding: 4rpx 14rpx;
|
||
border-radius: 8rpx;
|
||
font-weight: 600;
|
||
margin-right: 12rpx;
|
||
}
|
||
|
||
.top-title {
|
||
font-size: 26rpx;
|
||
color: rgba(255, 255, 255, 0.85);
|
||
font-weight: 400;
|
||
letter-spacing: 1rpx;
|
||
}
|
||
}
|
||
|
||
.rule-btn {
|
||
padding: 6rpx 18rpx;
|
||
background: rgba(255, 255, 255, 0.08);
|
||
border: 1rpx solid rgba(235, 197, 131, 0.3);
|
||
border-radius: 24rpx;
|
||
|
||
.rule-btn-text {
|
||
font-size: 22rpx;
|
||
color: #f2cf8f;
|
||
}
|
||
|
||
.cicon-help-o {
|
||
font-size: 24rpx;
|
||
color: #f2cf8f;
|
||
}
|
||
}
|
||
}
|
||
|
||
/* 核心数值展示 */
|
||
.voucher-hero {
|
||
margin-top: 24rpx;
|
||
position: relative;
|
||
z-index: 2;
|
||
|
||
.hero-left {
|
||
.hero-symbol {
|
||
font-size: 36rpx;
|
||
font-weight: 700;
|
||
color: #ffffff;
|
||
margin-right: 6rpx;
|
||
margin-bottom: 6rpx;
|
||
}
|
||
|
||
.hero-num {
|
||
font-size: 64rpx;
|
||
font-weight: 700;
|
||
color: #ffffff;
|
||
line-height: 1.1;
|
||
font-family: OPPOSANS, DIN, -apple-system, sans-serif;
|
||
letter-spacing: 1rpx;
|
||
}
|
||
|
||
.hero-unit {
|
||
font-size: 26rpx;
|
||
color: #f4d397;
|
||
font-weight: 600;
|
||
margin-left: 12rpx;
|
||
margin-bottom: 6rpx;
|
||
}
|
||
}
|
||
|
||
.exchange-btn {
|
||
height: 56rpx;
|
||
padding: 0 24rpx;
|
||
background: linear-gradient(90deg, #f7dfa6 0%, #e2be78 100%);
|
||
border-radius: 28rpx;
|
||
color: #3b2b10;
|
||
font-size: 24rpx;
|
||
font-weight: 600;
|
||
box-shadow: 0 6rpx 16rpx rgba(226, 190, 120, 0.28);
|
||
}
|
||
}
|
||
|
||
/* 胶囊指示栏 */
|
||
.rate-capsule {
|
||
margin-top: 24rpx;
|
||
background: rgba(244, 211, 151, 0.1);
|
||
border: 1rpx solid rgba(244, 211, 151, 0.22);
|
||
border-radius: 12rpx;
|
||
padding: 14rpx 20rpx;
|
||
position: relative;
|
||
z-index: 2;
|
||
|
||
.capsule-left {
|
||
.capsule-dot {
|
||
width: 10rpx;
|
||
height: 10rpx;
|
||
border-radius: 50%;
|
||
background-color: #eabf76;
|
||
margin-right: 12rpx;
|
||
box-shadow: 0 0 8rpx #eabf76;
|
||
}
|
||
|
||
.capsule-text {
|
||
font-size: 24rpx;
|
||
color: #fce8bf;
|
||
font-weight: 500;
|
||
}
|
||
}
|
||
|
||
.capsule-tag {
|
||
font-size: 20rpx;
|
||
color: #f7d598;
|
||
opacity: 0.85;
|
||
}
|
||
}
|
||
|
||
/* 底部估值栏 */
|
||
.card-footer {
|
||
margin-top: 26rpx;
|
||
padding-top: 22rpx;
|
||
border-top: 1rpx solid rgba(255, 255, 255, 0.08);
|
||
position: relative;
|
||
z-index: 2;
|
||
|
||
.footer-metric {
|
||
flex: 1;
|
||
|
||
.metric-label {
|
||
font-size: 22rpx;
|
||
color: rgba(255, 255, 255, 0.55);
|
||
display: block;
|
||
margin-bottom: 6rpx;
|
||
}
|
||
|
||
.metric-val-wrap {
|
||
.currency-symbol {
|
||
font-size: 24rpx;
|
||
color: #f4d397;
|
||
font-weight: 600;
|
||
margin-right: 2rpx;
|
||
margin-bottom: 2rpx;
|
||
}
|
||
|
||
.metric-val {
|
||
font-size: 30rpx;
|
||
font-weight: 700;
|
||
color: #f4d397;
|
||
font-family: OPPOSANS, DIN, -apple-system, sans-serif;
|
||
}
|
||
|
||
.metric-unit {
|
||
font-size: 22rpx;
|
||
color: #f4d397;
|
||
font-weight: 500;
|
||
margin-left: 4rpx;
|
||
margin-bottom: 2rpx;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
/* 列表标题区 */
|
||
.section-header {
|
||
padding: 30rpx 32rpx 16rpx;
|
||
|
||
.section-title-wrap {
|
||
.title-bar {
|
||
width: 6rpx;
|
||
height: 28rpx;
|
||
border-radius: 4rpx;
|
||
background: linear-gradient(180deg, #dfb775 0%, #ba8938 100%);
|
||
margin-right: 14rpx;
|
||
}
|
||
|
||
.section-title {
|
||
font-size: 30rpx;
|
||
font-weight: 600;
|
||
color: #22252a;
|
||
}
|
||
}
|
||
|
||
.section-subtitle {
|
||
font-size: 22rpx;
|
||
color: #999ea6;
|
||
}
|
||
}
|
||
|
||
.empty-wrap {
|
||
padding: 60rpx 0;
|
||
}
|
||
|
||
/* 计划卡片列表 */
|
||
.list-container {
|
||
padding: 0 30rpx 20rpx;
|
||
|
||
.log-card {
|
||
background: #ffffff;
|
||
border-radius: 20rpx;
|
||
padding: 26rpx 28rpx;
|
||
margin-bottom: 20rpx;
|
||
box-shadow: 0 4rpx 16rpx rgba(35, 42, 60, 0.04);
|
||
border: 1rpx solid #f0f1f5;
|
||
|
||
.log-top {
|
||
.log-title-box {
|
||
.coin-icon {
|
||
width: 64rpx;
|
||
height: 64rpx;
|
||
border-radius: 50%;
|
||
background: linear-gradient(135deg, #fef4e2 0%, #fae6c3 100%);
|
||
margin-right: 18rpx;
|
||
|
||
.cicon-voucher {
|
||
font-size: 32rpx;
|
||
color: #bf8d3b;
|
||
}
|
||
}
|
||
|
||
.log-main-info {
|
||
display: flex;
|
||
flex-direction: column;
|
||
|
||
.log-title {
|
||
font-size: 28rpx;
|
||
font-weight: 600;
|
||
color: #23272e;
|
||
margin-bottom: 6rpx;
|
||
}
|
||
|
||
.log-date {
|
||
font-size: 22rpx;
|
||
color: #9ea4af;
|
||
}
|
||
}
|
||
}
|
||
|
||
.log-amount {
|
||
.amount-num {
|
||
font-size: 34rpx;
|
||
font-weight: 700;
|
||
color: #23272e;
|
||
font-family: OPPOSANS, DIN, -apple-system, sans-serif;
|
||
}
|
||
|
||
.amount-status {
|
||
font-size: 20rpx;
|
||
padding: 4rpx 12rpx;
|
||
border-radius: 6rpx;
|
||
|
||
&.releasing {
|
||
color: #b58028;
|
||
background-color: #fef5e7;
|
||
}
|
||
|
||
&.finished {
|
||
color: #10b981;
|
||
background-color: #e6f9f0;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
/* 进度条 */
|
||
.plan-progress-box {
|
||
.progress-info {
|
||
.progress-txt {
|
||
font-size: 22rpx;
|
||
color: #6b7280;
|
||
}
|
||
|
||
.progress-percent {
|
||
font-size: 22rpx;
|
||
color: #b58028;
|
||
font-weight: 600;
|
||
font-family: OPPOSANS;
|
||
}
|
||
}
|
||
|
||
.progress-bar {
|
||
height: 12rpx;
|
||
background: #f1f3f6;
|
||
border-radius: 6rpx;
|
||
overflow: hidden;
|
||
|
||
.progress-inner {
|
||
height: 100%;
|
||
background: linear-gradient(90deg, #f7dfa6 0%, #e2be78 100%);
|
||
border-radius: 6rpx;
|
||
transition: width 0.3s ease;
|
||
}
|
||
}
|
||
}
|
||
|
||
.log-tags {
|
||
flex-wrap: wrap;
|
||
gap: 12rpx;
|
||
|
||
.tag-item {
|
||
background-color: #f7f8fb;
|
||
border-radius: 8rpx;
|
||
padding: 6rpx 14rpx;
|
||
|
||
.tag-txt {
|
||
font-size: 22rpx;
|
||
color: #6b7280;
|
||
}
|
||
}
|
||
}
|
||
|
||
/* 交互引导条 */
|
||
.plan-card-action {
|
||
padding-top: 18rpx;
|
||
margin-top: 18rpx;
|
||
border-top: 1rpx dashed #edf0f5;
|
||
|
||
.action-tip {
|
||
font-size: 22rpx;
|
||
color: #9ca3af;
|
||
}
|
||
|
||
.action-right {
|
||
.action-text {
|
||
font-size: 22rpx;
|
||
color: #b58028;
|
||
font-weight: 500;
|
||
}
|
||
|
||
.action-arrow {
|
||
font-size: 20rpx;
|
||
color: #b58028;
|
||
}
|
||
}
|
||
}
|
||
|
||
&.plan-clickable-card {
|
||
cursor: pointer;
|
||
transition: transform 0.15s ease, box-shadow 0.15s ease;
|
||
|
||
&:active {
|
||
transform: scale(0.985);
|
||
box-shadow: 0 2rpx 8rpx rgba(35, 42, 60, 0.08);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
/* 释放明细弹窗样式 */
|
||
.logs-popup-body {
|
||
padding: 36rpx 32rpx 48rpx;
|
||
background-color: #ffffff;
|
||
box-sizing: border-box;
|
||
|
||
.logs-popup-header {
|
||
text-align: center;
|
||
margin-bottom: 24rpx;
|
||
|
||
.popup-main-title {
|
||
font-size: 32rpx;
|
||
font-weight: 700;
|
||
color: #1e222a;
|
||
}
|
||
|
||
.popup-sub-title {
|
||
font-size: 22rpx;
|
||
color: #9ea4af;
|
||
margin-top: 6rpx;
|
||
}
|
||
}
|
||
|
||
.logs-plan-summary {
|
||
background: #fbfbfe;
|
||
border: 1rpx solid #edf0f5;
|
||
border-radius: 18rpx;
|
||
padding: 22rpx 24rpx;
|
||
|
||
.summary-top {
|
||
.summary-badge {
|
||
font-size: 20rpx;
|
||
padding: 4rpx 12rpx;
|
||
border-radius: 6rpx;
|
||
margin-right: 12rpx;
|
||
|
||
&.releasing {
|
||
color: #b58028;
|
||
background-color: #fef5e7;
|
||
}
|
||
|
||
&.finished {
|
||
color: #10b981;
|
||
background-color: #e6f9f0;
|
||
}
|
||
}
|
||
|
||
.summary-day {
|
||
font-size: 24rpx;
|
||
color: #374151;
|
||
font-weight: 500;
|
||
}
|
||
|
||
.summary-percent {
|
||
font-size: 24rpx;
|
||
color: #b58028;
|
||
font-weight: 700;
|
||
font-family: OPPOSANS;
|
||
}
|
||
}
|
||
|
||
.summary-progress-bar {
|
||
height: 10rpx;
|
||
background: #eef1f6;
|
||
border-radius: 5rpx;
|
||
overflow: hidden;
|
||
|
||
.summary-progress-inner {
|
||
height: 100%;
|
||
background: linear-gradient(90deg, #f7dfa6 0%, #e2be78 100%);
|
||
border-radius: 5rpx;
|
||
transition: width 0.3s ease;
|
||
}
|
||
}
|
||
|
||
.summary-metrics {
|
||
.metric-col {
|
||
display: flex;
|
||
flex-direction: column;
|
||
|
||
.m-lbl {
|
||
font-size: 20rpx;
|
||
color: #9ca3af;
|
||
margin-bottom: 4rpx;
|
||
}
|
||
|
||
.m-val {
|
||
font-size: 24rpx;
|
||
color: #374151;
|
||
font-weight: 600;
|
||
|
||
&.highlight {
|
||
color: #b58028;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
.logs-section-title {
|
||
.sec-title {
|
||
font-size: 28rpx;
|
||
font-weight: 600;
|
||
color: #23272e;
|
||
}
|
||
|
||
.sec-count {
|
||
font-size: 22rpx;
|
||
color: #9ca3af;
|
||
}
|
||
}
|
||
|
||
.logs-scroll-box {
|
||
max-height: 480rpx;
|
||
min-height: 200rpx;
|
||
|
||
.logs-loading {
|
||
padding: 60rpx 0;
|
||
.loading-txt {
|
||
font-size: 24rpx;
|
||
color: #9ca3af;
|
||
}
|
||
}
|
||
|
||
.logs-empty {
|
||
padding: 60rpx 0;
|
||
|
||
.empty-icon {
|
||
font-size: 56rpx;
|
||
color: #d1d5db;
|
||
margin-bottom: 12rpx;
|
||
}
|
||
|
||
.empty-tip {
|
||
font-size: 26rpx;
|
||
color: #4b5563;
|
||
font-weight: 500;
|
||
}
|
||
|
||
.empty-subtip {
|
||
font-size: 22rpx;
|
||
color: #9ca3af;
|
||
margin-top: 6rpx;
|
||
}
|
||
}
|
||
|
||
.logs-list {
|
||
.log-row {
|
||
padding: 20rpx 0;
|
||
border-bottom: 1rpx solid #f3f4f6;
|
||
|
||
&:last-child {
|
||
border-bottom: none;
|
||
}
|
||
|
||
.log-row-left {
|
||
.log-row-title {
|
||
font-size: 26rpx;
|
||
font-weight: 500;
|
||
color: #23272e;
|
||
margin-bottom: 6rpx;
|
||
}
|
||
|
||
.log-row-time {
|
||
font-size: 22rpx;
|
||
color: #9ca3af;
|
||
}
|
||
}
|
||
|
||
.log-row-right {
|
||
.log-row-amount {
|
||
font-size: 28rpx;
|
||
font-weight: 700;
|
||
color: #b58028;
|
||
font-family: OPPOSANS, DIN, -apple-system, sans-serif;
|
||
}
|
||
|
||
.log-row-status {
|
||
font-size: 20rpx;
|
||
color: #10b981;
|
||
margin-top: 4rpx;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
.logs-close-btn {
|
||
width: 100%;
|
||
height: 84rpx;
|
||
line-height: 84rpx;
|
||
text-align: center;
|
||
background: #f4f5f8;
|
||
color: #374151;
|
||
font-size: 28rpx;
|
||
font-weight: 600;
|
||
border-radius: 42rpx;
|
||
}
|
||
}
|
||
|
||
/* 规则弹窗样式 */
|
||
.rule-popup-body {
|
||
padding: 36rpx 36rpx 48rpx;
|
||
background-color: #ffffff;
|
||
|
||
.rule-popup-title {
|
||
font-size: 32rpx;
|
||
font-weight: 700;
|
||
color: #1e222a;
|
||
text-align: center;
|
||
}
|
||
|
||
.rule-item {
|
||
.rule-item-title {
|
||
.rule-seq {
|
||
width: 32rpx;
|
||
height: 32rpx;
|
||
border-radius: 50%;
|
||
background: #f7dfa6;
|
||
color: #3b2b10;
|
||
font-size: 20rpx;
|
||
font-weight: 700;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
margin-right: 12rpx;
|
||
}
|
||
|
||
.rule-name {
|
||
font-size: 28rpx;
|
||
font-weight: 600;
|
||
color: #252932;
|
||
}
|
||
}
|
||
|
||
.rule-item-desc {
|
||
font-size: 24rpx;
|
||
color: #6a7180;
|
||
line-height: 38rpx;
|
||
padding-left: 44rpx;
|
||
}
|
||
}
|
||
|
||
.rule-confirm-btn {
|
||
width: 100%;
|
||
height: 84rpx;
|
||
line-height: 84rpx;
|
||
text-align: center;
|
||
background: linear-gradient(90deg, #2b2e38 0%, #17181d 100%);
|
||
color: #f7d598;
|
||
font-size: 28rpx;
|
||
font-weight: 600;
|
||
border-radius: 42rpx;
|
||
box-shadow: 0 8rpx 20rpx rgba(25, 27, 33, 0.2);
|
||
}
|
||
}
|
||
</style>
|