jsapi支付

msb_prod
ch 2 years ago
parent 661aaa874a
commit c872c15ef3

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-07-08 11:46:30
* @LastEditors: ch
* @LastEditTime: 2022-07-12 11:37:13
* @LastEditTime: 2022-07-12 14:29:22
* @Description: file content
-->
<template>
@ -80,7 +80,7 @@ const ENV = process.env;
* 微信APP内部点击支付
*/
async wxJsapiPay(){
const {result} = await this.getOrderInfo('WX_JSAPI');
const {result} = await this.getPayData('WX_JSAPI');
if(result){
const par = result.payDataInfo;
WeixinJSBridge.invoke('getBrandWCPayRequest', {
@ -107,14 +107,14 @@ const ENV = process.env;
* h5唤起微信支付
*/
async wxH5Pay(){
const {error, result} = await this.getOrderInfo('WX_H5');
const {error, result} = await this.getPayData('WX_H5');
if(result){
// h5windowAPI
window.location.replace(data.payDataInfo.h5Url);
}
},
async aliPay(){
const {error, result} = await this.getOrderInfo('ALI_WAP');
const {error, result} = await this.getPayData('ALI_WAP');
if(result){
// h5windowAPI
window.location.replace(data.payDataInfo.payUrl);
@ -129,6 +129,7 @@ const ENV = process.env;
if(error){
uni._$toast(error.message);
}
return {error, result};
}
}

Loading…
Cancel
Save