优惠劵详情:50%

This commit is contained in:
YunaiV
2023-12-16 12:46:11 +08:00
parent 894f57a551
commit 815457844d
3 changed files with 354 additions and 317 deletions
+16
View File
@@ -25,6 +25,14 @@ const CouponApi = {
params,
});
},
// 获得优惠劵模版
getCouponTemplate: (id) => {
return request({
url: '/app-api/promotion/coupon-template/get',
method: 'GET',
params: { id },
});
},
// 我的优惠劵列表
getCouponPage: (params) => {
return request({
@@ -41,6 +49,14 @@ const CouponApi = {
data: { templateId },
});
},
// 获得优惠劵
getCoupon: (id) => {
return request({
url: '/app-api/promotion/coupon/get',
method: 'GET',
params: { id },
});
},
};
export default CouponApi;
@@ -80,12 +80,7 @@
import { fen2yuan } from '../../hooks/useGoods';
import sheep from '../../index';
const state = reactive({
stateMap: {
0: '立即领取',
1: '去使用',
},
});
const state = reactive({});
const isDisable = computed(() => {
if (props.type === 'coupon') {