diff --git a/pages/pay/index.vue b/pages/pay/index.vue index 5963fc3..6f80569 100644 --- a/pages/pay/index.vue +++ b/pages/pay/index.vue @@ -30,10 +30,10 @@ - + {{ '钱包支付' }} @@ -169,7 +169,7 @@ - + {{ '在线支付' }} @@ -183,7 +183,12 @@ {{ '宝付微信支付' }} - + @@ -196,7 +201,12 @@ {{ '宝付微信扫码' }} - + @@ -209,7 +219,12 @@ {{ '汇付微信支付' }} - + @@ -223,7 +238,12 @@ {{ '微信支付' }} - + @@ -234,7 +254,12 @@ {{ '支付宝支付' }} - + @@ -263,7 +288,7 @@ activeColor="red" size="14" label="" - :name="'hf' + index" + :name="PAY_TYPE.HUI_FU_BANK_CARD + index" > @@ -283,7 +308,12 @@ 通联微信支付 - + @@ -310,7 +340,7 @@ activeColor="red" size="14" label="" - :name="'jd' + index" + :name="PAY_TYPE.JING_DONG_BANK_CARD + index" > @@ -362,7 +392,7 @@ activeColor="red" size="14" label="" - :name="'tl' + index" + :name="PAY_TYPE.TONG_LIAN_BANK_CARD + index" > @@ -1136,30 +1166,11 @@ export default { }) } } else { - if (cz) { - //充值 - api - .preCharge({ - rechargeAmount: this.czJe, - }) - .then(res => { - this.paramsPost = res.data - this.orderCode = res.orderCode - if (this.whatPay == 12) { - this.scanPayBfWx(5) - } else if (this.whatPay == 13) { - this.scanPayBfWx(6) - } - }) - this.isBank = '' - this.isPw = true - } else { - api.generate().then(res => { - uni.setStorageSync('mToken', res.msg) - }) - this.isBank = '' - this.isPw = true - } + api.generate().then(res => { + uni.setStorageSync('mToken', res.msg) + }) + this.isBank = '' + this.isPw = true } }, scanPayBfWx(val) { @@ -1221,25 +1232,19 @@ export default { businessCode: this.orderCode, extParam: extParamBase64, } - } else { - params = { - businessType: this.businessType, //订单类型充值 - businessCode: this.orderCode, - payChannel: val, - payType: 2, - appletFlag: 0, - } - } - api.unifiedorder(params).then(res => { - let url = - 'https://clooud1-5g23d3je04dda65b-1326540601.tcloudbaseapp.com/jump_mp.html?sign=20f03b022bc39e837056bdbe475632c8&t=1715569339&state=' + - res.data + - '&payment=0' - // https://clooud1-5g23d3je04dda65b-1326540601.tcloudbaseapp.com/jump_mp.html?sign=812bf9ab54292b1fb7161a3a6f7fa0f6&t=1715570889&state=' + - // res.data + '&payment=0' - window.open(url) + api.unifiedorder(params).then(res => { + if (res.code === 200) { + resolve(res.data) + this.checkPayStatus(params) + } else { + uni.showToast({ + title: res.msg, + icon: 'none', + }) + reject(res.msg) + } + }) }) - this.checkPayStatus(params) }, drawQrcode(text) { let that = this