diff --git a/pages/goods/goods.vue b/pages/goods/goods.vue index be00f6e..cc35064 100644 --- a/pages/goods/goods.vue +++ b/pages/goods/goods.vue @@ -78,11 +78,12 @@ @click="perImage(codes)"> - + 赠送卡券 + @@ -144,7 +147,7 @@ currentSwiper: 0, anchorlist: [], //导航条锚点 // 商品信息 - goodsData: "", + goodsData: [], //商品描述html desid: '', imageUrl: app.globalData.imgUrl, diff --git a/pages/order/confirmation.vue b/pages/order/confirmation.vue index 16489ae..33c2587 100644 --- a/pages/order/confirmation.vue +++ b/pages/order/confirmation.vue @@ -3,7 +3,7 @@ - + {{couponList.couponName}} 规格: 默认 @@ -127,7 +127,7 @@ --> - + 积分抵扣与优惠券抵扣不同享 @@ -141,7 +141,33 @@ - + + + + + + + + + {{item.payTypeName}} + 可用余额: {{tongCardPrice}}元 + 可用余额: {{oilPirce}}元 + 可用余额: {{oilUserNoPrice}}元 + + + + + + + + + + + @@ -218,18 +245,18 @@ 实付:¥{{paytheprice}} - - + - + 优惠券选择 @@ -288,7 +315,7 @@ radioStatus: true, memDiscountId: '', user: '', - paytype: '2', + paytype: '', PaymentPassword: '', orderId: '', jumpType: '', @@ -316,7 +343,7 @@ oilPirce: 0, //油卡余额 oilUserno: '', //油卡卡号 contactName: '', //油卡联系人 - oilUserNoPrice: '', //油卡余额 + oilUserNoPrice: 0, //油卡余额 UserCard: '', //车牌号列表 cardNoNumber: '', // 车牌号 }; @@ -337,9 +364,12 @@ onShow() { let that = this; // that.paytype = ''; - that.user = app.globalData.userInfo; + /* */ + // that.user = app.globalData.userInfo; + /* */ that.findUser(); this.getUserCardList(); + }, onHide() { @@ -387,8 +417,12 @@ getThirdPartyByDetail(datas).then(res => { if (res.return_code == '000000') { this.rechargeDes = res.return_data; - this.paytypeList = res.return_data.productPayType.split(','); - this.paytypeList = this.paytypeList.slice(0, this.paytypeList.length - 1); + + // this.paytypeList = res.return_data.productPayType.split(','); + // this.paytypeList = this.paytypeList.slice(0, this.paytypeList.length - 1); + this.paytypeList = res.return_data.productPayTypeNew; + + let zkprice = parseFloat(res.return_data.integralDiscount / 100).toFixed(2); let pprice = parseFloat(this.paytheprice * 100).toFixed(0) let payprice = parseFloat(this.paytheprice * 100 * zkprice).toFixed( @@ -398,6 +432,26 @@ } else { this.availIntegal = payprice; } + + + /* 默认选第一个支付方式 */ + if(this.paytypeList.length>0){ + this.paytype = this.paytypeList[0].payTypeId; + if(this.paytype == 8){ + if(this.isDiscount){ + this.isDiscount = false; + this.$nextTick(()=>{ + this.priceValue = [0,Number(this.availIntegal)]; + this.isDiscount = true; + this.blockEnd(); + console.log(this.paytype,"11111111",this.priceValue); + }) + } + } + + } + + } }); }, @@ -408,6 +462,7 @@ if (res.return_code == '000000') { app.globalData.userInfo = res.return_data; this.user = res.return_data; + if (this.user.hltCardNo) { this.getHuiLianTongCardBalance(); } @@ -545,7 +600,7 @@ }, //计算价格 priceCaluc(item) { - let zkprice = parseFloat(this.rechargeDes.integralDiscount / 100).toFixed(2); + let zkprice = parseFloat(this.rechargeDes.integralDiscount / 100).toFixed(2);//积分使用比例integralDiscount let pprice = parseFloat(item * 100).toFixed(0); let payprice = parseFloat(item * 100 * zkprice).toFixed(0); if (payprice > this.user.gold) { @@ -670,6 +725,48 @@ return; } + /* 积分兑换*/ + if(this.paytype == '8'){ + + let title=""; + if(this.priceValue[1] >= this.availIntegal){ //积分划到最大了 + title = "积分不足,是否充值积分?" + }else{ //积分没有滑倒最大 + + let Remain = parseFloat(this.availIntegal - this.priceValue[1]);/* 剩余积分数量 */ + let price = parseFloat(this.paytheprice*100); /* 需要的积分数量*/ + + if(Remain >=price){ + uni.showToast({ + title: '积分充足,请拖动滑杆进行抵扣', + icon: 'none', + duration: 2000 + }) + return + }else{ + title = "积分不足,是否充值积分?" + } + } + + let that = this; + uni.showModal({ + title: '提示', + content: title, + success: function (res) { + if (res.confirm) { + uni.navigateTo({ + url:'/pages/user/deposit/deposit?inputAmount='+that.paytheprice + }) + + } else if (res.cancel) { + + } + } + }); + + return + } + if (this.orderDetails) { this.wechatPay(this.orderDetails); return; @@ -698,6 +795,7 @@ "phone": this.contactPhone } } + create(goods).then(res => { uni.hideLoading(); if (res.return_code == '000000') { @@ -743,6 +841,7 @@ }) return; } + if (that.paytype == '2') { // #ifdef H5 let params = { @@ -1050,8 +1149,10 @@ .deductionPrice).toFixed(2); } if (this.paytheprice == 0) { - this.isUse = false; - this.paytype = ''; + if(this.paytype!=8){ + this.isUse = false; + this.paytype = ''; + } } else { this.isUse = true; } diff --git a/pages/tabBar/category/category.vue b/pages/tabBar/category/category.vue index 3679066..7042150 100644 --- a/pages/tabBar/category/category.vue +++ b/pages/tabBar/category/category.vue @@ -83,8 +83,9 @@ - + @@ -188,8 +190,8 @@