feat(withdraw): 落地方案B一体化商城余额提现与手续费内扣模式,完善多端打款退款与对账闭环

这个提交包含在:
chen
2026-09-20 14:35:38 +08:00
父节点 bee5288e88
当前提交 2b7c34c7f7
共有 65 个文件被更改,包括 3554 次插入 和 579 次删除

查看文件

@@ -5,7 +5,10 @@
<view class="title ss-m-l-20 ss-m-r-20">详情</view>
</view>
<view class="card-content">
<mp-html :content="content"></mp-html>
<mp-html v-if="content" :content="content" :domain="sheep.$url.cdn()"></mp-html>
<view v-else class="empty-content ss-p-b-40 ss-text-center ss-font-26 ss-m-t-20 text-gray">
暂无商品图文详情
</view>
</view>
</view>
</template>

查看文件

@@ -118,7 +118,7 @@ onPageScroll(() => { });
const state = reactive({
goodsId: 0,
skeletonLoading: true,
goodsInfo: {},
goodsInfo: null,
showSelectSku: false,
goodsSwiper: [],
selectedSkuPrice: {},
@@ -138,7 +138,7 @@ const currentGoodsInfo = computed(() => {
sales: state.selectedSkuPrice.sales,
};
}
return state.goodsInfo;
return state.goodsInfo || {};
});
@@ -170,7 +170,7 @@ function onBuy(e) {
}
//营销活动
function onActivity() {
state.activityInfo = state.goodsInfo.promos;
state.activityInfo = state.goodsInfo?.promos || [];
state.showActivityModel = true;
}
@@ -203,39 +203,47 @@ const shareInfo = computed(() => {
type: 'goods', // 商品海报
title: state.goodsInfo.title, // 商品标题
image: sheep.$url.cdn(state.goodsInfo.image), // 商品主图
price: state.goodsInfo.price[0], // 商品价格
price: state.goodsInfo.price?.[0], // 商品价格
original_price: state.goodsInfo.original_price, // 商品原价
},
);
});
async function getGoodsDetail() {
const { code, data } = await sheep.$api.goods.detail(state.goodsId)
if (code === 1) {
try {
const { code, data } = await sheep.$api.goods.detail(state.goodsId);
if (code === 1 && data) {
state.goodsInfo = data;
state.goodsSwiper = formatGoodsSwiper(state.goodsInfo.images || []);
} else {
// 未找到商品或已下架
state.goodsInfo = null;
}
} catch (err) {
state.goodsInfo = null;
} finally {
state.skeletonLoading = false;
state.goodsInfo = data;
state.goodsSwiper = formatGoodsSwiper(state.goodsInfo.images);
} else {
// 未找到商品
state.goodsInfo = {};
}
}
onLoad(async (options) => {
// 兼容 options.id 或 options.goods_id 参数
const id = options?.id || options?.goods_id;
// 非法参数
if (!options.id) {
state.goodsInfo = {}
toast('商品不存在')
$router.back()
return
if (!id) {
state.skeletonLoading = false;
state.goodsInfo = null;
sheep.$helper.toast('商品不存在');
sheep.$router.back();
return;
}
state.goodsId = options.id;
state.goodsId = id;
// 加载商品信息
getGoodsDetail();
const { code, data } = await sheep.$api.coupon.listByGoods(state.goodsId);
if (code === 1) {
state.couponInfo = data;
state.couponInfo = data || [];
}
});
</script>