|
|
|
@ -182,7 +182,7 @@ |
|
|
|
|
agentKey: '', |
|
|
|
|
objectId: '', |
|
|
|
|
OrderPreList: [], |
|
|
|
|
reType:'' //充值类型 |
|
|
|
|
reType: '' //充值类型 |
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
@ -194,7 +194,7 @@ |
|
|
|
|
this.rechargeModel = options.rechargeModel; |
|
|
|
|
this.agentKey = options.agentKey; |
|
|
|
|
this.objectId = options.objectId; |
|
|
|
|
this.reType = options.rechargeType; |
|
|
|
|
this.reType = options.rechargeType; |
|
|
|
|
}, |
|
|
|
|
onShow() { |
|
|
|
|
let that = this; |
|
|
|
@ -269,7 +269,7 @@ |
|
|
|
|
if (item.discountType == 1) { |
|
|
|
|
//满减价格 |
|
|
|
|
this.deductionPrice = item.discountPrice; |
|
|
|
|
this.payPrice = this.paytheprice- this.deductionPrice; |
|
|
|
|
this.payPrice = this.paytheprice - this.deductionPrice; |
|
|
|
|
|
|
|
|
|
} else if (item.discountType == 2) { |
|
|
|
|
//抵扣价格 |
|
|
|
@ -320,7 +320,8 @@ |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
toPay() { |
|
|
|
|
if (this.paytype == '') { |
|
|
|
|
let that = this; |
|
|
|
|
if (that.paytype == '') { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '请选择支付方式', |
|
|
|
|
icon: 'none', |
|
|
|
@ -328,36 +329,42 @@ |
|
|
|
|
}) |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
uni.showLoading({ |
|
|
|
|
title: '提交订单中...' |
|
|
|
|
}) |
|
|
|
|
let params = { |
|
|
|
|
"memDiscountId": this.memDiscountId, |
|
|
|
|
"orderPrice": this.orderPrice, |
|
|
|
|
"payPrice": this.payPrice, |
|
|
|
|
"rechargeContent": this.rechargeContent, |
|
|
|
|
"rechargeModel": this.rechargeModel, |
|
|
|
|
"agentKey": this.agentKey, |
|
|
|
|
"objectId": this.objectId, |
|
|
|
|
"identificationCode": app.globalData.identificationCode |
|
|
|
|
} |
|
|
|
|
addOrderPay(params).then(res => { |
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
this.orderId = res.return_data.id; |
|
|
|
|
uni.requestSubscribeMessage({ |
|
|
|
|
tmplIds: ['ZO6kC3oJv0zj9QzL0htsF-mM9vAElcgPZEcUGglxsoU'], |
|
|
|
|
success(res) { |
|
|
|
|
uni.showLoading({ |
|
|
|
|
title: '提交订单中...' |
|
|
|
|
}) |
|
|
|
|
let params = { |
|
|
|
|
"orderId": res.return_data.id, |
|
|
|
|
"openId": app.globalData.openId |
|
|
|
|
"memDiscountId": that.memDiscountId, |
|
|
|
|
"orderPrice": that.orderPrice, |
|
|
|
|
"payPrice": that.payPrice, |
|
|
|
|
"rechargeContent": that.rechargeContent, |
|
|
|
|
"rechargeModel": that.rechargeModel, |
|
|
|
|
"agentKey": that.agentKey, |
|
|
|
|
"objectId": that.objectId, |
|
|
|
|
"identificationCode": app.globalData.identificationCode |
|
|
|
|
} |
|
|
|
|
this.orderToUNionPay(params); |
|
|
|
|
} else { |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: res.return_msg, |
|
|
|
|
icon: 'none', |
|
|
|
|
duration: 2000 |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
addOrderPay(params).then(res => { |
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
that.orderId = res.return_data.id; |
|
|
|
|
let params = { |
|
|
|
|
"orderId": res.return_data.id, |
|
|
|
|
"openId": app.globalData.openId |
|
|
|
|
} |
|
|
|
|
that.orderToUNionPay(params); |
|
|
|
|
} else { |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: res.return_msg, |
|
|
|
|
icon: 'none', |
|
|
|
|
duration: 2000 |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
fail(res) {}, |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
//获取选择支付方式 |
|
|
|
@ -563,7 +570,7 @@ |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: res.return_msg, |
|
|
|
|
icon: 'none', |
|
|
|
|
duration:2000 |
|
|
|
|
duration: 2000 |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|