From 149344ecd82a6c9a4f7d6749975461f5b3145b11 Mon Sep 17 00:00:00 2001 From: jiazhipeng Date: Sat, 25 Jan 2025 16:25:36 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=92=E5=BA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 2 +- pages/order/hotel/index.js | 14 +++++++++++--- pages/order/hotel/index.wxml | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/app.js b/app.js index e8b8d6a..170af3f 100644 --- a/app.js +++ b/app.js @@ -21,7 +21,7 @@ App({ unique_key: "wechatxcx" }).then(res => { let data = JSON.parse(res.data); - data.isTest = data.isTest157? true : false; + data.isTest = data.isTest? true : false; this.globalData.configJson = data }).then(() => { // 获取ui配置文件 diff --git a/pages/order/hotel/index.js b/pages/order/hotel/index.js index 0ca49c7..131c265 100644 --- a/pages/order/hotel/index.js +++ b/pages/order/hotel/index.js @@ -29,7 +29,8 @@ Page({ showMask:false, editId:null, linkmanList:[], - prizeId:null + prizeId:null, + showCoupon: false }, /** @@ -39,7 +40,7 @@ Page({ this.setData({ prizeId:wx.getStorageSync('prizeId') }) - this.couponCom = this.selectAllComponents("#coupon")[0]; + let CtripHotelCart = app.globalData.product; // 获取默认联系人 userApi.user_post("user/getDefaultContact",{ @@ -73,8 +74,15 @@ Page({ CtripHotelCart.price_sum = price_sum; this.setData({ priceInfo:res.data, - CtripHotelCart:CtripHotelCart + CtripHotelCart:CtripHotelCart, + showCoupon: true }) + this.couponCom = this.selectAllComponents("#coupon")[0]; + // if (this.couponCom) { + // this.couponCom.getMaxCoupon() + // } + + }) }, inputTel:function(e){ diff --git a/pages/order/hotel/index.wxml b/pages/order/hotel/index.wxml index 3619f74..94eea6a 100644 --- a/pages/order/hotel/index.wxml +++ b/pages/order/hotel/index.wxml @@ -69,7 +69,7 @@ - +