@uxda/appkit 4.2.89 → 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
@@ -6240,7 +6246,7 @@ var script$e = /* @__PURE__ */ defineComponent({
6240
6246
  }
6241
6247
  async function readAll() {
6242
6248
  try {
6243
- Taro.showLoading({
6249
+ showLoading({
6244
6250
  title: "\u8BF7\u7A0D\u540E..."
6245
6251
  });
6246
6252
  const appkitOptions = useAppKitOptions();
@@ -6256,7 +6262,7 @@ var script$e = /* @__PURE__ */ defineComponent({
6256
6262
  });
6257
6263
  });
6258
6264
  } finally {
6259
- Taro.hideLoading();
6265
+ hideLoading();
6260
6266
  }
6261
6267
  }
6262
6268
  const emits = __emit;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxda/appkit",
3
- "version": "4.2.89",
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
@@ -51,7 +51,7 @@
51
51
 
52
52
  <script setup lang="ts">
53
53
  import { useDidShow } from '@tarojs/taro'
54
- import Taro from '@tarojs/taro'
54
+ import { showLoading, hideLoading } from '@tarojs/taro'
55
55
  import { type WithPaging, usePaging } from '@uxda/nutshell/taro'
56
56
  import { useHttp, endpoints } from '../api'
57
57
  import { reactive, ref } from 'vue'
@@ -161,7 +161,7 @@ function read(item: any) {
161
161
 
162
162
  async function readAll() {
163
163
  try {
164
- Taro.showLoading({
164
+ showLoading({
165
165
  title: '请稍后...',
166
166
  })
167
167
 
@@ -178,7 +178,7 @@ async function readAll() {
178
178
  })
179
179
  })
180
180
  } finally {
181
- Taro.hideLoading()
181
+ hideLoading()
182
182
  }
183
183
  }
184
184
 
@@ -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
+ }