新增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

@@ -10,7 +10,7 @@
</template>
<script>
import base64 from '../../common/js/lib/base64';
import base64 from '@/common/js/lib/base64';
const app = getApp();
export default {
@@ -33,7 +33,9 @@
};
},
onLoad(e) {
// #ifdef H5
window.addEventListener('popstate', this.onPageBack);
// #endif
console.log('wu_you_status.onLoad===', e);
this.pay_url = e;
let wuyou = uni.getStorageSync('wuyouPay');
@@ -79,7 +81,9 @@
data: {
ids: this.pay_url.order_id,
payment_id: this.pay_url.payment_id,
// #ifdef H5
redirect_url: this.encodeAlipayCallbackUrl(window.location.href),
// #endif
},
dataType: 'json',
success: (res) => {
@@ -91,7 +95,13 @@
let wuyou2 = uni.getStorageSync('wuyouPay');
wuyou2.check = true;
uni.setStorageSync('wuyouPay', wuyou2);
// #ifdef H5
window.location.href = data.data.data.h5_url;
// #endif
// #ifdef APP
plus.runtime.openURL(data.data.data.h5_url);
// #endif
} else {
uni.showToast({
title: msg.msg,