|
|
@ -185,11 +185,11 @@ |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import { |
|
|
|
import { |
|
|
|
addOrderPay, |
|
|
|
create, |
|
|
|
orderToPayByWx, |
|
|
|
wechatPay, |
|
|
|
findUser, |
|
|
|
findUser, |
|
|
|
orderToGoldPayunion, |
|
|
|
orderToGoldPayunion, |
|
|
|
hltUnionCardPayghk, |
|
|
|
cardPay, |
|
|
|
getHuiLianTongCardBalance, |
|
|
|
getHuiLianTongCardBalance, |
|
|
|
loginByPhone, |
|
|
|
loginByPhone, |
|
|
|
getUserOrderPreList, |
|
|
|
getUserOrderPreList, |
|
|
@ -515,22 +515,27 @@ |
|
|
|
title: '提交订单中...' |
|
|
|
title: '提交订单中...' |
|
|
|
}) |
|
|
|
}) |
|
|
|
let params = { |
|
|
|
let params = { |
|
|
|
"memDiscountId": that.memDiscountId, |
|
|
|
"childOrderList": [{ |
|
|
|
"rechargeContent": that.rechargeContent, |
|
|
|
|
|
|
|
"goodsId": that.objectId, |
|
|
|
"goodsId": that.objectId, |
|
|
|
"integralNum": that.priceValue[1], |
|
|
|
"goodsType": 6, |
|
|
|
"password": '' |
|
|
|
"rechargeContent": that.rechargeContent, |
|
|
|
|
|
|
|
"saleCount": 1 |
|
|
|
|
|
|
|
}], |
|
|
|
|
|
|
|
"payGold": that.priceValue[1], |
|
|
|
|
|
|
|
"companyId": app.globalData.companyId, |
|
|
|
|
|
|
|
"memDiscountId": that.memDiscountId, |
|
|
|
|
|
|
|
"payPwd": "" |
|
|
|
} |
|
|
|
} |
|
|
|
addOrderPay(params).then(res => { |
|
|
|
create(params).then(res => { |
|
|
|
if (res.return_code == '000000') { |
|
|
|
if (res.return_code == '000000') { |
|
|
|
uni.hideLoading(); |
|
|
|
uni.hideLoading(); |
|
|
|
that.orderId = res.return_data.id; |
|
|
|
that.orderId = res.return_data.orderNo; |
|
|
|
let params = { |
|
|
|
let params = { |
|
|
|
"orderId": res.return_data.id, |
|
|
|
"orderId": res.return_data.id, |
|
|
|
"openId": app.globalData.openId, |
|
|
|
"openId": app.globalData.openId, |
|
|
|
"openIdType": 2 |
|
|
|
"openIdType": 2 |
|
|
|
} |
|
|
|
} |
|
|
|
that.orderToPayByWx(params); |
|
|
|
that.wechatPay(params); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
uni.hideLoading(); |
|
|
|
uni.hideLoading(); |
|
|
|
uni.showToast({ |
|
|
|
uni.showToast({ |
|
|
@ -549,21 +554,37 @@ |
|
|
|
title: '提交订单中...' |
|
|
|
title: '提交订单中...' |
|
|
|
}) |
|
|
|
}) |
|
|
|
let params = { |
|
|
|
let params = { |
|
|
|
"memDiscountId": that.memDiscountId, |
|
|
|
"childOrderList": [{ |
|
|
|
"rechargeContent": that.rechargeContent, |
|
|
|
|
|
|
|
"goodsId": that.objectId, |
|
|
|
"goodsId": that.objectId, |
|
|
|
"integralNum": that.priceValue[1], |
|
|
|
"goodsType": 6, |
|
|
|
"password": '' |
|
|
|
"rechargeContent": that.rechargeContent, |
|
|
|
|
|
|
|
"saleCount": 1 |
|
|
|
|
|
|
|
}], |
|
|
|
|
|
|
|
"payGold": that.priceValue[1], |
|
|
|
|
|
|
|
"companyId": app.globalData.companyId, |
|
|
|
|
|
|
|
"memDiscountId": that.memDiscountId, |
|
|
|
|
|
|
|
"payPwd": "" |
|
|
|
} |
|
|
|
} |
|
|
|
addOrderPay(params).then(res => { |
|
|
|
|
|
|
|
|
|
|
|
create(params).then(res => { |
|
|
|
if (res.return_code == '000000') { |
|
|
|
if (res.return_code == '000000') { |
|
|
|
uni.hideLoading(); |
|
|
|
uni.hideLoading(); |
|
|
|
that.orderId = res.return_data.id; |
|
|
|
that.orderId = res.return_data.orderNo; |
|
|
|
|
|
|
|
// #ifdef H5 |
|
|
|
let params = { |
|
|
|
let params = { |
|
|
|
"orderId": res.return_data.id, |
|
|
|
"orderNo": res.return_data.orderNo, |
|
|
|
"openId": app.globalData.openId |
|
|
|
"openId": app.globalData.openId, |
|
|
|
|
|
|
|
"openIdType": 2 |
|
|
|
} |
|
|
|
} |
|
|
|
that.orderToPayByWx(params); |
|
|
|
// #endif |
|
|
|
|
|
|
|
// #ifdef MP |
|
|
|
|
|
|
|
let params = { |
|
|
|
|
|
|
|
"orderNo": res.return_data.orderNo, |
|
|
|
|
|
|
|
"openId": app.globalData.openId, |
|
|
|
|
|
|
|
"openIdType": 1 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// #endif |
|
|
|
|
|
|
|
that.wechatPay(params); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
uni.hideLoading(); |
|
|
|
uni.hideLoading(); |
|
|
|
uni.showToast({ |
|
|
|
uni.showToast({ |
|
|
@ -601,10 +622,10 @@ |
|
|
|
this.$refs.popup.show(); |
|
|
|
this.$refs.popup.show(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
//获取订单数据 |
|
|
|
//获取订单数据 |
|
|
|
orderToPayByWx(item) { |
|
|
|
wechatPay(item) { |
|
|
|
let that = this; |
|
|
|
let that = this; |
|
|
|
if (that.paytype == '2') { |
|
|
|
if (that.paytype == '2') { |
|
|
|
orderToPayByWx(item).then(res => { |
|
|
|
wechatPay(item).then(res => { |
|
|
|
if (res.return_code == '000000') { |
|
|
|
if (res.return_code == '000000') { |
|
|
|
// #ifdef MP |
|
|
|
// #ifdef MP |
|
|
|
uni.showLoading({ |
|
|
|
uni.showLoading({ |
|
|
@ -702,16 +723,21 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.payPrice == 0) { |
|
|
|
if (this.payPrice == 0) { |
|
|
|
let params = { |
|
|
|
let params = { |
|
|
|
"memDiscountId": this.memDiscountId, |
|
|
|
"childOrderList": [{ |
|
|
|
"rechargeContent": this.rechargeContent, |
|
|
|
|
|
|
|
"goodsId": this.objectId, |
|
|
|
"goodsId": this.objectId, |
|
|
|
"integralNum": this.priceValue[1], |
|
|
|
"goodsType": 6, |
|
|
|
"password": this.PaymentPassword |
|
|
|
"rechargeContent": this.rechargeContent, |
|
|
|
|
|
|
|
"saleCount": 1 |
|
|
|
|
|
|
|
}], |
|
|
|
|
|
|
|
"payGold": this.priceValue[1], |
|
|
|
|
|
|
|
"companyId": app.globalData.companyId, |
|
|
|
|
|
|
|
"memDiscountId": this.memDiscountId, |
|
|
|
|
|
|
|
"payPwd": this.PaymentPassword |
|
|
|
} |
|
|
|
} |
|
|
|
addOrderPay(params).then(res => { |
|
|
|
create(params).then(res => { |
|
|
|
uni.hideLoading(); |
|
|
|
uni.hideLoading(); |
|
|
|
if (res.return_code == '000000') { |
|
|
|
if (res.return_code == '000000') { |
|
|
|
this.orderId = res.return_data.id; |
|
|
|
this.orderId = res.return_data.orderNo; |
|
|
|
uni.reLaunch({ |
|
|
|
uni.reLaunch({ |
|
|
|
url: '../Phone-recharge-details/Phone-recharge-details?id=' + |
|
|
|
url: '../Phone-recharge-details/Phone-recharge-details?id=' + |
|
|
|
this.orderId |
|
|
|
this.orderId |
|
|
@ -733,11 +759,11 @@ |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
let params = { |
|
|
|
let params = { |
|
|
|
"orderId": this.orderId, |
|
|
|
"orderNo": this.orderId, |
|
|
|
"cardNo": this.user.hltCardNo.cardNo, |
|
|
|
"cardNo": this.user.hltCardNo.cardNo, |
|
|
|
"password": this.PaymentPassword |
|
|
|
"password": this.PaymentPassword |
|
|
|
} |
|
|
|
} |
|
|
|
hltUnionCardPayghk(params).then(res => { |
|
|
|
cardPay(params).then(res => { |
|
|
|
uni.hideLoading(); |
|
|
|
uni.hideLoading(); |
|
|
|
if (res.return_code == '000000') { |
|
|
|
if (res.return_code == '000000') { |
|
|
|
uni.showToast({ |
|
|
|
uni.showToast({ |
|
|
|