From 65be66ba913968d44eb58840d0fd7fafe8726e90 Mon Sep 17 00:00:00 2001 From: duan <1004387497@qq.com> Date: Fri, 31 May 2024 11:36:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96w?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/order_detail/order_detail.vue | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/pages/order_detail/order_detail.vue b/pages/order_detail/order_detail.vue index c58de14..9e8e885 100644 --- a/pages/order_detail/order_detail.vue +++ b/pages/order_detail/order_detail.vue @@ -333,6 +333,28 @@ orderId: this.listinfoid }) }, + creactorder(){ + let data = { //定义socket数据传参 + "skuId": '', + "num": '', //数量 + "type": "createOrder", //“addcart:添加购物车,create0rder:生成订单,clearCart:庆康购物车”, + "couponsId": this.emitorderfoodform.id ? this.emitorderfoodform.id : '', //优惠券ID, + "isYhq": this.emitorderfoodform.id ? 1 : 0, // 是否使用优惠券( 1: 使用, 0: 不使用), + "isBuyYhq": this.emitorderfoodform.clickiconone == 1 ? 1 : 0, // 是否购买优惠券( 1: 购买, 0: 不够买) + "productId": '', //商品id + "shopId": uni.cache.get('shopUser'), + "userId": uni.cache.get('userInfo').id, + // tableId:uni.cache.get('tableCode') + } + let res = 0 + if(res.code==0){ + this.listinfoid = msg.data.id //下单需要的id + this.orderInfo = msg.data + if (this.radiovalue1 == 1) { + this.showpopupclickdds() //微信支付 + } + } + }, // 去结算 showpopupclick() { let data = { //定义socket数据传参 @@ -359,7 +381,8 @@ showpopupclickdd() { console.log(this.radiovalue1, 'radiovalue1的值') if (this.radiovalue1 == 1) { - this.showpopupclick() //生成订单 + // this.showpopupclick() //生成订单 + this.creactorder() } else { // 判断是否有绑定支付密码 // 先判断是否设置支付密码。0是没设置。没设置的情况下跳转到设置页面。有的话输入支付密码 @@ -370,7 +393,8 @@ } else { if (this.amountVIP.amount > this.listinfo.amount) { this.ispws = true - this.showpopupclick() //生成订单 + // this.showpopupclick() //生成订单 + this.creactorder() this.$nextTick(() => { this.$refs.payPwd.onPayUp(); })