@uxda/appkit 4.2.60 → 4.2.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -1714,6 +1714,11 @@ const services$1 = [
|
|
|
1714
1714
|
invokeRecharge$1
|
|
1715
1715
|
];
|
|
1716
1716
|
|
|
1717
|
+
function isWechat() {
|
|
1718
|
+
let ua = window.navigator.userAgent.toLowerCase();
|
|
1719
|
+
return ua.includes("micromessenger");
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1717
1722
|
const _hoisted_1$y = { class: "view recharge-view" };
|
|
1718
1723
|
const _hoisted_2$o = { class: "flex-grow" };
|
|
1719
1724
|
const _hoisted_3$i = { class: "amount-footer" };
|
|
@@ -1763,6 +1768,14 @@ var script$B = /* @__PURE__ */ defineComponent({
|
|
|
1763
1768
|
}
|
|
1764
1769
|
state.buttonLoading = true;
|
|
1765
1770
|
if (Taro.getEnv() === "WEB") {
|
|
1771
|
+
if (!isWechat()) {
|
|
1772
|
+
showToast({
|
|
1773
|
+
title: "\u8BF7\u4F7F\u7528\u5FAE\u4FE1\u6D4F\u89C8\u5668\u6253\u5F00",
|
|
1774
|
+
icon: "none"
|
|
1775
|
+
});
|
|
1776
|
+
state.buttonLoading = false;
|
|
1777
|
+
return false;
|
|
1778
|
+
}
|
|
1766
1779
|
requestBrandWCPay({
|
|
1767
1780
|
amount: amounts.value[state.selected].amount,
|
|
1768
1781
|
app: "loankitMp",
|
|
@@ -1771,7 +1784,7 @@ var script$B = /* @__PURE__ */ defineComponent({
|
|
|
1771
1784
|
channelCode: "centergzh",
|
|
1772
1785
|
payFinishJumpUrl: props.payFinishJumpUrl
|
|
1773
1786
|
}).then((result) => {
|
|
1774
|
-
|
|
1787
|
+
state.buttonLoading = false;
|
|
1775
1788
|
window.location.href = props.payFinishJumpUrl;
|
|
1776
1789
|
});
|
|
1777
1790
|
} else {
|
|
@@ -2130,6 +2143,14 @@ var script$x = /* @__PURE__ */ defineComponent({
|
|
|
2130
2143
|
}
|
|
2131
2144
|
state.buttonLoading = true;
|
|
2132
2145
|
if (Taro.getEnv() === "WEB") {
|
|
2146
|
+
if (!isWechat()) {
|
|
2147
|
+
showToast({
|
|
2148
|
+
title: "\u8BF7\u4F7F\u7528\u5FAE\u4FE1\u6D4F\u89C8\u5668\u6253\u5F00",
|
|
2149
|
+
icon: "none"
|
|
2150
|
+
});
|
|
2151
|
+
state.buttonLoading = false;
|
|
2152
|
+
return false;
|
|
2153
|
+
}
|
|
2133
2154
|
requestBrandWCPayByBean({
|
|
2134
2155
|
caseConfigId: amounts.value[state.selected].id,
|
|
2135
2156
|
amount: amounts.value[state.selected].paymentAmount,
|
|
@@ -2139,7 +2160,7 @@ var script$x = /* @__PURE__ */ defineComponent({
|
|
|
2139
2160
|
channelCode: "centergzh",
|
|
2140
2161
|
payFinishJumpUrl: props.payFinishJumpUrl
|
|
2141
2162
|
}).then((result) => {
|
|
2142
|
-
|
|
2163
|
+
state.buttonLoading = false;
|
|
2143
2164
|
window.location.href = props.payFinishJumpUrl;
|
|
2144
2165
|
});
|
|
2145
2166
|
} else {
|
package/package.json
CHANGED
|
@@ -20,6 +20,7 @@ import AmountPicker from './AmountPicker.vue'
|
|
|
20
20
|
import { useHttp, endpoints } from '../api'
|
|
21
21
|
import { requestBrandWCPay, requestPayment } from '../services'
|
|
22
22
|
import Taro, { showToast } from '@tarojs/taro'
|
|
23
|
+
import { isWechat } from '../../shared/composables/useDeviceEnv'
|
|
23
24
|
|
|
24
25
|
// 充值用户界面
|
|
25
26
|
// 配置了必须的属性后
|
|
@@ -93,6 +94,14 @@ const onPayClick = () => {
|
|
|
93
94
|
state.buttonLoading = true
|
|
94
95
|
|
|
95
96
|
if (Taro.getEnv() === 'WEB') {
|
|
97
|
+
if (!isWechat()) {
|
|
98
|
+
showToast({
|
|
99
|
+
title: '请使用微信浏览器打开',
|
|
100
|
+
icon: 'none',
|
|
101
|
+
})
|
|
102
|
+
state.buttonLoading = false
|
|
103
|
+
return false
|
|
104
|
+
}
|
|
96
105
|
requestBrandWCPay({
|
|
97
106
|
amount: amounts.value[state.selected].amount,
|
|
98
107
|
app: 'loankitMp',
|
|
@@ -101,7 +110,7 @@ const onPayClick = () => {
|
|
|
101
110
|
channelCode: 'centergzh',
|
|
102
111
|
payFinishJumpUrl: props.payFinishJumpUrl
|
|
103
112
|
}).then(result => {
|
|
104
|
-
|
|
113
|
+
state.buttonLoading = false
|
|
105
114
|
window.location.href = props.payFinishJumpUrl as string
|
|
106
115
|
})
|
|
107
116
|
} else {
|
|
@@ -53,6 +53,7 @@ import { endpoints, useHttp } from '../api'
|
|
|
53
53
|
import { requestBrandWCPayByBean, requestPaymentByBean } from '../services'
|
|
54
54
|
import Taro, { showToast } from '@tarojs/taro'
|
|
55
55
|
import { useAmount } from '../../shared/composables/useAmount'
|
|
56
|
+
import { isWechat } from '../../shared/composables/useDeviceEnv'
|
|
56
57
|
|
|
57
58
|
// 充值用户界面
|
|
58
59
|
// 配置了必须的属性后
|
|
@@ -163,6 +164,14 @@ const onPayClick = () => {
|
|
|
163
164
|
state.buttonLoading = true
|
|
164
165
|
|
|
165
166
|
if (Taro.getEnv() === 'WEB') {
|
|
167
|
+
if (!isWechat()) {
|
|
168
|
+
showToast({
|
|
169
|
+
title: '请使用微信浏览器打开',
|
|
170
|
+
icon: 'none',
|
|
171
|
+
})
|
|
172
|
+
state.buttonLoading = false
|
|
173
|
+
return false
|
|
174
|
+
}
|
|
166
175
|
requestBrandWCPayByBean({
|
|
167
176
|
caseConfigId: amounts.value[state.selected].id,
|
|
168
177
|
amount: amounts.value[state.selected].paymentAmount,
|
|
@@ -172,7 +181,7 @@ const onPayClick = () => {
|
|
|
172
181
|
channelCode: 'centergzh',
|
|
173
182
|
payFinishJumpUrl: props.payFinishJumpUrl
|
|
174
183
|
}).then(result => {
|
|
175
|
-
|
|
184
|
+
state.buttonLoading = false
|
|
176
185
|
window.location.href = props.payFinishJumpUrl as string
|
|
177
186
|
})
|
|
178
187
|
} else {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// 是否微信环境
|
|
2
|
+
export function isWechat() {
|
|
3
|
+
let ua = window.navigator.userAgent.toLowerCase()
|
|
4
|
+
return ua.includes('micromessenger')
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
// 是否支付宝环境
|
|
8
|
+
export function isAlipay() {
|
|
9
|
+
let ua = window.navigator.userAgent.toLowerCase()
|
|
10
|
+
return ua.includes('alipayclient')
|
|
11
|
+
}
|