代金券,调整前端传参

main
yanzai 1 year ago
parent 68af8ef12d
commit 4bccac5bea

@ -31,6 +31,9 @@ const selectCoupon = (item) => {
yytjInfo.value.couponId = item.id;
yytjInfo.value.couponPrice = item.price;
$store.setYytjInfo(yytjInfo.value);
let buyinfo=$store.getBuyInfo()
buyinfo.coupon_id= item.id
$store.setBuyInfo(buyinfo);
uni.navigateBack({ delta: 1 });
};
@ -38,6 +41,9 @@ const noSelectCoupon = () => {
yytjInfo.value.couponId = "";
yytjInfo.value.couponPrice = "";
$store.setYytjInfo(yytjInfo.value);
let buyinfo=$store.getBuyInfo()
buyinfo.coupon_id=null
$store.setBuyInfo(buyinfo);
};
const config_ref = ref(null);

@ -284,10 +284,11 @@ const comfrimyy = async () => {
duo_xuan_yi: $store.getDuoXuanYi(),
jifen: Math.ceil(jifen.value),
yucunkuan: yucunkuan.value,
coupon_id:yytjInfo.value?.couponId || null,
wj: buyInfo.value.wj,
};
console.log(obj);
return false;
const response = await $api("OrderCreate", obj);
$response(response, () => {
if (response.status) {

Loading…
Cancel
Save