From 4bccac5bea3cda8521226fe1c63d19d4e53ae925 Mon Sep 17 00:00:00 2001 From: yanzai Date: Mon, 28 Oct 2024 23:36:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E9=87=91=E5=88=B8=EF=BC=8C=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E5=89=8D=E7=AB=AF=E4=BC=A0=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- h5/pages/main/coupon/coupon.vue | 6 ++++++ h5/pages/main/tjyy/tjyy.vue | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/h5/pages/main/coupon/coupon.vue b/h5/pages/main/coupon/coupon.vue index 5830563..d15bdbc 100644 --- a/h5/pages/main/coupon/coupon.vue +++ b/h5/pages/main/coupon/coupon.vue @@ -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); diff --git a/h5/pages/main/tjyy/tjyy.vue b/h5/pages/main/tjyy/tjyy.vue index edbd9f3..10f464d 100755 --- a/h5/pages/main/tjyy/tjyy.vue +++ b/h5/pages/main/tjyy/tjyy.vue @@ -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) {