|
@@ -161,7 +161,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
async fetch() {
|
|
|
- if (this.$userAgent.isAndroid) {
|
|
|
+ if (this.$userAgent.isSzx && this.$userAgent.isAndroid) {
|
|
|
this.token = await window.native.getToken();
|
|
|
} else {
|
|
|
this.token = this.$route.query.token;
|
|
@@ -201,9 +201,9 @@ export default {
|
|
|
taocan = this.sort_ASCII(taocan);
|
|
|
const sign = this.jiaqian(JSON.stringify(taocan));
|
|
|
const res = await this.$axios.$post('/pay/v1/order/create', taocan, { headers: { Authorization: this.token, sign } });
|
|
|
- if (this.$userAgent.isAndroid) {
|
|
|
+ if (this.$userAgent.isSzx && this.$userAgent.isAndroid) {
|
|
|
window.native.startPay(this.payType === 'aliPay' ? 3 : 2, res.data.myOrderNum, 1);
|
|
|
- } else if (this.$userAgent.isIos) {
|
|
|
+ } else if (this.$userAgent.isSzx && this.$userAgent.isIos) {
|
|
|
window.webkit.messageHandlers.startPay.postMessage({
|
|
|
payType: this.payType === 'aliPay' ? 3 : 2,
|
|
|
orderNum: res.data.myOrderNum,
|