|
|
|
|
@ -19,8 +19,10 @@ const mountedAction = () => {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const GetPersonIntegralSaveMoneyCouponInfo = async () => {
|
|
|
|
|
let buyinfo=$store.getBuyInfo()
|
|
|
|
|
const response = await $api("GetPersonIntegralSaveMoneyCouponInfo", {
|
|
|
|
|
person_id: $store.getUser()?.person_id,
|
|
|
|
|
combo_id:buyinfo.combo_id
|
|
|
|
|
});
|
|
|
|
|
$response(response, () => {
|
|
|
|
|
couponList.value = response.data.coupon_list;
|
|
|
|
|
@ -29,11 +31,11 @@ const GetPersonIntegralSaveMoneyCouponInfo = async () => {
|
|
|
|
|
|
|
|
|
|
const selectCoupon = (item) => {
|
|
|
|
|
let buyinfo=$store.getBuyInfo()
|
|
|
|
|
if(buyinfo.item_ids.length==0)
|
|
|
|
|
{
|
|
|
|
|
uni.$lu.toast("无自选项目,无需使用代金券");
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
// if(buyinfo.item_ids.length==0)
|
|
|
|
|
// {
|
|
|
|
|
// uni.$lu.toast("无自选项目,无需使用代金券");
|
|
|
|
|
// return false
|
|
|
|
|
// }
|
|
|
|
|
yytjInfo.value.couponId = item.id;
|
|
|
|
|
yytjInfo.value.couponPrice = item.price;
|
|
|
|
|
yytjInfo.value.couponName = item.title;
|
|
|
|
|
@ -46,6 +48,7 @@ const selectCoupon = (item) => {
|
|
|
|
|
const noSelectCoupon = () => {
|
|
|
|
|
yytjInfo.value.couponId = "";
|
|
|
|
|
yytjInfo.value.couponPrice = "";
|
|
|
|
|
yytjInfo.value.couponName = "";
|
|
|
|
|
$store.setYytjInfo(yytjInfo.value);
|
|
|
|
|
let buyinfo=$store.getBuyInfo()
|
|
|
|
|
buyinfo.coupon_id=null
|
|
|
|
|
@ -57,19 +60,6 @@ const configRef = (e) => {
|
|
|
|
|
if (!config_ref.value) {
|
|
|
|
|
config_ref.value = e;
|
|
|
|
|
mountedAction();
|
|
|
|
|
uni.showModal({
|
|
|
|
|
title: '提示',
|
|
|
|
|
content: '优惠券仅可用于抵扣自选项目金额',
|
|
|
|
|
showCancel:false,
|
|
|
|
|
confirmText:'确定',
|
|
|
|
|
success: function (res) {
|
|
|
|
|
if (res.confirm) {
|
|
|
|
|
|
|
|
|
|
} else if (res.cancel) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|