@uxda/appkit 4.2.84 → 4.2.86

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/appkit.css CHANGED
@@ -2701,8 +2701,6 @@ page {
2701
2701
  --nut-primary-color: #017fff;
2702
2702
  position: absolute;
2703
2703
  top: -36px;
2704
- left: 50%;
2705
- transform: translateX(-50%);
2706
2704
  white-space: nowrap;
2707
2705
  display: flex;
2708
2706
  align-items: center;
package/dist/index.js CHANGED
@@ -16,6 +16,7 @@ import '@nutui/nutui-taro/dist/packages/datepicker/style/css';
16
16
  import dayjs from 'dayjs';
17
17
  import groupBy from 'lodash-es/groupBy';
18
18
  import { ScrollView, Swiper, SwiperItem } from '@tarojs/components';
19
+ import dsBridge from 'dsbridge';
19
20
  import { IconFont } from '@nutui/icons-vue-taro';
20
21
  import '@nutui/nutui-taro/dist/packages/form/style/css';
21
22
  import '@nutui/nutui-taro/dist/packages/formitem/style/css';
@@ -109,7 +110,7 @@ const getSdkConfig = (appCode, url) => {
109
110
  return new Promise((resolve, reject) => {
110
111
  const $http = useHttp$2();
111
112
  $http.get("/wecom/config/getConfig", {
112
- appCode: appCode || "cloudkitProMp",
113
+ appCode: appCode || "loankitMp",
113
114
  callbackUrl: url || encodeURIComponent(location.href.split("#")[0])
114
115
  }).then((response) => {
115
116
  resolve(response);
@@ -1849,7 +1850,7 @@ var script$E = /* @__PURE__ */ defineComponent({
1849
1850
  }
1850
1851
  requestBrandWCPay({
1851
1852
  amount: amounts.value[state.selected].amount,
1852
- app: "cloudkitProMp",
1853
+ app: "loankitMp",
1853
1854
  tenant: props.tenant,
1854
1855
  accountAuthFlag: false,
1855
1856
  channelCode: "centergzh",
@@ -2248,7 +2249,7 @@ var script$A = /* @__PURE__ */ defineComponent({
2248
2249
  requestBrandWCPayByBean({
2249
2250
  caseConfigId: amounts.value[state.selected].id,
2250
2251
  amount: amounts.value[state.selected].paymentAmount,
2251
- app: "cloudkitProMp",
2252
+ app: "loankitMp",
2252
2253
  tenant: props.tenant,
2253
2254
  accountAuthFlag: false,
2254
2255
  channelCode: "centergzh",
@@ -2988,6 +2989,24 @@ var script$u = /* @__PURE__ */ defineComponent({
2988
2989
 
2989
2990
  script$u.__file = "src/balance/components/Tip.vue";
2990
2991
 
2992
+ function dataURItoBlob(dataURI) {
2993
+ const byteString = atob(dataURI.split(",")[1]);
2994
+ const mimeString = dataURI.split(",")[0].split(":")[1].split(";")[0];
2995
+ const ab = new ArrayBuffer(byteString.length);
2996
+ const ia = new Uint8Array(ab);
2997
+ for (let i = 0; i < byteString.length; i++) {
2998
+ ia[i] = byteString.charCodeAt(i);
2999
+ }
3000
+ return new Blob([ab], { type: mimeString });
3001
+ }
3002
+ function isWeb() {
3003
+ const env = process.env.TARO_ENV || "";
3004
+ return env === "h5" || Taro.getEnv() === "WEB";
3005
+ }
3006
+ function isApp() {
3007
+ return dsBridge.hasNativeMethod("openWebPage");
3008
+ }
3009
+
2991
3010
  const _hoisted_1$q = { class: "account-view" };
2992
3011
  const _hoisted_2$j = { class: "scroll-content" };
2993
3012
  const _hoisted_3$d = { class: "balance" };
@@ -3186,9 +3205,6 @@ var script$t = /* @__PURE__ */ defineComponent({
3186
3205
  }
3187
3206
  loadNextPage();
3188
3207
  };
3189
- computed(() => {
3190
- return rulesPopupOpen.value || datePickerOpen.value || filterOpen.value || secondBalanceOpen.value;
3191
- });
3192
3208
  const secondBalanceOpen = ref(false);
3193
3209
  function onSecondBalanceButtonClick() {
3194
3210
  secondBalanceOpen.value = true;
@@ -3220,6 +3236,9 @@ var script$t = /* @__PURE__ */ defineComponent({
3220
3236
  delta: 1
3221
3237
  });
3222
3238
  }
3239
+ const isAppEnv = computed(() => {
3240
+ return isApp();
3241
+ });
3223
3242
  onMounted(() => {
3224
3243
  resetDateRange();
3225
3244
  });
@@ -3278,10 +3297,11 @@ var script$t = /* @__PURE__ */ defineComponent({
3278
3297
  1
3279
3298
  /* TEXT */
3280
3299
  ),
3281
- createElementVNode("div", {
3300
+ !isAppEnv.value ? (openBlock(), createElementBlock("div", {
3301
+ key: 0,
3282
3302
  class: "pay",
3283
3303
  onClick: gotoRecharge
3284
- }, "\u4E91\u8C46\u5145\u503C")
3304
+ }, "\u4E91\u8C46\u5145\u503C")) : createCommentVNode("v-if", true)
3285
3305
  ])
3286
3306
  ]),
3287
3307
  createVNode(script$u),
@@ -3326,7 +3346,7 @@ var script$t = /* @__PURE__ */ defineComponent({
3326
3346
  1
3327
3347
  /* TEXT */
3328
3348
  ),
3329
- item.id ? (openBlock(), createElementBlock("div", _hoisted_11$2, [
3349
+ item.id && !isAppEnv.value ? (openBlock(), createElementBlock("div", _hoisted_11$2, [
3330
3350
  createElementVNode("div", {
3331
3351
  onClick: ($event) => gotoTrade(item)
3332
3352
  }, "\u4F01\u660E\u661F\u4F18\u60E0\u5145\u503C", 8, _hoisted_12$2),
@@ -3381,7 +3401,7 @@ var script$t = /* @__PURE__ */ defineComponent({
3381
3401
  1
3382
3402
  /* TEXT */
3383
3403
  ),
3384
- item.id ? (openBlock(), createElementBlock("div", _hoisted_17$1, [
3404
+ item.id && !isAppEnv.value ? (openBlock(), createElementBlock("div", _hoisted_17$1, [
3385
3405
  createElementVNode("div", {
3386
3406
  onClick: ($event) => gotoTrade(item)
3387
3407
  }, "AI\u5BA1\u6279\u5145\u503C", 8, _hoisted_18$1),
@@ -5911,21 +5931,6 @@ var script$f = /* @__PURE__ */ defineComponent({
5911
5931
 
5912
5932
  script$f.__file = "src/notice/components/NoticeList.vue";
5913
5933
 
5914
- function dataURItoBlob(dataURI) {
5915
- const byteString = atob(dataURI.split(",")[1]);
5916
- const mimeString = dataURI.split(",")[0].split(":")[1].split(";")[0];
5917
- const ab = new ArrayBuffer(byteString.length);
5918
- const ia = new Uint8Array(ab);
5919
- for (let i = 0; i < byteString.length; i++) {
5920
- ia[i] = byteString.charCodeAt(i);
5921
- }
5922
- return new Blob([ab], { type: mimeString });
5923
- }
5924
- function isWeb() {
5925
- const env = process.env.TARO_ENV || "";
5926
- return env === "h5" || Taro.getEnv() === "WEB";
5927
- }
5928
-
5929
5934
  const _hoisted_1$d = {
5930
5935
  key: 0,
5931
5936
  class: "read-all"
@@ -6949,7 +6954,8 @@ var script$b = /* @__PURE__ */ defineComponent({
6949
6954
  )) : createCommentVNode("v-if", true)
6950
6955
  ]),
6951
6956
  createElementVNode("div", _hoisted_23, [
6952
- createVNode(_component_nut_button, {
6957
+ !unref(isApp)() ? (openBlock(), createBlock(_component_nut_button, {
6958
+ key: 0,
6953
6959
  class: "user-info-ft-btn",
6954
6960
  style: { "width": "100%", "margin-top": "12px" },
6955
6961
  onClick: toLogout,
@@ -6965,7 +6971,7 @@ var script$b = /* @__PURE__ */ defineComponent({
6965
6971
  ])]),
6966
6972
  _: 1
6967
6973
  /* STABLE */
6968
- })
6974
+ })) : createCommentVNode("v-if", true)
6969
6975
  ])
6970
6976
  ]))
6971
6977
  ]),
@@ -7102,10 +7108,11 @@ var script$b = /* @__PURE__ */ defineComponent({
7102
7108
  src: userInfo.value.avatar,
7103
7109
  alt: ""
7104
7110
  }, null, 8, _hoisted_25)) : (openBlock(), createElementBlock("img", _hoisted_26)),
7105
- createElementVNode("div", {
7111
+ !unref(isApp)() ? (openBlock(), createElementBlock("div", {
7112
+ key: 2,
7106
7113
  class: "upload-avatar-popup-btn",
7107
7114
  onClick: toUpload
7108
- }, "\u66F4\u6362\u5934\u50CF")
7115
+ }, "\u66F4\u6362\u5934\u50CF")) : createCommentVNode("v-if", true)
7109
7116
  ])
7110
7117
  ]),
7111
7118
  _: 1
@@ -9202,7 +9209,7 @@ var script$2 = /* @__PURE__ */ defineComponent({
9202
9209
  rules: ["required"]
9203
9210
  }, {
9204
9211
  append: withCtx(() => [
9205
- !\u5DF2\u8BA4\u8BC1.value ? (openBlock(), createBlock(unref(script$G), {
9212
+ !unref(isApp)() && !\u5DF2\u8BA4\u8BC1.value ? (openBlock(), createBlock(unref(script$G), {
9206
9213
  key: 0,
9207
9214
  onComplete: onOcrComplete
9208
9215
  })) : createCommentVNode("v-if", true)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxda/appkit",
3
- "version": "4.2.84",
3
+ "version": "4.2.86",
4
4
  "description": "小程序应用开发包",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.ts",
@@ -24,7 +24,6 @@
24
24
  "@nutui/auto-import-resolver": "^1.0.0",
25
25
  "@nutui/icons-vue-taro": "^0.0.9",
26
26
  "@nutui/nutui-taro": "^4.3.14",
27
- "@rollup/rollup-darwin-arm64": "^4.52.4",
28
27
  "@tarojs/components": "^4.1.7",
29
28
  "@tarojs/helper": "^4.1.7",
30
29
  "@tarojs/plugin-framework-vue3": "^4.1.7",
@@ -37,6 +36,7 @@
37
36
  "@types/wechat-miniprogram": "^3.4.7",
38
37
  "@uxda/nutshell": "^1.0.0",
39
38
  "dayjs": "^1.11.18",
39
+ "dsbridge": "^3.1.4",
40
40
  "lodash-es": "^4.17.21",
41
41
  "validator": "^13.15.15",
42
42
  "vue": "^3.5.22"
package/rollup.config.mjs CHANGED
@@ -60,6 +60,7 @@ export default [
60
60
  '@uxda/nutshell',
61
61
  'dayjs',
62
62
  'validator',
63
+ 'dsbridge',
63
64
  ],
64
65
  },
65
66
  // {
@@ -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 class="pay" @click="gotoRecharge">云豆充值</div>
21
+ <div v-if="!isAppEnv" class="pay" @click="gotoRecharge">云豆充值</div>
22
22
  </div>
23
23
  </div>
24
24
  <Tip />
@@ -31,7 +31,7 @@
31
31
  </div>
32
32
  <div class="item-title">
33
33
  <div>{{ item.title }}</div>
34
- <div class="item-title-button" v-if="item.id">
34
+ <div class="item-title-button" v-if="item.id && !isAppEnv">
35
35
  <div @click="gotoTrade(item)">企明星优惠充值</div>
36
36
  <img class="button-icon" src="https://cdn.ddjf.com/static/images/bpms-workBench/button-hg.svg" />
37
37
  </div>
@@ -46,7 +46,7 @@
46
46
  <div class="item-count">{{ formatAmount(item.count || 0) }}{{ item.unit }}</div>
47
47
  <div class="item-title">
48
48
  <div>{{ item.title }}</div>
49
- <div class="item-title-button" v-if="item.id">
49
+ <div class="item-title-button" v-if="item.id && !isAppEnv">
50
50
  <div @click="gotoTrade(item)">AI审批充值</div>
51
51
  <img class="button-icon" src="https://cdn.ddjf.com/static/images/bpms-workBench/button-hg.svg" />
52
52
  </div>
@@ -148,6 +148,7 @@ import Tip from './Tip.vue'
148
148
  import groupBy from 'lodash-es/groupBy'
149
149
  import { useAmount } from '../../shared/composables/useAmount'
150
150
  import { ScrollView } from '@tarojs/components'
151
+ import { isApp } from '../../utils/utils'
151
152
 
152
153
  type AccountViewProps = {
153
154
  app: string
@@ -358,15 +359,6 @@ const onReachBottom = () => {
358
359
  loadNextPage()
359
360
  }
360
361
 
361
- /**
362
- * 浮窗弹出时不允许
363
- * 1. 下拉刷新
364
- * 2. 上滑分页
365
- */
366
- const isAnyPopupOpen = computed(() => {
367
- return rulesPopupOpen.value || datePickerOpen.value || filterOpen.value || secondBalanceOpen.value
368
- })
369
-
370
362
  const secondBalanceOpen = ref<boolean>(false)
371
363
 
372
364
  function onSecondBalanceButtonClick() {
@@ -408,6 +400,10 @@ function onPageHeaderClose() {
408
400
  })
409
401
  }
410
402
 
403
+ const isAppEnv = computed(() => {
404
+ return isApp()
405
+ })
406
+
411
407
  onMounted(() => {
412
408
  resetDateRange()
413
409
  })
@@ -105,7 +105,7 @@ const onPayClick = () => {
105
105
  }
106
106
  requestBrandWCPay({
107
107
  amount: amounts.value[state.selected].amount,
108
- app: 'cloudkitProMp',
108
+ app: 'loankitMp',
109
109
  tenant: props.tenant,
110
110
  accountAuthFlag: false,
111
111
  channelCode: 'centergzh',
@@ -176,7 +176,7 @@ const onPayClick = () => {
176
176
  requestBrandWCPayByBean({
177
177
  caseConfigId: amounts.value[state.selected].id,
178
178
  amount: amounts.value[state.selected].paymentAmount,
179
- app: 'cloudkitProMp',
179
+ app: 'loankitMp',
180
180
  tenant: props.tenant,
181
181
  accountAuthFlag: false,
182
182
  channelCode: 'centergzh',
@@ -29,7 +29,7 @@ const getSdkConfig = (appCode?: string, url?: string): Promise<JssdkConfig> => {
29
29
 
30
30
  $http
31
31
  .get('/wecom/config/getConfig', {
32
- appCode: appCode || 'cloudkitProMp',
32
+ appCode: appCode || 'loankitMp',
33
33
  callbackUrl: url || encodeURIComponent(location.href.split('#')[0]),
34
34
  })
35
35
  .then((response: JssdkConfig) => {
@@ -6,7 +6,7 @@
6
6
  <ns-input label="你的姓名" name="姓名" v-model="formData.姓名" placeholder="请输入或拍照识别" :maxlength="30" :disabled="已认证"
7
7
  :rules="['required']">
8
8
  <template #append>
9
- <ocr-icon v-if="!已认证" @complete="onOcrComplete" />
9
+ <ocr-icon v-if="!isApp() && !已认证" @complete="onOcrComplete" />
10
10
  </template>
11
11
  </ns-input>
12
12
  <ns-input label="身份证号码" name="身份证号码" placeholder="请输入身份证号码" :maxlength="30" v-model="formData.身份证号码"
@@ -58,6 +58,7 @@ import { useNutshell } from "@uxda/nutshell/taro";
58
58
  import isMobilePhone from "validator/es/lib/isMobilePhone";
59
59
  import isIdentityCard from "validator/es/lib/isIdentityCard";
60
60
  import { useHttp } from "../api";
61
+ import { isApp } from '../../utils/utils'
61
62
 
62
63
  const props = withDefaults(
63
64
  defineProps<{
@@ -191,8 +192,6 @@ const emits = defineEmits(["toAgreement"]);
191
192
  --nut-primary-color: #017fff;
192
193
  position: absolute;
193
194
  top: -36px;
194
- left: 50%;
195
- transform: translateX(-50%);
196
195
  white-space: nowrap;
197
196
  display: flex;
198
197
  align-items: center;
@@ -74,7 +74,7 @@
74
74
  </div>
75
75
 
76
76
  <div class="user-info-ft">
77
- <nut-button class="user-info-ft-btn" style="width: 100%; margin-top: 12px" @click="toLogout" plain
77
+ <nut-button v-if="!isApp()" class="user-info-ft-btn" style="width: 100%; margin-top: 12px" @click="toLogout" plain
78
78
  type="primary">退出登录</nut-button>
79
79
  </div>
80
80
  </div>
@@ -122,7 +122,7 @@
122
122
  <img class="upload-avatar-popup-avatar" mode="aspectFit" v-if="userInfo.avatar" :src="userInfo.avatar" alt="" />
123
123
  <img class="upload-avatar-popup-avatar" mode="aspectFit" v-else
124
124
  src="https://cdn.ddjf.com/static/images/wx-yunservice/account-head.png" alt="" />
125
- <div class="upload-avatar-popup-btn" @click="toUpload">更换头像</div>
125
+ <div class="upload-avatar-popup-btn" @click="toUpload" v-if="!isApp()">更换头像</div>
126
126
  </div>
127
127
  </nut-popup>
128
128
  </template>
@@ -135,6 +135,7 @@ import { useEncode } from "../../shared/composables/useEncode";
135
135
  import DdSkeleton from "../../components/dd-skeleton/index.vue";
136
136
  import { useHttp } from "../api";
137
137
  import { ScrollView } from '@tarojs/components'
138
+ import { isApp } from '../../utils/utils'
138
139
 
139
140
  const props = withDefaults(
140
141
  defineProps<{
@@ -1,4 +1,5 @@
1
1
  import Taro from "@tarojs/taro"
2
+ import dsBridge from 'dsbridge'
2
3
 
3
4
  // 工具函数:DataURL转Blob
4
5
  export function dataURItoBlob(dataURI) {
@@ -26,3 +27,7 @@ export function generateUniqueId(pre?: string, delimiter = '-') {
26
27
  .substr(2)}`
27
28
  }
28
29
 
30
+ // 是否是App环境
31
+ export function isApp() {
32
+ return dsBridge.hasNativeMethod('openWebPage')
33
+ }