|
|
|
@ -8,29 +8,29 @@ |
|
|
|
|
<view class="font18 fontwig6 fcor333 text1">{{couponList.couponName}}</view> |
|
|
|
|
<view class="font13 fcor666 mart10">规格: 默认</view> |
|
|
|
|
<view class="price-number mart10" v-if="isDiscont"> |
|
|
|
|
<view class="price font16" v-if="couponList.payType == 1">¥{{couponList.salesPrice}}</view> |
|
|
|
|
<view class="price font16" v-else> |
|
|
|
|
<view class="price font16">¥{{couponList.salesPrice}}</view> |
|
|
|
|
<!-- <view class="price font16" v-else> |
|
|
|
|
<image style="width: 15px;height: 15px;" src="../../static/img/jfx.png"> |
|
|
|
|
</image>{{couponList.salesPrice * 100}} |
|
|
|
|
</view> |
|
|
|
|
</view> --> |
|
|
|
|
<view class="flright fotrt paddleft10">x1</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="price-number mart10" v-if="!isDiscont"> |
|
|
|
|
<view class="price font16" v-if="couponList.payType == 1">¥{{couponList.discountPrice}}</view> |
|
|
|
|
<view class="price font16" v-else> |
|
|
|
|
<view class="price font16">¥{{couponList.discountPrice}}</view> |
|
|
|
|
<!-- <view class="price font16" v-else> |
|
|
|
|
<image style="width: 15px;height: 15px;" src="../../static/img/jfx.png"> |
|
|
|
|
</image>{{couponList.discountPrice*100}} |
|
|
|
|
</view> |
|
|
|
|
</view> --> |
|
|
|
|
|
|
|
|
|
<view class="number fcor666 font13 margle" |
|
|
|
|
v-if="couponList.payType == 1 && couponList.salesPrice != couponList.discountPrice"> |
|
|
|
|
v-if="couponList.salesPrice != couponList.discountPrice"> |
|
|
|
|
¥{{couponList.salesPrice}} |
|
|
|
|
</view> |
|
|
|
|
<view class="number fcor666 font13 margle" |
|
|
|
|
<!-- <view class="number fcor666 font13 margle" |
|
|
|
|
v-if="couponList.payType != 1 && couponList.salesPrice != couponList.discountPrice"> |
|
|
|
|
<image style="width: 15px;height: 15px;" src="../../static/img/jfh.png"> |
|
|
|
|
</image>{{couponList.salesPrice*100}} |
|
|
|
|
</view> |
|
|
|
|
</view> --> |
|
|
|
|
<view class="flright fotrt paddleft10">x1</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -40,24 +40,22 @@ |
|
|
|
|
<view class="width50 flleft fcor333 fontwig6 font16" style="padding-left: 4%;"> |
|
|
|
|
商品总额 |
|
|
|
|
</view> |
|
|
|
|
<view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor999" |
|
|
|
|
v-if="couponList.payType == 1 && isDiscont"> |
|
|
|
|
<view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor999" v-if=" isDiscont"> |
|
|
|
|
¥{{couponList.salesPrice}} |
|
|
|
|
</view> |
|
|
|
|
<view class="width40 flright alijun paddtright10 font15 fontwig6 fcor666 aliitem" |
|
|
|
|
<!-- <view class="width40 flright alijun paddtright10 font15 fontwig6 fcor666 aliitem" |
|
|
|
|
v-if="couponList.payType != 1 && isDiscont"> |
|
|
|
|
<image style="width: 15px;height: 15px;" src="../../static/img/jfx.png"> |
|
|
|
|
</image>{{couponList.salesPrice*100}} |
|
|
|
|
</view> |
|
|
|
|
<view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor999" |
|
|
|
|
v-if="couponList.payType == 1 && !isDiscont"> |
|
|
|
|
</view> --> |
|
|
|
|
<view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor999" v-if="!isDiscont"> |
|
|
|
|
¥{{couponList.discountPrice}} |
|
|
|
|
</view> |
|
|
|
|
<view class="width40 flright alijun paddtright10 font15 fontwig6 fcor666 aliitem" |
|
|
|
|
<!-- <view class="width40 flright alijun paddtright10 font15 fontwig6 fcor666 aliitem" |
|
|
|
|
v-if="couponList.payType != 1 && !isDiscont"> |
|
|
|
|
<image style="width: 15px;height: 15px;" src="../../static/img/jfx.png"> |
|
|
|
|
</image>{{couponList.discountPrice*100}} |
|
|
|
|
</view> |
|
|
|
|
</view> --> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class="width94 line1 mart5 marb5"></view> |
|
|
|
@ -153,14 +151,13 @@ |
|
|
|
|
</view> |
|
|
|
|
<!-- <view class="width94 line1 mart5 marb5"></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" 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%;"> |
|
|
|
|
微信支付 |
|
|
|
|
</view> |
|
|
|
|
<view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun" |
|
|
|
|
style="align-items: center;"> |
|
|
|
|
style="align-items: center;" v-if="isUse"> |
|
|
|
|
<radio :checked="paytype=='2'" color="#0083f5" /> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -170,7 +167,7 @@ |
|
|
|
|
汇联通工会卡<text class="font14 fcor666 margle">可用余额: {{tongCardPrice}}元</text> |
|
|
|
|
</view> |
|
|
|
|
<view class="width20 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun" |
|
|
|
|
style="align-items: center;"> |
|
|
|
|
style="align-items: center;" v-if="isUse"> |
|
|
|
|
<radio :checked="paytype=='3'" @click="changeRiado()" color="#0083f5" /> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -193,11 +190,11 @@ |
|
|
|
|
<view class="width100 height60"></view> |
|
|
|
|
<view class="footer"> |
|
|
|
|
<view class="settlement"> |
|
|
|
|
<view class="sum">实付:<view class="money" v-if="couponList.payType == 1">¥{{paytheprice}}</view> |
|
|
|
|
<view class="money aliitem" v-else> |
|
|
|
|
<view class="sum">实付:<view class="money">¥{{paytheprice}}</view> |
|
|
|
|
<!-- <view class="money aliitem" v-else> |
|
|
|
|
<image style="width: 15px;height: 15px;vertical-align: sub;" src="../../static/img/jfx.png"> |
|
|
|
|
</image>{{paytheprice*100}} |
|
|
|
|
</view> |
|
|
|
|
</view> --> |
|
|
|
|
</view> |
|
|
|
|
<!-- #ifdef MP --> |
|
|
|
|
<button class="btn" open-type="getPhoneNumber" v-if="user == null" |
|
|
|
@ -233,18 +230,17 @@ |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import { |
|
|
|
|
addOrder, |
|
|
|
|
create, |
|
|
|
|
getCouponById, |
|
|
|
|
loginByPhone, |
|
|
|
|
getUserNormalDiscountList, |
|
|
|
|
orderToPay, |
|
|
|
|
orderToGoldPay, |
|
|
|
|
findUser, |
|
|
|
|
hltUnionCardPay, |
|
|
|
|
cardPay, |
|
|
|
|
getRebateIntegral, |
|
|
|
|
getHuiLianTongCardBalance, |
|
|
|
|
getThirdPartyByDetail |
|
|
|
|
getThirdPartyByDetail, |
|
|
|
|
wechatPay |
|
|
|
|
} from '../../Utils/Api.js'; |
|
|
|
|
import wybPopup from '../../components/wyb-popup/wyb-popup.vue'; |
|
|
|
|
import cjSlider from '../../components/cj-slider/cj-slider.vue'; |
|
|
|
@ -272,7 +268,9 @@ |
|
|
|
|
UserNormalDiscountList: [], |
|
|
|
|
imageUrl: app.globalData.imgUrl, |
|
|
|
|
deductionPrice: '0.00', |
|
|
|
|
paytheprice: '', |
|
|
|
|
paytheprice: '', //支付金额 |
|
|
|
|
saveprice: '', //折扣价 |
|
|
|
|
orderPrice: '', //原价 |
|
|
|
|
radioStatus: true, |
|
|
|
|
memDiscountId: '', |
|
|
|
|
user: '', |
|
|
|
@ -362,8 +360,8 @@ |
|
|
|
|
this.paytypeList = res.return_data.productPayType.split(','); |
|
|
|
|
this.paytypeList = this.paytypeList.slice(0, this.paytypeList.length - 1); |
|
|
|
|
let zkprice = parseFloat(res.return_data.integralDiscount / 100).toFixed(2); |
|
|
|
|
let pprice = parseFloat(this.totalprice * 100).toFixed(0) |
|
|
|
|
let payprice = parseFloat(this.totalprice * 100 * zkprice).toFixed( |
|
|
|
|
let pprice = parseFloat(this.paytheprice * 100).toFixed(0) |
|
|
|
|
let payprice = parseFloat(this.paytheprice * 100 * zkprice).toFixed( |
|
|
|
|
0); |
|
|
|
|
if (payprice > this.user.gold) { |
|
|
|
|
this.availIntegal = this.user.gold; |
|
|
|
@ -380,8 +378,6 @@ |
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
app.globalData.userInfo = res.return_data; |
|
|
|
|
this.user = res.return_data; |
|
|
|
|
this.availIntegal = res.return_data.gold; |
|
|
|
|
this.findById(); |
|
|
|
|
if (this.user.hltCardNo) { |
|
|
|
|
this.getHuiLianTongCardBalance(); |
|
|
|
|
} |
|
|
|
@ -425,6 +421,8 @@ |
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
this.couponList = res.return_data; |
|
|
|
|
this.paytheprice = res.return_data.discountPrice; |
|
|
|
|
this.saveprice = res.return_data.discountPrice; |
|
|
|
|
this.orderPrice = res.return_data.salesPrice |
|
|
|
|
this.getThirdPartyByDetail(); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
@ -433,36 +431,126 @@ |
|
|
|
|
showPopup() { |
|
|
|
|
this.$refs.popup.show(); |
|
|
|
|
}, |
|
|
|
|
// radioChanges(item) { |
|
|
|
|
// if (this.memDiscountId == item.id) { // 如果已经选中,则取消选中 |
|
|
|
|
// this.memDiscountId = ''; |
|
|
|
|
// this.coupondiscountid = ''; |
|
|
|
|
// this.paytheprice = this.couponList.discountPrice; |
|
|
|
|
// this.deductionPrice = '0.00'; |
|
|
|
|
// this.isDiscont = false; |
|
|
|
|
// } else { // 否则进行选中赋值 |
|
|
|
|
// this.isDiscont = true; |
|
|
|
|
// this.memDiscountId = item.id; |
|
|
|
|
// this.coupondiscountid = item.id; |
|
|
|
|
// if (item.highDiscount.discountType == 1) { |
|
|
|
|
// //满减价格 |
|
|
|
|
// this.deductionPrice = item.highDiscount.discountPrice; |
|
|
|
|
// this.paytheprice = parseFloat(this.couponList.salesPrice - this.deductionPrice).toFixed(2); |
|
|
|
|
// } else if (item.highDiscount.discountType == 2) { |
|
|
|
|
// //抵扣价格 |
|
|
|
|
// this.deductionPrice = item.highDiscount.discountPrice; |
|
|
|
|
// this.paytheprice = parseFloat(this.couponList.salesPrice - this.deductionPrice).toFixed(2); |
|
|
|
|
// } else if (item.highDiscount.discountType == 3) { |
|
|
|
|
// // 打折 |
|
|
|
|
// this.deductionPrice = parseFloat(this.couponList.salesPrice - (this.couponList.salesPrice * |
|
|
|
|
// item |
|
|
|
|
// .highDiscount.discountPrice)).toFixed(2) |
|
|
|
|
// this.paytheprice = parseFloat(this.couponList.salesPrice * item.highDiscount.discountPrice) |
|
|
|
|
// .toFixed(2); |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
// this.$refs.popup.hide(); |
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//选择优惠券 |
|
|
|
|
radioChanges(item) { |
|
|
|
|
this.paytheprice = this.orderPrice; |
|
|
|
|
this.rechangeload(); |
|
|
|
|
if (this.memDiscountId == item.id) { // 如果已经选中,则取消选中 |
|
|
|
|
this.memDiscountId = ''; |
|
|
|
|
this.coupondiscountid = ''; |
|
|
|
|
this.paytheprice = this.couponList.discountPrice; |
|
|
|
|
this.deductionPrice = '0.00'; |
|
|
|
|
this.priceCaluc(this.saveprice); |
|
|
|
|
this.isDiscont = false; |
|
|
|
|
} else { // 否则进行选中赋值 |
|
|
|
|
this.isDiscont = true; |
|
|
|
|
this.memDiscountId = item.id; |
|
|
|
|
this.coupondiscountid = item.id; |
|
|
|
|
if (item.highDiscount.discountType == 1) { |
|
|
|
|
//满减价格 |
|
|
|
|
if (this.orderPrice > item.highDiscount.discountCondition) { |
|
|
|
|
this.memDiscountId = item.id; |
|
|
|
|
//满减价格 |
|
|
|
|
this.deductionPrice = item.highDiscount.discountPrice; |
|
|
|
|
this.paytheprice = parseFloat(this.couponList.salesPrice - this.deductionPrice).toFixed(2); |
|
|
|
|
} else if (item.highDiscount.discountType == 2) { |
|
|
|
|
let oldprice = this.orderPrice - this.deductionPrice; |
|
|
|
|
this.priceCaluc(oldprice); |
|
|
|
|
} else { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '请满' + item.highDiscount.discountCondition + '使用此券', |
|
|
|
|
icon: 'none', |
|
|
|
|
duration: 2000 |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (item.highDiscount.discountType == 2) { |
|
|
|
|
//抵扣价格 |
|
|
|
|
this.deductionPrice = item.highDiscount.discountPrice; |
|
|
|
|
this.paytheprice = parseFloat(this.couponList.salesPrice - this.deductionPrice).toFixed(2); |
|
|
|
|
} else if (item.highDiscount.discountType == 3) { |
|
|
|
|
let oldprice = this.orderPrice - this.deductionPrice; |
|
|
|
|
this.priceCaluc(oldprice); |
|
|
|
|
} |
|
|
|
|
if (item.highDiscount.discountType == 3) { |
|
|
|
|
// 打折 |
|
|
|
|
this.deductionPrice = parseFloat(this.couponList.salesPrice - (this.couponList.salesPrice * |
|
|
|
|
item |
|
|
|
|
.highDiscount.discountPrice)).toFixed(2) |
|
|
|
|
this.paytheprice = parseFloat(this.couponList.salesPrice * item.highDiscount.discountPrice) |
|
|
|
|
this.deductionPrice = parseFloat(this.orderPrice - (this.orderPrice * item.highDiscount |
|
|
|
|
.discountPrice)) |
|
|
|
|
.toFixed(2); |
|
|
|
|
let oldprice = parseFloat(this.orderPrice * item.highDiscount.discountPrice).toFixed(2); |
|
|
|
|
this.priceCaluc(oldprice); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
this.$refs.popup.hide(); |
|
|
|
|
}, |
|
|
|
|
//计算价格 |
|
|
|
|
priceCaluc(item) { |
|
|
|
|
let zkprice = parseFloat(this.rechargeDes.integralDiscount / 100).toFixed(2); |
|
|
|
|
let pprice = parseFloat(item * 100).toFixed(0); |
|
|
|
|
let payprice = parseFloat(item * 100 * zkprice).toFixed(0); |
|
|
|
|
if (payprice > this.user.gold) { |
|
|
|
|
this.availIntegal = this.user.gold; |
|
|
|
|
this.priceValue[1] = 0; |
|
|
|
|
// if (this.availIntegal < this.priceValue[1]) { |
|
|
|
|
// this.priceValue[1] = this.user.gold; |
|
|
|
|
// this.reload(); |
|
|
|
|
// } |
|
|
|
|
} else { |
|
|
|
|
this.availIntegal = payprice; |
|
|
|
|
this.priceValue[1] = 0; |
|
|
|
|
// this.reload(); |
|
|
|
|
} |
|
|
|
|
this.reload(); |
|
|
|
|
this.calculatepayPrice(); |
|
|
|
|
}, |
|
|
|
|
//计算支付价格 |
|
|
|
|
calculatepayPrice() { |
|
|
|
|
if (this.deductionPrice == 0) { |
|
|
|
|
this.paytheprice = parseFloat(this.saveprice - (parseFloat(this.priceValue[1] / 100).toFixed(2))) |
|
|
|
|
.toFixed( |
|
|
|
|
2); |
|
|
|
|
} else { |
|
|
|
|
this.paytheprice = parseFloat(this.orderPrice - (parseFloat(this.priceValue[1] / 100).toFixed(2)) - |
|
|
|
|
this |
|
|
|
|
.deductionPrice).toFixed(2); |
|
|
|
|
} |
|
|
|
|
this.getRebateIntegral(); |
|
|
|
|
}, |
|
|
|
|
rechangeload() { |
|
|
|
|
this.isUse = false; |
|
|
|
|
this.$nextTick(() => (this.isUse = true)) |
|
|
|
|
}, |
|
|
|
|
//刷新组件 |
|
|
|
|
reload() { |
|
|
|
|
this.isDiscount = false; |
|
|
|
|
this.$nextTick(() => (this.isDiscount = true)) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
//查询优惠券详情 |
|
|
|
|
getUserNormalDiscountList() { |
|
|
|
|
let params = { |
|
|
|
@ -532,6 +620,18 @@ |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
toPay() { |
|
|
|
|
|
|
|
|
|
if (this.paytheprice == 0) { |
|
|
|
|
if (!this.user.isSetPayPwd) { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '../login/updatePas/updatePas' |
|
|
|
|
}) |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this.$refs.paymentPassword.modalFun('show'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (this.paytype == '') { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '请选择支付方式', |
|
|
|
@ -540,8 +640,9 @@ |
|
|
|
|
}) |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (this.orderDetails) { |
|
|
|
|
this.orderToPay(this.orderDetails); |
|
|
|
|
this.wechatPay(this.orderDetails); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
uni.showLoading({ |
|
|
|
@ -550,33 +651,23 @@ |
|
|
|
|
if (this.couponList.reserveStatus) { |
|
|
|
|
this.storeId = app.globalData.storeid |
|
|
|
|
} |
|
|
|
|
if (this.paytype == 'jinbi' && this.user.gold < this.paytheprice * 100 && this.couponList.buyPoints) { |
|
|
|
|
this.payGold = this.user.gold; |
|
|
|
|
} |
|
|
|
|
let goods = { |
|
|
|
|
"memDiscountId": this.coupondiscountid, |
|
|
|
|
"identificationCode": this.identificationCode, |
|
|
|
|
"payGold": this.payGold, |
|
|
|
|
"highChildOrderList": [{ |
|
|
|
|
"goodsType": 1, |
|
|
|
|
"childOrderList": [{ |
|
|
|
|
"goodsId": this.couponId, |
|
|
|
|
"goodsPrice": this.paytheprice, |
|
|
|
|
"goodsType": 1, |
|
|
|
|
"saleCount": 1, |
|
|
|
|
"storeId": this.storeId |
|
|
|
|
}] |
|
|
|
|
}], |
|
|
|
|
"payGold": this.priceValue[1], |
|
|
|
|
"promoteCode": this.identificationCode |
|
|
|
|
} |
|
|
|
|
addOrder(goods).then(res => { |
|
|
|
|
create(goods).then(res => { |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
// uni.redirectTo({ |
|
|
|
|
// url: '../pay/payment/payment?amount=' + res.return_data.payPrice + |
|
|
|
|
// '&paytype=' + this.couponList.payType + '&orderId=' + res.return_data.id + |
|
|
|
|
// '&couponId=' + this.couponId + '&typeaout=' + res.return_data |
|
|
|
|
// .highChildOrderList[0].ext1 |
|
|
|
|
// }) |
|
|
|
|
this.jumpType = res.return_data.highChildOrderList[0].ext1; |
|
|
|
|
this.orderId = res.return_data.id; |
|
|
|
|
this.orderDetails = res.return_data; |
|
|
|
|
this.orderToPay(res.return_data); |
|
|
|
|
this.wechatPay(res.return_data); |
|
|
|
|
} else { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: res.return_msg, |
|
|
|
@ -605,25 +696,24 @@ |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
//获取订单数据 |
|
|
|
|
orderToPay(item) { |
|
|
|
|
wechatPay(item) { |
|
|
|
|
let that = this; |
|
|
|
|
if (that.paytype == '2') { |
|
|
|
|
// #ifdef H5 |
|
|
|
|
let params = { |
|
|
|
|
"orderId": item.id, |
|
|
|
|
"orderNo": item.orderNo, |
|
|
|
|
"openId": app.globalData.openId, |
|
|
|
|
"orderScene": "GOODS_ORDER", |
|
|
|
|
"openIdType": 2 |
|
|
|
|
} |
|
|
|
|
// #endif |
|
|
|
|
// #ifdef MP |
|
|
|
|
let params = { |
|
|
|
|
"orderId": item.id, |
|
|
|
|
"orderNo": item.orderNo, |
|
|
|
|
"openId": app.globalData.openId, |
|
|
|
|
"orderScene": "GOODS_ORDER" |
|
|
|
|
"openIdType": 1 |
|
|
|
|
} |
|
|
|
|
// #endif |
|
|
|
|
orderToPay(params).then(res => { |
|
|
|
|
wechatPay(params).then(res => { |
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
// #ifdef MP |
|
|
|
|
uni.showLoading({ |
|
|
|
@ -720,44 +810,48 @@ |
|
|
|
|
uni.showLoading({ |
|
|
|
|
title: '支付中...' |
|
|
|
|
}) |
|
|
|
|
// if (this.paytype == 'jinbi') { |
|
|
|
|
// let params = { |
|
|
|
|
// "orderId": this.orderId, |
|
|
|
|
// "password": this.PaymentPassword |
|
|
|
|
// } |
|
|
|
|
// orderToGoldPay(params).then(res => { |
|
|
|
|
// uni.hideLoading(); |
|
|
|
|
// if (res.return_code == '000000') { |
|
|
|
|
// uni.showToast({ |
|
|
|
|
// title: '支付成功' |
|
|
|
|
// }) |
|
|
|
|
// app.globalData.storeid = ''; |
|
|
|
|
// app.globalData.storename = ''; |
|
|
|
|
// uni.reLaunch({ |
|
|
|
|
// url: '../pay/success/success?id=' + this.couponId |
|
|
|
|
// }); |
|
|
|
|
// return; |
|
|
|
|
// } |
|
|
|
|
// if (res.return_code == '102130') { |
|
|
|
|
// uni.navigateTo({ |
|
|
|
|
// url: '../../login/updatePas/updatePas' |
|
|
|
|
// }) |
|
|
|
|
// return; |
|
|
|
|
// } |
|
|
|
|
// uni.showToast({ |
|
|
|
|
// title: res.return_msg, |
|
|
|
|
// icon: 'none' |
|
|
|
|
// }) |
|
|
|
|
// }) |
|
|
|
|
// return; |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
if (this.paytheprice == 0) { |
|
|
|
|
let goods = { |
|
|
|
|
"childOrderList": [{ |
|
|
|
|
"goodsId": this.couponId, |
|
|
|
|
"goodsPrice": this.paytheprice, |
|
|
|
|
"goodsType": 1, |
|
|
|
|
"saleCount": 1, |
|
|
|
|
}], |
|
|
|
|
"payGold": this.priceValue[1], |
|
|
|
|
"promoteCode": this.identificationCode, |
|
|
|
|
"payPwd": this.PaymentPassword |
|
|
|
|
} |
|
|
|
|
create(goods).then(res => { |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '支付成功' |
|
|
|
|
}) |
|
|
|
|
app.globalData.storeid = ''; |
|
|
|
|
app.globalData.storename = ''; |
|
|
|
|
uni.reLaunch({ |
|
|
|
|
url: '../pay/success/success?id=' + this |
|
|
|
|
.couponId |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: res.return_msg, |
|
|
|
|
icon: 'none', |
|
|
|
|
duration: 2000 |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
let params = { |
|
|
|
|
"orderId": this.orderId, |
|
|
|
|
"orderNo": item.orderNo, |
|
|
|
|
"cardNo": this.user.hltCardNo.cardNo, |
|
|
|
|
"password": this.PaymentPassword |
|
|
|
|
} |
|
|
|
|
hltUnionCardPay(params).then(res => { |
|
|
|
|
cardPay(params).then(res => { |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
uni.showToast({ |
|
|
|
@ -851,13 +945,14 @@ |
|
|
|
|
blockEnd() { |
|
|
|
|
this.isDiscount = 1; |
|
|
|
|
if (this.deductionPrice == 0) { |
|
|
|
|
this.payPrice = parseFloat(this.saveprice - parseFloat(this.priceValue[1] / 100).toFixed(2)).toFixed( |
|
|
|
|
this.paytheprice = parseFloat(this.saveprice - parseFloat(this.priceValue[1] / 100).toFixed(2)) |
|
|
|
|
.toFixed( |
|
|
|
|
2); |
|
|
|
|
} else { |
|
|
|
|
this.payPrice = parseFloat(this.orderPrice - parseFloat(this.priceValue[1] / 100).toFixed(2) - this |
|
|
|
|
this.paytheprice = parseFloat(this.orderPrice - parseFloat(this.priceValue[1] / 100).toFixed(2) - this |
|
|
|
|
.deductionPrice).toFixed(2); |
|
|
|
|
} |
|
|
|
|
if (this.payPrice == 0) { |
|
|
|
|
if (this.paytheprice == 0) { |
|
|
|
|
this.isUse = false; |
|
|
|
|
this.paytype = ''; |
|
|
|
|
} else { |
|
|
|
|