@uxda/appkit 4.2.90 → 4.2.91

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
@@ -1822,6 +1822,12 @@ function isWechat() {
1822
1822
  let ua = window.navigator.userAgent.toLowerCase();
1823
1823
  return ua.includes("micromessenger");
1824
1824
  }
1825
+ const isIOS = () => {
1826
+ if (typeof window !== "undefined") {
1827
+ return /iPhone|iPad|iPod/i.test(window.navigator.userAgent);
1828
+ }
1829
+ return false;
1830
+ };
1825
1831
 
1826
1832
  const _hoisted_1$B = { class: "view recharge-view" };
1827
1833
  const _hoisted_2$r = { class: "flex-grow" };
@@ -3412,7 +3418,7 @@ var script$t = /* @__PURE__ */ defineComponent({
3412
3418
  1
3413
3419
  /* TEXT */
3414
3420
  ),
3415
- !isAppEnv.value ? withDirectives((openBlock(), createElementBlock("div", {
3421
+ !isAppEnv.value || isAppEnv.value && !unref(isIOS)() ? withDirectives((openBlock(), createElementBlock("div", {
3416
3422
  key: 0,
3417
3423
  class: "pay",
3418
3424
  onClick: gotoRecharge
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxda/appkit",
3
- "version": "4.2.90",
3
+ "version": "4.2.91",
4
4
  "description": "小程序应用开发包",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.ts",
@@ -18,7 +18,7 @@
18
18
  </div>
19
19
  <div class="bean-counts spa-between">
20
20
  <div class="counts number">{{ formatAmount(balance.total || 0) }}</div>
21
- <div v-if="!isAppEnv" class="pay" v-track-click="'click'" @click="gotoRecharge">云豆充值</div>
21
+ <div v-if="!isAppEnv || (isAppEnv && !isIOS())" class="pay" v-track-click="'click'" @click="gotoRecharge">云豆充值</div>
22
22
  </div>
23
23
  </div>
24
24
  <Tip />
@@ -149,6 +149,7 @@ import groupBy from 'lodash-es/groupBy'
149
149
  import { useAmount } from '../../shared/composables/useAmount'
150
150
  import { ScrollView } from '@tarojs/components'
151
151
  import { isApp } from '../../utils/utils'
152
+ import { isIOS } from '../../shared/composables/useDeviceEnv'
152
153
 
153
154
  type AccountViewProps = {
154
155
  app: string
@@ -9,3 +9,19 @@ export function isAlipay() {
9
9
  let ua = window.navigator.userAgent.toLowerCase()
10
10
  return ua.includes('alipayclient')
11
11
  }
12
+
13
+ // 判断是否为 iOS 设备
14
+ export const isIOS = () => {
15
+ if (typeof window !== 'undefined') {
16
+ return /iPhone|iPad|iPod/i.test(window.navigator.userAgent)
17
+ }
18
+ return false
19
+ }
20
+
21
+ // 判断是否为 Android 设备
22
+ export const isAndroid = () => {
23
+ if (typeof window !== 'undefined') {
24
+ return /Android/i.test(window.navigator.userAgent)
25
+ }
26
+ return false
27
+ }
@@ -30,4 +30,4 @@ export function generateUniqueId(pre?: string, delimiter = '-') {
30
30
  // 是否是App环境
31
31
  export function isApp() {
32
32
  return dsBridge.hasNativeMethod('openWebPage')
33
- }
33
+ }