diff --git a/App.vue b/App.vue index 86f79f0..6e8a4fa 100644 --- a/App.vue +++ b/App.vue @@ -5,7 +5,7 @@ projectname:'', // 项目名称 lat:'', // 公司地址维度 lng:'' ,// 公司地址经度 - hostapi:'https://chuanwujia.scdxtc.cn' // 域名配置 + hostapi:'https://chuanwujia.com' // 域名配置 }, // 优先于show方法 onLaunch: ()=> { diff --git a/components/custom-coupon.vue b/components/custom-coupon.vue index 1f82ecf..19b6f7e 100644 --- a/components/custom-coupon.vue +++ b/components/custom-coupon.vue @@ -27,6 +27,7 @@ + 暂无可用优惠券 @@ -82,7 +83,8 @@ }, // 查询是否选中 checkChoose(){ - let exitIndex = this.dataList.findIndex(item=>item.coupon_id==this.couponId); + console.log(this.couponId,666666); + let exitIndex = this.dataList.findIndex(item=>item.id==this.couponId); if(exitIndex!=-1){ this.dataList[exitIndex].ifcheck = true; this.setCoupon(true,exitIndex); @@ -90,11 +92,13 @@ }, // 存储优惠券的值 setCoupon(flag,index){ - this.couponIndex = index; - this.dataList[index].ifcheck = flag; - this.couponPrice = flag?this.dataList[index].amount:0;//选中优惠券金额 - this.couponId = flag?this.dataList[index].coupon_id:'';//选中优惠券id - this.couponCount = flag?1:0;//选中优惠券数量 + if(this.dataList.length){ + this.couponIndex = index; + this.dataList[index].ifcheck = flag; + this.couponPrice = flag?this.dataList[index].amount:0;//选中优惠券金额 + this.couponId = flag?this.dataList[index].id:'';//选中优惠券id + this.couponCount = flag?1:0;//选中优惠券数量 + } }, // 选择优惠券 chooseCoupon(id,index){ diff --git a/components/status-navs/custom-status-nav.vue b/components/status-navs/custom-status-nav.vue index 154bb10..72458b4 100644 --- a/components/status-navs/custom-status-nav.vue +++ b/components/status-navs/custom-status-nav.vue @@ -38,6 +38,7 @@