|
|
|
@ -3,7 +3,7 @@ |
|
|
|
|
|
|
|
|
|
<view class="width94 comorder mart10"> |
|
|
|
|
<view class="height100p width94 goodsimg"> |
|
|
|
|
<image class="flleft" mode="widthFix" :src="imageUrl+couponList.couponImg"></image> |
|
|
|
|
<image class="flleft" mode="widthFix" v-if="couponList.couponImg" :src="imageUrl+couponList.couponImg"></image> |
|
|
|
|
<view class="tcrig"> |
|
|
|
|
<view class="font18 fontwig6 fcor333 text1">{{couponList.couponName}}</view> |
|
|
|
|
<view class="font13 fcor666 mart10">规格: 默认</view> |
|
|
|
@ -127,7 +127,7 @@ |
|
|
|
|
</view> --> |
|
|
|
|
</view> |
|
|
|
|
<view class=" width100 backcorfff alijusstart paddbotm10" style="padding-left: 2%;"> |
|
|
|
|
<image src="../../static/img/sigh.png" mode="widthFix" class="icon20"></image> |
|
|
|
|
<image src="../../static/img/sigh.png" mode="widthFix" style="width:20px;height:20px"></image> |
|
|
|
|
<text class="fcor999 font13">积分抵扣与优惠券抵扣不同享</text> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
@ -141,7 +141,33 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="width100" v-for="(item,index) in paytypeList" :key="index"> |
|
|
|
|
<view class="width94 line1 mart5 marb5" v-if="item == 2"></view> |
|
|
|
|
<view class="width94 line1 mart5 marb5"></view> |
|
|
|
|
<view class="height50 width100 backcorfff" @tap="paytype=item.payTypeId" > |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view class="width70 flleft fcor333 font16 text1" style="padding-left: 4%;"> |
|
|
|
|
<view class="dis-flex"> |
|
|
|
|
<image mode="aspectFit" v-if="item.payTypeLogo" :src="imageUrl+item.payTypeLogo" style="width:30px;height:30px;"></image> |
|
|
|
|
<text class="margle">{{item.payTypeName}}</text> |
|
|
|
|
<text class="font14 fcor666 margle" v-if="item.payTypeId == 3">可用余额: {{tongCardPrice}}元</text> |
|
|
|
|
<text class="font14 fcor666 margle" v-if="item.payTypeId == 6">可用余额: {{oilPirce}}元</text> |
|
|
|
|
<text class="font14 fcor666 margle" v-if="item.payTypeId == 7">可用余额: {{oilUserNoPrice}}元</text> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="width20 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun" |
|
|
|
|
style="align-items: center;" v-if="isUse"> |
|
|
|
|
<template v-if="item.payTypeId == 3"> |
|
|
|
|
<radio :checked="paytype==item.payTypeId" @click="changeRiado()" color="#0083f5" /> |
|
|
|
|
</template> |
|
|
|
|
<template v-else> |
|
|
|
|
<radio :checked="paytype==item.payTypeId" color="#0083f5" /> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<!-- <view class="width94 line1 mart5 marb5" v-if="item == 2"></view> |
|
|
|
|
<view class="height50 width100 backcorfff" @tap="paytype='2'" v-if="item == 2"> |
|
|
|
|
<view class="width50 flleft fcor333 font16" style="padding-left: 4%;"> |
|
|
|
|
微信支付 |
|
|
|
@ -180,7 +206,8 @@ |
|
|
|
|
style="align-items: center;" v-if="isUse"> |
|
|
|
|
<radio :checked="paytype=='7'" color="#0083f5" /> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> --> |
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view v-if="paytype=='7'" class="backcorfff"> |
|
|
|
@ -218,18 +245,18 @@ |
|
|
|
|
<view class="sum">实付:<view class="money">¥{{paytheprice}}</view> |
|
|
|
|
</view> |
|
|
|
|
<!-- #ifdef MP --> |
|
|
|
|
<button class="btn" open-type="getPhoneNumber" v-if="user == null" |
|
|
|
|
<button class="btn" open-type="getPhoneNumber" v-if="user == null || !user" |
|
|
|
|
@getphonenumber="loginByPhone">立即支付</button> |
|
|
|
|
<button class="btn" v-else @tap="toPay">立即支付</button> |
|
|
|
|
<!-- #endif --> |
|
|
|
|
<!-- #ifdef H5 --> |
|
|
|
|
<button class="btn" v-if="user.phone == null" @click="jumpH5Bding">立即支付</button> |
|
|
|
|
<button class="btn" v-if="user.phone == null || !user.phone" @click="jumpH5Bding">立即支付</button> |
|
|
|
|
<button class="btn" v-else @tap="toPay">立即支付</button> |
|
|
|
|
<!-- #endif --> |
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<wybPopup ref="popup" type="bottom" width="500" scrollY="true" radius="6" :showCloseIcon="true"> |
|
|
|
|
<wybPopup ref="popup" type="bottom" width="500" :scrollY="true" radius="6" :showCloseIcon="true"> |
|
|
|
|
<view class="fotct font18 fontwig6 fcor333 mart10 height30">优惠券选择</view> |
|
|
|
|
<view class="width92 height110 tccs mart10" v-for="(items, index) in UserNormalDiscountList" :key="items" |
|
|
|
|
@click="radioChanges(items)"> |
|
|
|
@ -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; |
|
|
|
|
} |
|
|
|
|