新增APP适配

This commit is contained in:
gyq
2025-09-18 18:13:56 +08:00
parent 71800cf9dc
commit 2bd6f25498
9 changed files with 73 additions and 69 deletions

View File

@@ -338,7 +338,7 @@
// 从一开始就判断支付方式,如果是无忧支付直接进入支付状态判断页面
console.log('payment===', payment);
if (payment.payment == 'IEPayPoli') {
if (payment.payment == 'IEPayPoli' || payment == 'Alipay') {
console.log('直接进入无忧支付,开始跳转');
uni.setStorageSync('wuyouPay', '');
uni.redirectTo({
@@ -354,7 +354,7 @@
payment_id: payment_id || this.payment_id,
};
// h5自定义重定向地址
// #ifdef H5
// #ifdef H5 || APP
var redirect_url = app.globalData.page_url_protocol(this.propToAppointPage || app.globalData.get_page_url(false));
post_data['redirect_url'] = encodeURIComponent(base64.encode(redirect_url));
// 存在支付标识、指定支付方式使用respond_url返回地址、移除重定向地址
@@ -403,8 +403,10 @@
switch (payment_type) {
// 正常线上支付
case 0:
console.log('111');
// #ifdef APP
this.app_pay_handle(this, data, order_id);
// this.app_pay_handle(this, data, order_id);
this.h5_pay_handle(this, data, order_id);
// #endif
// #ifdef MP-TOUTIAO
// 头条是否非普通版本支持
@@ -429,27 +431,32 @@
break;
// 线下支付
case 1:
console.log('222');
this.h5_pay_handle(this, data, order_id);
// 现金支付
let self = this;
uni.showModal({
content: res.data.msg,
showCancel: false,
confirmText: self.$t('common.confirm'),
success(res) {
if (res.confirm) {
self.to_other(order_id);
} else {
self.order_item_pay_fail_handle(data, order_id, self.$t('paytips.paytips.6mpsl7'));
}
},
});
// let self = this;
// uni.showModal({
// content: res.data.msg,
// showCancel: false,
// confirmText: self.$t('common.confirm'),
// success(res) {
// if (res.confirm) {
// self.to_other(order_id);
// } else {
// self.order_item_pay_fail_handle(data, order_id, self.$t('paytips.paytips.6mpsl7'));
// }
// },
// });
break;
// 钱包支付
case 2:
console.log('333');
this.order_item_pay_success_handle(data, order_id);
break;
// 默认
default:
console.log('444');
app.globalData.showToast(this.$t('payment.payment.vhx5dv'));
}
}
@@ -686,6 +693,7 @@
},
// h5支付处理
h5_pay_handle(self, data, order_id) {
console.log('111111111111111111111111');
console.log('h5_pay_handle===', order_id);
// 字符串则为跳转地址直接进入
if (typeof data.data == 'string') {
@@ -750,7 +758,7 @@
}
// 无忧支付
if (data.payment.payment == 'IEPayPoli') {
if (data.payment.payment == 'IEPayPoli' || data.payment.payment == 'Alipay') {
console.log('无忧支付order_id===', order_id);
console.log('无忧支付===', data);
uni.setStorageSync('wuyouPay', '');