feat: 完善商品计奖隔离、积分商城兑换券抵扣与下线售后退款入口

这个提交包含在:
chen
2026-09-17 16:55:08 +08:00
父节点 f5b804fb57
当前提交 c3f5b3d4b5
共有 22 个文件被更改,包括 720 次插入 和 183 次删除

查看文件

@@ -1,7 +1,27 @@
<!-- 页面 -->
<template>
<s-layout title="积分商城">
<view class="ss-p-20">
<!-- 资产看板:当前积分与可用兑换券 -->
<view class="asset-banner ss-m-20 ss-p-20">
<view class="ss-flex ss-row-between ss-col-center">
<view class="asset-item">
<view class="asset-label">当前积分</view>
<view class="asset-val">{{ userInfo.score || 0 }}</view>
</view>
<view class="asset-line"></view>
<view class="asset-item">
<view class="asset-label">可用兑换券</view>
<view class="asset-val text-red">¥ {{ userVoucherAvailable }}</view>
</view>
<button class="ss-reset-button earn-btn" @tap="sheep.$router.go('/pages/commission/voucher')">
券明细
</button>
</view>
<view class="asset-tip ss-m-t-16">
💡 兑换商品时支持使用兑换券 1:1 抵扣现金部分
</view>
</view>
<view class="ss-p-x-20">
<view v-for="item in state.pagination.data" :key="item.id" class="ss-m-b-20">
<s-score-card
size="sl"
@@ -29,9 +49,15 @@
<script setup>
import sheep from '@/sheep';
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
import { reactive } from 'vue';
import { computed, reactive } from 'vue';
import _ from 'lodash';
const userInfo = computed(() => sheep.$store('user').userInfo || {});
const agentInfo = computed(() => sheep.$store('user').agentInfo || {});
const userVoucherAvailable = computed(() => {
return agentInfo.value?.voucher_available || userInfo.value?.voucher_available || '0.00';
});
const state = reactive({
pagination: {
data: [],
@@ -75,3 +101,43 @@
getData();
});
</script>
<style lang="scss" scoped>
.asset-banner {
background: linear-gradient(135deg, #2d3139 0%, #1f2228 100%);
border-radius: 16rpx;
color: #fff;
.asset-item {
.asset-label {
font-size: 24rpx;
color: #999;
margin-bottom: 8rpx;
}
.asset-val {
font-size: 34rpx;
font-weight: bold;
color: #f7d088;
&.text-red {
color: #ff5252;
}
}
}
.asset-line {
width: 1rpx;
height: 48rpx;
background: rgba(255, 255, 255, 0.15);
}
.earn-btn {
padding: 8rpx 20rpx;
font-size: 24rpx;
color: #fff;
background: rgba(255, 255, 255, 0.15);
border-radius: 24rpx;
border: 1rpx solid rgba(255, 255, 255, 0.2);
}
.asset-tip {
font-size: 22rpx;
color: #d1b172;
}
}
</style>