@uxda/appkit 4.3.5 → 4.3.8

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.
Files changed (135) hide show
  1. package/.eslintrc.mjs +7 -7
  2. package/COMPONENT_USAGE.md +1523 -1523
  3. package/PROJECT_DOCS.md +142 -142
  4. package/README.md +187 -187
  5. package/babel.config.js +12 -12
  6. package/dist/appkit.css +15 -63
  7. package/dist/assets/asset-DcH8Kg-2 +1 -0
  8. package/dist/index.js +261 -771
  9. package/package.json +79 -79
  10. package/project.config.json +15 -15
  11. package/project.tt.json +13 -13
  12. package/rollup.config.mjs +78 -78
  13. package/src/Appkit.ts +72 -72
  14. package/src/balance/api/endpoints.ts +133 -133
  15. package/src/balance/api/index.ts +118 -118
  16. package/src/balance/components/AccountView.vue +770 -770
  17. package/src/balance/components/BalanceCard.vue +210 -210
  18. package/src/balance/components/BalanceReminder.vue +84 -84
  19. package/src/balance/components/ConsumptionFilter.vue +218 -218
  20. package/src/balance/components/ConsumptionRules.vue +68 -68
  21. package/src/balance/components/DateFilter.vue +259 -259
  22. package/src/balance/components/DateRange.vue +111 -111
  23. package/src/balance/components/ListFilter.vue +62 -62
  24. package/src/balance/components/ListFilterPicker.vue +191 -191
  25. package/src/balance/components/PromoterCard.vue +307 -307
  26. package/src/balance/components/SecondBalance.vue +77 -77
  27. package/src/balance/components/Tip.vue +45 -45
  28. package/src/balance/components/index.ts +8 -8
  29. package/src/balance/types.ts +99 -99
  30. package/src/components/bt-cropper/index.vue +730 -730
  31. package/src/components/bt-cropper/utils/calcCropper.js +42 -42
  32. package/src/components/bt-cropper/utils/calcImagePosition.js +23 -23
  33. package/src/components/bt-cropper/utils/calcImageSize.js +37 -37
  34. package/src/components/bt-cropper/utils/calcPointDistance.js +12 -12
  35. package/src/components/bt-cropper/utils/calcRightAndBottom.js +7 -7
  36. package/src/components/bt-cropper/utils/ratio.js +3 -3
  37. package/src/components/bt-cropper/utils/tools.js +25 -25
  38. package/src/components/dd-area/index.vue +225 -225
  39. package/src/components/dd-icon/doc.md +21 -21
  40. package/src/components/dd-icon/index.vue +23 -23
  41. package/src/components/dd-notice-bar/index.vue +78 -78
  42. package/src/components/dd-search/doc.md +34 -34
  43. package/src/components/dd-search/index.vue +168 -168
  44. package/src/components/dd-selector/index.vue +124 -124
  45. package/src/components/dd-skeleton/doc.md +19 -19
  46. package/src/components/dd-skeleton/index.vue +36 -36
  47. package/src/global.ts +6 -6
  48. package/src/index.ts +101 -101
  49. package/src/main.scss +1 -1
  50. package/src/notice/api/endpoints.ts +54 -54
  51. package/src/notice/api/index.ts +121 -121
  52. package/src/notice/components/NoticeBanner.vue +247 -247
  53. package/src/notice/components/NoticeEntry.vue +99 -99
  54. package/src/notice/components/NoticeList.vue +311 -311
  55. package/src/notice/components/NoticeList2.vue +400 -399
  56. package/src/notice/components/NoticePopup.vue +163 -163
  57. package/src/notice/components/index.ts +6 -6
  58. package/src/notice/components/useCommonList.ts +86 -87
  59. package/src/notice/components/useNotice.ts +35 -35
  60. package/src/notice/index.ts +1 -1
  61. package/src/notice/types.ts +25 -25
  62. package/src/payment/api/config.ts +7 -7
  63. package/src/payment/api/endpoints.ts +96 -98
  64. package/src/payment/api/index.ts +107 -108
  65. package/src/payment/components/AmountPicker.vue +90 -90
  66. package/src/payment/components/RechargeResult.vue +69 -68
  67. package/src/payment/components/RechargeView.vue +191 -191
  68. package/src/payment/components/RightsPicker.vue +105 -105
  69. package/src/payment/components/TradeView.vue +363 -523
  70. package/src/payment/components/UserAgreement.vue +234 -234
  71. package/src/payment/components/index.ts +22 -22
  72. package/src/payment/index.ts +5 -5
  73. package/src/payment/services/index.ts +16 -16
  74. package/src/payment/services/invoke-recharge.ts +25 -25
  75. package/src/payment/services/request-payment.ts +130 -132
  76. package/src/payment/types.ts +33 -34
  77. package/src/register/components/SelfRegistration.vue +233 -233
  78. package/src/register/components/index.ts +2 -2
  79. package/src/scenarios/components/SharePoster.vue +364 -364
  80. package/src/scenarios/components/index.ts +2 -2
  81. package/src/scenarios/components/poster-paste.vue +93 -93
  82. package/src/scenarios/components/share-poster.md +273 -273
  83. package/src/shared/components/AppDrawer.vue +53 -53
  84. package/src/shared/components/AppVerify.vue +128 -137
  85. package/src/shared/components/DeviceVersion.vue +78 -78
  86. package/src/shared/components/EmptyView.vue +33 -33
  87. package/src/shared/components/OcrBusinessLicense.vue +137 -120
  88. package/src/shared/components/OcrIcon.vue +229 -267
  89. package/src/shared/components/PageHeader.vue +84 -84
  90. package/src/shared/components/index.ts +8 -10
  91. package/src/shared/composables/index.ts +9 -10
  92. package/src/shared/composables/useAmount.ts +46 -46
  93. package/src/shared/composables/useCountdown.ts +46 -46
  94. package/src/shared/composables/useCrypto.ts +76 -76
  95. package/src/shared/composables/useDeviceEnv.ts +26 -26
  96. package/src/shared/composables/useDragBox.ts +97 -97
  97. package/src/shared/composables/useEncode.ts +43 -43
  98. package/src/shared/composables/useLogger.ts +144 -144
  99. package/src/shared/composables/useSafeArea.ts +46 -46
  100. package/src/shared/composables/useTabbar.ts +24 -24
  101. package/src/shared/composables/useUpload.ts +61 -106
  102. package/src/shared/composables/useValidator.ts +32 -32
  103. package/src/shared/composables/useWxAuth.ts +48 -48
  104. package/src/shared/http/Http.ts +148 -149
  105. package/src/shared/http/index.ts +1 -1
  106. package/src/shared/http/types.ts +163 -163
  107. package/src/shared/index.ts +9 -9
  108. package/src/shared/tracking/directives/index.ts +40 -40
  109. package/src/shared/tracking/examples/page-tracking-template.vue +27 -27
  110. package/src/shared/tracking/tracking-sdk.ts +1 -0
  111. package/src/shared/weixin/index.ts +9 -9
  112. package/src/shared/weixin/jssdk.ts +103 -103
  113. package/src/shared/weixin/payment.ts +38 -38
  114. package/src/styles/vars.scss +3 -3
  115. package/src/user/api/endpoints.ts +17 -17
  116. package/src/user/api/index.ts +123 -123
  117. package/src/user/components/LoginSetting.vue +114 -114
  118. package/src/user/components/UserAuth.vue +218 -218
  119. package/src/user/components/UserBinding.vue +277 -277
  120. package/src/user/components/UserBindingSuccess.vue +80 -80
  121. package/src/user/components/UserEntry.vue +139 -139
  122. package/src/user/components/UserFeedback.vue +427 -428
  123. package/src/user/components/UserFeedbackEntry.vue +175 -175
  124. package/src/user/components/UserHeadCrop.vue +65 -65
  125. package/src/user/components/UserInfo.vue +709 -710
  126. package/src/user/components/UserResourceEmpty.vue +75 -75
  127. package/src/user/components/index.ts +23 -23
  128. package/src/user/index.ts +1 -1
  129. package/src/utils/utils.ts +33 -33
  130. package/tsconfig.json +30 -30
  131. package/types/global.d.ts +22 -24
  132. package/types/vue.d.ts +10 -10
  133. package/src/shared/components/OcrBank.vue +0 -202
  134. package/src/shared/components/OcrInvoice.vue +0 -218
  135. package/src/shared/composables/useCompress.ts +0 -64
package/dist/index.js CHANGED
@@ -1,15 +1,15 @@
1
- import { GridItem, Grid, Popup, ActionSheet, Checkbox, Button, Dialog, DatePicker, Radio, RadioGroup, FormItem, Form, Ellipsis, Skeleton, Cell, Input, Step, Steps } from '@nutui/nutui-taro';
1
+ import { Grid, GridItem, Popup, ActionSheet, Checkbox, Button, Dialog, DatePicker, Form, FormItem, RadioGroup, Radio, Ellipsis, Skeleton, Cell, Input, Steps, Step } from '@nutui/nutui-taro';
2
2
  import '@nutui/nutui-taro/dist/packages/button/style/css';
3
3
  import '@nutui/nutui-taro/dist/packages/checkbox/style/css';
4
- import { defineComponent, reactive, openBlock, createBlock, withCtx, createElementBlock, Fragment, renderList, normalizeClass, createElementVNode, toDisplayString, createTextVNode, ref, computed, onUnmounted, resolveDirective, createCommentVNode, withDirectives, renderSlot, createVNode, normalizeStyle, unref, isRef, onMounted, createStaticVNode, watch, vShow, mergeModels, useModel, resolveComponent, vModelText, watchPostEffect, withModifiers } from 'vue';
4
+ import { defineComponent, reactive, createBlock, openBlock, withCtx, createElementBlock, Fragment, renderList, normalizeClass, createElementVNode, toDisplayString, createTextVNode, ref, computed, onUnmounted, resolveDirective, createCommentVNode, withDirectives, renderSlot, createVNode, normalizeStyle, unref, isRef, onMounted, createStaticVNode, watch, vShow, mergeModels, useModel, resolveComponent, vModelText, watchPostEffect, withModifiers } from 'vue';
5
5
  import '@nutui/nutui-taro/dist/packages/grid/style/css';
6
6
  import '@nutui/nutui-taro/dist/packages/griditem/style/css';
7
- import Taro, { showModal, getSystemInfoSync, getMenuButtonBoundingClientRect, request as request$1, uploadFile, showToast, chooseMedia, chooseMessageFile, showLoading, hideLoading, getStorageSync, setStorageSync, getSystemInfo, getNetworkType, getEnv, getAccountInfoSync, getPerformance, onAppHide, useDidShow, onAppShow, onNetworkStatusChange, useRouter } from '@tarojs/taro';
7
+ import Taro, { showModal, getSystemInfoSync, getMenuButtonBoundingClientRect, uploadFile, request as request$1, showToast, chooseMedia, chooseMessageFile, showLoading, hideLoading, getStorageSync, setStorageSync, getSystemInfo, getNetworkType, getEnv, getAccountInfoSync, getPerformance, onAppHide, useDidShow, onAppShow, onNetworkStatusChange, useRouter } from '@tarojs/taro';
8
8
  import '@nutui/nutui-taro/dist/packages/popup/style/css';
9
9
  import isMobilePhone from 'validator/es/lib/isMobilePhone';
10
10
  import isIdentityCard from 'validator/es/lib/isIdentityCard';
11
11
  import qs from 'qs';
12
- import { NsForm, NsInput, NsButton, useNutshell, NsIcon, usePopup, NsButtonGroup, usePaging, NsPage, NsTabs, NsPageContent, NsSkeleton, NsRepeator, NsCard, NsEmpty, NsCheckbox } from '@uxda/nutshell/taro';
12
+ import { NsForm, NsInput, NsButton, NsIcon, usePopup, useNutshell, NsButtonGroup, usePaging, NsPage, NsTabs, NsPageContent, NsSkeleton, NsRepeator, NsCard, NsEmpty, NsCheckbox } from '@uxda/nutshell/taro';
13
13
  import '@nutui/nutui-taro/dist/packages/actionsheet/style/css';
14
14
  import pako from 'pako';
15
15
  import dsBridge from 'dsbridge';
@@ -34,7 +34,7 @@ import '@nutui/nutui-taro/dist/packages/step/style/css';
34
34
 
35
35
  const _hoisted_1$G = { class: "token-line number" };
36
36
  const _hoisted_2$t = { class: "number" };
37
- var script$O = /* @__PURE__ */ defineComponent({
37
+ var script$M = /* @__PURE__ */ defineComponent({
38
38
  __name: "AmountPicker",
39
39
  props: {
40
40
  items: { type: Array, required: true, default: () => [] },
@@ -107,7 +107,7 @@ var script$O = /* @__PURE__ */ defineComponent({
107
107
  }
108
108
  });
109
109
 
110
- script$O.__file = "src/payment/components/AmountPicker.vue";
110
+ script$M.__file = "src/payment/components/AmountPicker.vue";
111
111
 
112
112
  const getSdkConfig = (appCode, url) => {
113
113
  return new Promise((resolve, reject) => {
@@ -310,84 +310,71 @@ function useEncode() {
310
310
  };
311
311
  }
312
312
 
313
- const compressImageWithCanvas = (src, quality) => {
314
- return new Promise((resolve, reject) => {
315
- const img = new Image();
316
- img.crossOrigin = "anonymous";
317
- img.onload = () => {
318
- try {
319
- const canvas = document.createElement("canvas");
320
- const ctx = canvas.getContext("2d");
321
- if (!ctx) {
322
- reject(new Error("\u65E0\u6CD5\u83B7\u53D6 canvas \u4E0A\u4E0B\u6587"));
323
- return;
324
- }
325
- const maxWidth = 900;
326
- const maxHeight = 900;
327
- let width = img.width;
328
- let height = img.height;
329
- if (width > maxWidth || height > maxHeight) {
330
- const ratio = Math.min(maxWidth / width, maxHeight / height);
331
- width = width * ratio;
332
- height = height * ratio;
333
- }
334
- canvas.width = width;
335
- canvas.height = height;
336
- ctx.drawImage(img, 0, 0, width, height);
337
- canvas.toBlob(
338
- (blob) => {
339
- if (!blob) {
340
- reject(new Error("\u56FE\u7247\u538B\u7F29\u5931\u8D25"));
341
- return;
342
- }
343
- const compressedUrl = URL.createObjectURL(blob);
344
- resolve(compressedUrl);
345
- },
346
- "image/jpeg",
347
- quality / 100
348
- );
349
- } catch (error) {
350
- reject(error);
351
- }
352
- };
353
- img.onerror = () => {
354
- reject(new Error("\u56FE\u7247\u52A0\u8F7D\u5931\u8D25"));
355
- };
356
- img.src = src;
357
- });
313
+ const globalData = {};
314
+
315
+ const appKitOptions = {
316
+ app: () => "",
317
+ tenant: () => "",
318
+ token: () => "",
319
+ tempToken: () => "",
320
+ baseUrl: () => "",
321
+ 401() {
322
+ },
323
+ gray: () => ""
358
324
  };
359
- async function compressImage(src, quality = 80) {
360
- if (Taro.getEnv() === "WEB") {
361
- try {
362
- const compressedUrl = await compressImageWithCanvas(src, quality);
363
- return { tempFilePath: compressedUrl };
364
- } catch (error) {
365
- console.error("\u56FE\u7247\u538B\u7F29\u5931\u8D25:", error);
366
- return { tempFilePath: src };
367
- }
368
- } else {
325
+ const useAppKitOptions = () => {
326
+ if (!globalData.$appKitOptions) {
327
+ globalData.$appKitOptions = appKitOptions;
328
+ }
329
+ return globalData.$appKitOptions;
330
+ };
331
+
332
+ const mappings$1 = {
333
+ downloadUrl: "thrumb",
334
+ fileId: "id",
335
+ fileName: "name",
336
+ fileSize: "size",
337
+ fileSuffix: "ext",
338
+ fileType: "type",
339
+ originalUrl: "url"
340
+ };
341
+ const transformFields = (row) => {
342
+ return Object.fromEntries(Object.entries(row).map(([k, v]) => [mappings$1[k] || k, v]));
343
+ };
344
+ const useUpload = (config) => {
345
+ const appkitOptions = useAppKitOptions();
346
+ const upload = (url, file) => {
369
347
  return new Promise((resolve, reject) => {
370
- Taro.compressImage({
371
- src,
372
- quality,
373
- success: (res) => {
374
- resolve(res);
348
+ uploadFile({
349
+ url: config.baseUrl + url,
350
+ filePath: file.path,
351
+ name: "file",
352
+ formData: {
353
+ objectNo: `min${Date.now()}`
375
354
  },
376
- fail: (res) => {
377
- reject(res);
355
+ header: {
356
+ ...config.headers,
357
+ token: appkitOptions.tempToken() || appkitOptions.token()
358
+ },
359
+ success: (rsp) => {
360
+ const { data } = rsp;
361
+ try {
362
+ const response = JSON.parse(data);
363
+ console.log("===response", response);
364
+ resolve(transformFields(response.result));
365
+ } catch (e) {
366
+ reject({
367
+ message: "\u6587\u4EF6\u4E0A\u4F20\u5F02\u5E38"
368
+ });
369
+ }
378
370
  }
379
371
  });
380
372
  });
381
- }
382
- }
383
- function getCompressQuality(size) {
384
- let quality = 100;
385
- const curSize = size / (1024 * 1024);
386
- if (curSize > 6) {
387
- quality = quality - (curSize - 6) / curSize * 100;
388
- }
389
- return quality;
390
- }
373
+ };
374
+ return {
375
+ upload
376
+ };
377
+ };
391
378
 
392
379
  const defaultCryptoConfig = {
393
380
  maskField: "mask",
@@ -428,25 +415,6 @@ function useCrypto(config) {
428
415
  };
429
416
  }
430
417
 
431
- const globalData = {};
432
-
433
- const appKitOptions = {
434
- app: () => "",
435
- tenant: () => "",
436
- token: () => "",
437
- tempToken: () => "",
438
- baseUrl: () => "",
439
- 401() {
440
- },
441
- gray: () => ""
442
- };
443
- const useAppKitOptions = () => {
444
- if (!globalData.$appKitOptions) {
445
- globalData.$appKitOptions = appKitOptions;
446
- }
447
- return globalData.$appKitOptions;
448
- };
449
-
450
418
  const defaultLogOptions = {
451
419
  projectName: "ddyk-dev",
452
420
  logStore: "ddjf-internet-web",
@@ -580,59 +548,11 @@ function useWxAuth() {
580
548
  };
581
549
  }
582
550
 
583
- const mappings$1 = {
584
- downloadUrl: "thrumb",
585
- fileId: "id",
586
- fileName: "name",
587
- fileSize: "size",
588
- fileSuffix: "ext",
589
- fileType: "type",
590
- originalUrl: "url"
591
- };
592
- const transformFields = (row) => {
593
- return Object.fromEntries(Object.entries(row).map(([k, v]) => [mappings$1[k] || k, v]));
594
- };
595
- const useUpload = (config) => {
596
- const appkitOptions = useAppKitOptions();
597
- const upload = (url, file) => {
598
- return new Promise((resolve, reject) => {
599
- uploadFile({
600
- url: config.baseUrl + url,
601
- filePath: file.path,
602
- name: "file",
603
- formData: {
604
- objectNo: `min${Date.now()}`,
605
- appCode: config.headers?.appcode || appkitOptions.app()
606
- },
607
- header: {
608
- ...config.headers,
609
- token: appkitOptions.tempToken() || appkitOptions.token()
610
- },
611
- success: (rsp) => {
612
- const { data } = rsp;
613
- try {
614
- const response = JSON.parse(data);
615
- console.log("===response", response);
616
- resolve(transformFields(response.result));
617
- } catch (e) {
618
- reject({
619
- message: "\u6587\u4EF6\u4E0A\u4F20\u5F02\u5E38"
620
- });
621
- }
622
- }
623
- });
624
- });
625
- };
626
- return {
627
- upload
628
- };
629
- };
630
-
631
551
  const _hoisted_1$F = {
632
552
  key: 0,
633
553
  class: "page-title"
634
554
  };
635
- var script$N = /* @__PURE__ */ defineComponent({
555
+ var script$L = /* @__PURE__ */ defineComponent({
636
556
  __name: "PageHeader",
637
557
  props: {
638
558
  title: { type: String, required: false, default: "" },
@@ -689,10 +609,10 @@ var script$N = /* @__PURE__ */ defineComponent({
689
609
  }
690
610
  });
691
611
 
692
- script$N.__file = "src/shared/components/PageHeader.vue";
612
+ script$L.__file = "src/shared/components/PageHeader.vue";
693
613
 
694
614
  const _hoisted_1$E = { class: "drawer-body" };
695
- var script$M = /* @__PURE__ */ defineComponent({
615
+ var script$K = /* @__PURE__ */ defineComponent({
696
616
  __name: "AppDrawer",
697
617
  props: {
698
618
  modelValue: { type: Boolean, required: true },
@@ -716,7 +636,7 @@ var script$M = /* @__PURE__ */ defineComponent({
716
636
  "onUpdate:visible": onVisibleChange
717
637
  }, {
718
638
  default: withCtx(() => [
719
- createVNode(script$N, {
639
+ createVNode(script$L, {
720
640
  title: __props.title,
721
641
  style: normalizeStyle(unref(Taro).getEnv() !== "WEB" ? "" : "--height: 40px"),
722
642
  onClose: onPageHeaderClose
@@ -732,7 +652,7 @@ var script$M = /* @__PURE__ */ defineComponent({
732
652
  }
733
653
  });
734
654
 
735
- script$M.__file = "src/shared/components/AppDrawer.vue";
655
+ script$K.__file = "src/shared/components/AppDrawer.vue";
736
656
 
737
657
  const _hoisted_1$D = { class: "app-verify column" };
738
658
  const _hoisted_2$s = { class: "caption" };
@@ -743,7 +663,7 @@ const _hoisted_5$e = {
743
663
  class: "caption"
744
664
  };
745
665
  const _hoisted_6$a = { class: "row buttons" };
746
- var script$L = /* @__PURE__ */ defineComponent({
666
+ var script$J = /* @__PURE__ */ defineComponent({
747
667
  __name: "AppVerify",
748
668
  props: {
749
669
  phone: { type: String, required: true },
@@ -850,7 +770,6 @@ var script$L = /* @__PURE__ */ defineComponent({
850
770
  createElementVNode("div", _hoisted_6$a, [
851
771
  withDirectives((openBlock(), createBlock(unref(NsButton), {
852
772
  class: "cancel-btn",
853
- r: 20,
854
773
  onClick: _cache[2] || (_cache[2] = ($event) => emits("cancel"))
855
774
  }, {
856
775
  default: withCtx(() => [..._cache[3] || (_cache[3] = [
@@ -867,7 +786,6 @@ var script$L = /* @__PURE__ */ defineComponent({
867
786
  ]),
868
787
  withDirectives((openBlock(), createBlock(unref(NsButton), {
869
788
  color: "primary",
870
- r: 20,
871
789
  onClick: onOk
872
790
  }, {
873
791
  default: withCtx(() => [..._cache[4] || (_cache[4] = [
@@ -888,10 +806,10 @@ var script$L = /* @__PURE__ */ defineComponent({
888
806
  }
889
807
  });
890
808
 
891
- script$L.__file = "src/shared/components/AppVerify.vue";
809
+ script$J.__file = "src/shared/components/AppVerify.vue";
892
810
 
893
811
  const _hoisted_1$C = { key: 0 };
894
- var script$K = /* @__PURE__ */ defineComponent({
812
+ var script$I = /* @__PURE__ */ defineComponent({
895
813
  __name: "index",
896
814
  props: {
897
815
  text: { type: String, required: false },
@@ -958,7 +876,7 @@ var script$K = /* @__PURE__ */ defineComponent({
958
876
  }
959
877
  });
960
878
 
961
- script$K.__file = "src/components/dd-notice-bar/index.vue";
879
+ script$I.__file = "src/components/dd-notice-bar/index.vue";
962
880
 
963
881
  const typeMappings = {
964
882
  CZ: "\u5145\u503C",
@@ -1163,7 +1081,7 @@ function useHttp$3() {
1163
1081
  return $http;
1164
1082
  }
1165
1083
 
1166
- var script$J = /* @__PURE__ */ defineComponent({
1084
+ var script$H = /* @__PURE__ */ defineComponent({
1167
1085
  __name: "DeviceVersion",
1168
1086
  props: {
1169
1087
  versions: { type: String, required: false, default: "{}" }
@@ -1210,7 +1128,7 @@ var script$J = /* @__PURE__ */ defineComponent({
1210
1128
  }
1211
1129
  });
1212
1130
  return (_ctx, _cache) => {
1213
- return showAlert.value ? (openBlock(), createBlock(script$K, {
1131
+ return showAlert.value ? (openBlock(), createBlock(script$I, {
1214
1132
  key: 0,
1215
1133
  showClose: "",
1216
1134
  style: normalizeStyle(topStype.value),
@@ -1221,262 +1139,102 @@ var script$J = /* @__PURE__ */ defineComponent({
1221
1139
  }
1222
1140
  });
1223
1141
 
1224
- script$J.__file = "src/shared/components/DeviceVersion.vue";
1142
+ script$H.__file = "src/shared/components/DeviceVersion.vue";
1225
1143
 
1226
- var script$I = /* @__PURE__ */ defineComponent({
1144
+ var script$G = /* @__PURE__ */ defineComponent({
1227
1145
  __name: "OcrIcon",
1228
1146
  props: {
1229
1147
  disabled: { type: Boolean, required: false, default: false },
1230
1148
  side: { type: String, required: false, default: "face" },
1231
- className: { type: String, required: false, default: "" },
1232
- uploadUrl: { type: String, required: false, default: "/saas-base/file/uploadPublic" },
1233
- customUpload: { type: Function, required: false },
1234
- hasUploadVo: { type: Boolean, required: false, default: true },
1235
- customClick: { type: Boolean, required: false, default: false }
1149
+ class: { type: String, required: false, default: "" }
1236
1150
  },
1237
1151
  emits: ["complete"],
1238
- setup(__props, { expose: __expose, emit: __emit }) {
1152
+ setup(__props, { emit: __emit }) {
1239
1153
  const appKitOptions = useAppKitOptions();
1240
- const $http = useHttp$3(), $n = useNutshell();
1241
1154
  const emits = __emit;
1242
1155
  const props = __props;
1243
- function allTrim(str) {
1244
- return str.replace(/\s+/g, "");
1245
- }
1246
- async function onUploadFile(csRes) {
1247
- let result = null;
1248
- try {
1249
- let { path, size, tempFilePath } = csRes.tempFiles[0];
1250
- const compressImg = await compressImage(path || tempFilePath, getCompressQuality(size)) || {};
1251
- const filePath = compressImg.tempFilePath || path;
1252
- if (props.customUpload) {
1253
- props.customUpload(filePath);
1254
- return;
1255
- }
1256
- showLoading({ title: "\u8EAB\u4EFD\u8BC1\u8BC6\u522B\u4E2D..", mask: true });
1257
- const session = appKitOptions.token();
1258
- const baseUrl = appKitOptions.baseUrl();
1259
- const upRes = await uploadFile({
1260
- url: `${baseUrl}${!props.hasUploadVo ? props.uploadUrl : "/hkapprove/ocr/idcard"}`,
1261
- filePath,
1262
- name: "file",
1263
- formData: {
1264
- objectNo: `min${Date.now()}`,
1265
- side: props.side,
1266
- appCode: appKitOptions.app()
1267
- },
1268
- header: {
1269
- token: session || ""
1270
- }
1271
- });
1272
- const res = JSON.parse(upRes.data);
1273
- if (res.code === "200") {
1274
- if (props.hasUploadVo) {
1275
- hideLoading();
1276
- const faceInfo = res.result.faceInfo || {};
1277
- const backInfo = res.result.backInfo || {};
1278
- result = {
1279
- faceInfo: {
1280
- name: allTrim(faceInfo.name || ""),
1281
- certNo: allTrim(faceInfo.num || ""),
1282
- address: allTrim(faceInfo.address || "")
1283
- },
1284
- backInfo: {
1285
- startDate: backInfo?.startDate || "",
1286
- endDate: backInfo?.endDate || ""
1287
- },
1288
- fileUploadVO: res.result.fileUploadVO || {}
1289
- };
1290
- if (props.side === "face" && !result.faceInfo.name && !result.faceInfo.certNo) {
1291
- showToast({ title: "\u8BC6\u522B\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5", icon: "none" });
1292
- }
1293
- if (props.side === "back" && !result.backInfo?.startDate && !result.backInfo?.endDate) {
1294
- showToast({ title: "\u8BC6\u522B\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5", icon: "none" });
1156
+ async function taroImgCompress(src, quality = 80) {
1157
+ if (Taro.getEnv() === "WEB") {
1158
+ return src;
1159
+ } else {
1160
+ return new Promise((resolve, reject) => {
1161
+ Taro.compressImage({
1162
+ src,
1163
+ quality,
1164
+ success: (res) => {
1165
+ resolve(res);
1166
+ },
1167
+ fail: (res) => {
1168
+ reject(res);
1295
1169
  }
1296
- } else {
1297
- await getOcrInfo(res.result);
1298
- }
1299
- } else {
1300
- hideLoading();
1301
- showToast({
1302
- title: res.msg,
1303
- icon: "error"
1304
- });
1305
- }
1306
- } catch (err) {
1307
- hideLoading();
1308
- console.log(err);
1309
- }
1310
- props.hasUploadVo && (result?.faceInfo.name || result?.backInfo.startDate) && emits("complete", result);
1311
- }
1312
- async function getOcrInfo(file) {
1313
- try {
1314
- const res = await $http.get("/hkbase/common/idCard", {
1315
- fileUrl: typeof file === "string" ? file : file.originalUrl,
1316
- side: props.side
1317
- });
1318
- hideLoading();
1319
- if (props.side === "face" && !res?.name || props.side === "back" && !res?.signDate) {
1320
- $n.dialog({
1321
- title: "\u8BC6\u522B\u5931\u8D25",
1322
- message: `\u60A8\u4E0A\u4F20\u7684\u56FE\u7247\u53EF\u80FD\u4E0D\u591F\u6E05\u6670\u6216\u4E0E\u5F53\u524D\u529F\u80FD\u4E0D\u7B26\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20\u4E00\u5F20\u6E05\u6670\u3001\u5B8C\u6574\u7684\u56FE\u7247\u3002\u8C22\u8C22\uFF01`,
1323
- okText: "\u6211\u77E5\u9053\u4E86",
1324
- cancelText: ""
1325
1170
  });
1326
- return;
1327
- }
1328
- emits("complete", {
1329
- faceInfo: {
1330
- name: allTrim(res?.name || ""),
1331
- certNo: allTrim(res?.cardNumber || ""),
1332
- address: allTrim(res?.address || "")
1333
- },
1334
- backInfo: {
1335
- startDate: res?.expireDate || "",
1336
- endDate: res?.signDate || ""
1337
- },
1338
- fileUploadVO: {
1339
- fileUrl: typeof file === "string" ? file : file.originalUrl,
1340
- fileKey: typeof file === "string" ? file : file.fileId
1341
- }
1342
1171
  });
1343
- } catch (err) {
1344
- hideLoading();
1345
1172
  }
1346
- }
1347
- const activeSheetVisible = ref(false);
1348
- const actionSheetMenus = [
1349
- {
1350
- name: "\u62CD\u6444",
1351
- type: "camera"
1352
- },
1353
- {
1354
- name: "\u4ECE\u76F8\u518C\u9009\u62E9",
1355
- type: "album"
1356
- },
1357
- {
1358
- name: "\u4ECE\u804A\u5929\u4F1A\u8BDD\u9009\u62E9",
1359
- type: "message"
1360
- }
1361
- ];
1362
- if (Taro.getEnv() === "WEB") {
1363
- actionSheetMenus.pop();
1364
- }
1365
- async function chooseImages(item) {
1366
- if (["camera", "album"].includes(item.type)) {
1367
- const csRes = await chooseMedia({
1368
- count: 1,
1369
- sourceType: [item.type],
1370
- // "camera" | "album"
1371
- maxDuration: 60
1372
- // 使用duration属性判断是图片还是视频,图片没有该属性
1373
- });
1374
- onUploadFile(csRes);
1375
- } else {
1376
- const csRes = await chooseMessageFile({
1377
- count: 1,
1378
- type: "image"
1379
- });
1380
- onUploadFile(csRes);
1381
- }
1382
- }
1383
- async function onUpload() {
1384
- if (props.disabled) return;
1385
- if (Taro.getEnv() === "WEB") {
1386
- const csRes = await chooseMedia({
1387
- count: 1,
1388
- sourceType: ["album"],
1389
- // "camera" | "album"
1390
- maxDuration: 60
1391
- // 使用duration属性判断是图片还是视频,图片没有该属性
1392
- });
1393
- onUploadFile(csRes);
1394
- return;
1395
- }
1396
- activeSheetVisible.value = true;
1397
- }
1398
- __expose({
1399
- onUpload
1400
- });
1401
- return (_ctx, _cache) => {
1402
- const _component_nut_action_sheet = ActionSheet;
1403
- const _directive_track_click = resolveDirective("track-click");
1404
- return openBlock(), createElementBlock(
1405
- Fragment,
1406
- null,
1407
- [
1408
- withDirectives((openBlock(), createElementBlock(
1409
- "div",
1410
- {
1411
- class: normalizeClass(["ocr-icon", [__props.disabled ? "disabled" : "", __props.className]]),
1412
- onClick: _cache[0] || (_cache[0] = ($event) => !__props.customClick ? onUpload() : null)
1413
- },
1414
- [
1415
- renderSlot(_ctx.$slots, "icon", {}, () => [
1416
- createVNode(unref(NsIcon), { name: "https://cdn.ddjf.com/static/images/beidouxing/ocr-icon.png" })
1417
- ])
1418
- ],
1419
- 2
1420
- /* CLASS */
1421
- )), [
1422
- [_directive_track_click, "\u8EAB\u4EFD\u8BC1\u8BC6\u522B-\u70B9\u51FB"]
1423
- ]),
1424
- createVNode(_component_nut_action_sheet, {
1425
- visible: activeSheetVisible.value,
1426
- "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => activeSheetVisible.value = $event),
1427
- "menu-items": actionSheetMenus,
1428
- onChoose: chooseImages,
1429
- "cancel-txt": "\u53D6\u6D88"
1430
- }, null, 8, ["visible"])
1431
- ],
1432
- 64
1433
- /* STABLE_FRAGMENT */
1434
- );
1435
- };
1436
- }
1437
- });
1438
-
1439
- script$I.__file = "src/shared/components/OcrIcon.vue";
1440
-
1441
- var script$H = /* @__PURE__ */ defineComponent({
1442
- __name: "OcrBank",
1443
- props: {
1444
- disabled: { type: Boolean, required: false, default: false },
1445
- class: { type: String, required: false, default: "" },
1446
- uploadUrl: { type: String, required: false, default: "/hkbase/file/uploadFile" },
1447
- customClick: { type: Boolean, required: false, default: false }
1448
- },
1449
- emits: ["complete"],
1450
- setup(__props, { expose: __expose, emit: __emit }) {
1451
- const appKitOptions = useAppKitOptions();
1452
- const $http = useHttp$3(), $n = useNutshell();
1453
- const emits = __emit;
1454
- const props = __props;
1173
+ }
1174
+ function getCompressQuality(size) {
1175
+ let quality = 100;
1176
+ const curSize = size / (1024 * 1024);
1177
+ if (curSize > 6) {
1178
+ quality = quality - (curSize - 6) / curSize * 100;
1179
+ }
1180
+ return quality;
1181
+ }
1182
+ function allTrim(str) {
1183
+ return str.replace(/\s+/g, "");
1184
+ }
1455
1185
  async function onUploadFile(csRes) {
1186
+ let result = null;
1456
1187
  try {
1188
+ console.log("===\u4E0A\u4F20", csRes);
1457
1189
  let { path, size, tempFilePath } = csRes.tempFiles[0];
1458
- const compressImg = await compressImage(path || tempFilePath, getCompressQuality(size)) || {};
1459
- const filePath = compressImg.tempFilePath || path;
1460
- showLoading({ title: "\u94F6\u884C\u5361\u8BC6\u522B\u4E2D..", mask: true });
1190
+ let filePath;
1191
+ if (Taro.getEnv() !== "WEB") {
1192
+ const compressImg = await taroImgCompress(path || tempFilePath, getCompressQuality(size)) || {};
1193
+ filePath = compressImg.tempFilePath || path;
1194
+ } else {
1195
+ filePath = path || tempFilePath;
1196
+ }
1197
+ console.log(filePath, "filePath");
1198
+ showLoading({ title: "\u8EAB\u4EFD\u8BC1\u8BC6\u522B\u4E2D.." });
1461
1199
  const session = appKitOptions.token();
1462
1200
  const baseUrl = appKitOptions.baseUrl();
1463
1201
  const upRes = await uploadFile({
1464
- url: baseUrl + props.uploadUrl,
1202
+ url: baseUrl + "/hkapprove/ocr/idcard",
1465
1203
  filePath,
1466
1204
  name: "file",
1467
1205
  formData: {
1468
1206
  objectNo: `min${Date.now()}`,
1469
- appCode: appKitOptions.app()
1207
+ side: props.side
1470
1208
  },
1471
1209
  header: {
1472
1210
  token: session || ""
1473
1211
  }
1474
1212
  });
1213
+ hideLoading();
1475
1214
  const res = JSON.parse(upRes.data);
1476
1215
  if (res.code === "200") {
1477
- await getBankCardInfo(res.result);
1216
+ const faceInfo = res.result.faceInfo || {};
1217
+ const backInfo = res.result.backInfo || {};
1218
+ result = {
1219
+ faceInfo: {
1220
+ name: allTrim(faceInfo.name || ""),
1221
+ certNo: allTrim(faceInfo.num || ""),
1222
+ address: allTrim(faceInfo.address || "")
1223
+ },
1224
+ backInfo: {
1225
+ startDate: backInfo?.startDate || "",
1226
+ endDate: backInfo?.endDate || ""
1227
+ },
1228
+ fileUploadVO: res.result.fileUploadVO || {}
1229
+ };
1230
+ console.log("===\u8BC6\u522B", result);
1231
+ if (props.side === "face" && !result.faceInfo.name && !result.faceInfo.certNo) {
1232
+ showToast({ title: "\u8BC6\u522B\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5", icon: "none" });
1233
+ }
1234
+ if (props.side === "back" && !result.backInfo?.startDate && !result.backInfo?.endDate) {
1235
+ showToast({ title: "\u8BC6\u522B\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5", icon: "none" });
1236
+ }
1478
1237
  } else {
1479
- hideLoading();
1480
1238
  showToast({
1481
1239
  title: res.msg,
1482
1240
  icon: "error"
@@ -1486,30 +1244,7 @@ var script$H = /* @__PURE__ */ defineComponent({
1486
1244
  hideLoading();
1487
1245
  console.log(err);
1488
1246
  }
1489
- }
1490
- async function getBankCardInfo(file) {
1491
- try {
1492
- const res = await $http.get("/hkbase/common/bankCard", {
1493
- fileUrl: typeof file === "string" ? file : file.originalUrl
1494
- });
1495
- hideLoading();
1496
- if (res && !res.bankCardNumber) {
1497
- $n.dialog({
1498
- title: "\u8BC6\u522B\u5931\u8D25",
1499
- message: `\u60A8\u4E0A\u4F20\u7684\u56FE\u7247\u53EF\u80FD\u4E0D\u591F\u6E05\u6670\u6216\u4E0E\u5F53\u524D\u529F\u80FD\u4E0D\u7B26\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20\u4E00\u5F20\u6E05\u6670\u3001\u5B8C\u6574\u7684\u56FE\u7247\u3002\u8C22\u8C22\uFF01`,
1500
- okText: "\u6211\u77E5\u9053\u4E86",
1501
- cancelText: ""
1502
- });
1503
- return;
1504
- }
1505
- emits("complete", {
1506
- ...res,
1507
- fileUrl: typeof file === "string" ? file : file.originalUrl,
1508
- fileKey: typeof file === "string" ? file : file.fileId
1509
- });
1510
- } catch (err) {
1511
- hideLoading();
1512
- }
1247
+ emits("complete", result);
1513
1248
  }
1514
1249
  const activeSheetVisible = ref(false);
1515
1250
  const actionSheetMenus = [
@@ -1547,7 +1282,7 @@ var script$H = /* @__PURE__ */ defineComponent({
1547
1282
  onUploadFile(csRes);
1548
1283
  }
1549
1284
  }
1550
- async function onUpload() {
1285
+ async function onPhotograph() {
1551
1286
  if (props.disabled) return;
1552
1287
  if (Taro.getEnv() === "WEB") {
1553
1288
  const csRes = await chooseMedia({
@@ -1562,9 +1297,6 @@ var script$H = /* @__PURE__ */ defineComponent({
1562
1297
  }
1563
1298
  activeSheetVisible.value = true;
1564
1299
  }
1565
- __expose({
1566
- onUpload
1567
- });
1568
1300
  return (_ctx, _cache) => {
1569
1301
  const _component_nut_action_sheet = ActionSheet;
1570
1302
  const _directive_track_click = resolveDirective("track-click");
@@ -1575,8 +1307,8 @@ var script$H = /* @__PURE__ */ defineComponent({
1575
1307
  withDirectives((openBlock(), createElementBlock(
1576
1308
  "div",
1577
1309
  {
1578
- class: normalizeClass(["ocr-bank", [__props.disabled ? "disabled" : ""]]),
1579
- onClick: _cache[0] || (_cache[0] = ($event) => !__props.customClick ? onUpload() : null)
1310
+ class: normalizeClass(["ocr-icon", [__props.disabled ? "disabled" : ""]]),
1311
+ onClick: onPhotograph
1580
1312
  },
1581
1313
  [
1582
1314
  renderSlot(_ctx.$slots, "icon", {}, () => [
@@ -1586,11 +1318,11 @@ var script$H = /* @__PURE__ */ defineComponent({
1586
1318
  2
1587
1319
  /* CLASS */
1588
1320
  )), [
1589
- [_directive_track_click, "\u94F6\u884C\u5361\u8BC6\u522B-\u70B9\u51FB"]
1321
+ [_directive_track_click, "\u8EAB\u4EFD\u8BC1\u8BC6\u522B-\u70B9\u51FB"]
1590
1322
  ]),
1591
1323
  createVNode(_component_nut_action_sheet, {
1592
1324
  visible: activeSheetVisible.value,
1593
- "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => activeSheetVisible.value = $event),
1325
+ "onUpdate:visible": _cache[0] || (_cache[0] = ($event) => activeSheetVisible.value = $event),
1594
1326
  "menu-items": actionSheetMenus,
1595
1327
  onChoose: chooseImages,
1596
1328
  "cancel-txt": "\u53D6\u6D88"
@@ -1603,26 +1335,48 @@ var script$H = /* @__PURE__ */ defineComponent({
1603
1335
  }
1604
1336
  });
1605
1337
 
1606
- script$H.__file = "src/shared/components/OcrBank.vue";
1338
+ script$G.__file = "src/shared/components/OcrIcon.vue";
1607
1339
 
1608
- var script$G = /* @__PURE__ */ defineComponent({
1340
+ var script$F = /* @__PURE__ */ defineComponent({
1609
1341
  __name: "OcrBusinessLicense",
1610
1342
  props: {
1611
- disabled: { type: Boolean, required: true, default: false },
1612
- customClick: { type: Boolean, required: false, default: false }
1343
+ disabled: { type: Boolean, required: true }
1613
1344
  },
1614
1345
  emits: ["complete"],
1615
- setup(__props, { expose: __expose, emit: __emit }) {
1346
+ setup(__props, { emit: __emit }) {
1616
1347
  const appKitOptions = useAppKitOptions();
1617
1348
  const emits = __emit;
1618
1349
  const props = __props;
1350
+ async function taroImgCompress(src, quality = 80) {
1351
+ return new Promise((resolve, reject) => {
1352
+ Taro.compressImage({
1353
+ src,
1354
+ quality,
1355
+ success: (res) => {
1356
+ resolve(res);
1357
+ },
1358
+ fail: (res) => {
1359
+ reject(res);
1360
+ }
1361
+ });
1362
+ });
1363
+ }
1364
+ function getCompressQuality(size) {
1365
+ let quality = 100;
1366
+ const curSize = size / (1024 * 1024);
1367
+ if (curSize > 6) {
1368
+ quality = quality - (curSize - 6) / curSize * 100;
1369
+ }
1370
+ return quality;
1371
+ }
1619
1372
  function allTrim(str) {
1620
1373
  return str.replace(/\s+/g, "");
1621
1374
  }
1622
- async function onUpload() {
1375
+ async function onIconClick() {
1623
1376
  if (props.disabled) {
1624
1377
  return;
1625
1378
  }
1379
+ console.log("===onIconClick");
1626
1380
  let result = null;
1627
1381
  try {
1628
1382
  const csRes = await chooseMedia({
@@ -1630,9 +1384,14 @@ var script$G = /* @__PURE__ */ defineComponent({
1630
1384
  sourceType: ["album", "camera"]
1631
1385
  });
1632
1386
  let { size, tempFilePath } = csRes.tempFiles[0];
1633
- const compressImg = await compressImage(tempFilePath, getCompressQuality(size)) || {};
1634
- const filePath = compressImg.tempFilePath;
1635
- showLoading({ title: "\u8425\u4E1A\u6267\u7167\u8BC6\u522B\u4E2D..", mask: true });
1387
+ let filePath;
1388
+ if (Taro.getEnv() !== "WEB") {
1389
+ const compressImg = await taroImgCompress(tempFilePath, getCompressQuality(size)) || {};
1390
+ filePath = compressImg.tempFilePath;
1391
+ } else {
1392
+ filePath = tempFilePath;
1393
+ }
1394
+ showLoading({ title: "\u8425\u4E1A\u6267\u7167\u8BC6\u522B\u4E2D.." });
1636
1395
  const session = appKitOptions.token();
1637
1396
  const baseUrl = appKitOptions.baseUrl();
1638
1397
  const upRes = await uploadFile({
@@ -1640,8 +1399,7 @@ var script$G = /* @__PURE__ */ defineComponent({
1640
1399
  filePath,
1641
1400
  name: "file",
1642
1401
  formData: {
1643
- objectNo: `min${Date.now()}`,
1644
- appCode: appKitOptions.app()
1402
+ objectNo: `min${Date.now()}`
1645
1403
  },
1646
1404
  header: {
1647
1405
  token: session || ""
@@ -1675,21 +1433,16 @@ var script$G = /* @__PURE__ */ defineComponent({
1675
1433
  }
1676
1434
  emits("complete", result);
1677
1435
  }
1678
- __expose({
1679
- onUpload
1680
- });
1681
1436
  return (_ctx, _cache) => {
1682
1437
  const _directive_track_click = resolveDirective("track-click");
1683
1438
  return withDirectives((openBlock(), createElementBlock(
1684
1439
  "div",
1685
1440
  {
1686
1441
  class: normalizeClass([["ocr-business-license", __props.disabled ? "disabled" : ""], "ocr-icon"]),
1687
- onClick: _cache[0] || (_cache[0] = ($event) => !__props.customClick ? onUpload() : null)
1442
+ onClick: onIconClick
1688
1443
  },
1689
1444
  [
1690
- renderSlot(_ctx.$slots, "icon", {}, () => [
1691
- createVNode(unref(NsIcon), { name: "https://cdn.ddjf.com/static/images/beidouxing/ocr-icon.png" })
1692
- ])
1445
+ createVNode(unref(NsIcon), { name: "https://cdn.ddjf.com/static/images/beidouxing/ocr-icon.png" })
1693
1446
  ],
1694
1447
  2
1695
1448
  /* CLASS */
@@ -1700,194 +1453,7 @@ var script$G = /* @__PURE__ */ defineComponent({
1700
1453
  }
1701
1454
  });
1702
1455
 
1703
- script$G.__file = "src/shared/components/OcrBusinessLicense.vue";
1704
-
1705
- var script$F = /* @__PURE__ */ defineComponent({
1706
- __name: "OcrInvoice",
1707
- props: {
1708
- disabled: { type: Boolean, required: false, default: false },
1709
- side: { type: String, required: false, default: "face" },
1710
- className: { type: String, required: false, default: "" },
1711
- customUpload: { type: Function, required: false },
1712
- uploadUrl: { type: String, required: false, default: "/hkbase/file/uploadFile" },
1713
- customClick: { type: Boolean, required: false, default: false }
1714
- },
1715
- emits: ["complete"],
1716
- setup(__props, { expose: __expose, emit: __emit }) {
1717
- const appKitOptions = useAppKitOptions();
1718
- const $http = useHttp$3(), $n = useNutshell();
1719
- const emits = __emit;
1720
- const props = __props;
1721
- async function onUploadFile(csRes) {
1722
- try {
1723
- let { path, size, tempFilePath } = csRes.tempFiles[0];
1724
- const compressImg = await compressImage(path || tempFilePath, getCompressQuality(size)) || {};
1725
- const filePath = compressImg.tempFilePath || path;
1726
- if (props.customUpload) {
1727
- props.customUpload(filePath);
1728
- return;
1729
- }
1730
- showLoading({ title: "\u53D1\u7968\u8BC6\u522B\u4E2D..", mask: true });
1731
- const session = appKitOptions.token();
1732
- const baseUrl = appKitOptions.baseUrl();
1733
- const upRes = await uploadFile({
1734
- url: `${baseUrl}${props.uploadUrl}`,
1735
- filePath,
1736
- name: "file",
1737
- formData: {
1738
- objectNo: `min${Date.now()}`,
1739
- appCode: appKitOptions.app()
1740
- },
1741
- header: {
1742
- token: session || ""
1743
- }
1744
- });
1745
- const res = JSON.parse(upRes.data);
1746
- if (res.code === "200") {
1747
- await getOcrInfo(res.result);
1748
- } else {
1749
- hideLoading();
1750
- showToast({
1751
- title: res.msg,
1752
- icon: "error"
1753
- });
1754
- }
1755
- } catch (err) {
1756
- hideLoading();
1757
- console.log(err);
1758
- }
1759
- }
1760
- async function getOcrInfo(file) {
1761
- try {
1762
- const res = await $http.get("/hkbase/common/vatInvoice", {
1763
- fileUrl: typeof file === "string" ? file : file.originalUrl,
1764
- fileType: "img"
1765
- });
1766
- hideLoading();
1767
- if (!res?.purchaserRegisterNum) {
1768
- $n.dialog({
1769
- title: "\u8BC6\u522B\u5931\u8D25",
1770
- message: `\u60A8\u4E0A\u4F20\u7684\u56FE\u7247\u53EF\u80FD\u4E0D\u591F\u6E05\u6670\u6216\u4E0E\u5F53\u524D\u529F\u80FD\u4E0D\u7B26\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20\u4E00\u5F20\u6E05\u6670\u3001\u5B8C\u6574\u7684\u56FE\u7247\u3002\u8C22\u8C22\uFF01`,
1771
- okText: "\u6211\u77E5\u9053\u4E86",
1772
- cancelText: ""
1773
- });
1774
- return;
1775
- }
1776
- emits("complete", {
1777
- invoiceDate: res?.invoiceDate,
1778
- invoiceNum: res?.invoiceNum,
1779
- invoiceNumConfirm: res?.invoiceNumConfirm,
1780
- invoiceType: res?.invoiceType,
1781
- noteDrawer: res?.noteDrawer,
1782
- purchaserBank: res?.purchaserBank,
1783
- purchaserName: res?.purchaserName,
1784
- purchaserRegisterNum: res?.purchaserRegisterNum,
1785
- remarks: res?.remarks,
1786
- sellerName: res?.sellerName,
1787
- sellerRegisterNum: res?.sellerRegisterNum,
1788
- serviceType: res?.serviceType,
1789
- totalAmount: res?.totalAmount,
1790
- totalTax: res?.totalTax,
1791
- fileUrl: typeof file === "string" ? file : file.originalUrl,
1792
- fileKey: typeof file === "string" ? file : file.fileId
1793
- });
1794
- } catch (err) {
1795
- hideLoading();
1796
- }
1797
- }
1798
- const activeSheetVisible = ref(false);
1799
- const actionSheetMenus = [
1800
- {
1801
- name: "\u62CD\u6444",
1802
- type: "camera"
1803
- },
1804
- {
1805
- name: "\u4ECE\u76F8\u518C\u9009\u62E9",
1806
- type: "album"
1807
- },
1808
- {
1809
- name: "\u4ECE\u804A\u5929\u4F1A\u8BDD\u9009\u62E9",
1810
- type: "message"
1811
- }
1812
- ];
1813
- if (Taro.getEnv() === "WEB") {
1814
- actionSheetMenus.pop();
1815
- }
1816
- async function chooseImages(item) {
1817
- if (["camera", "album"].includes(item.type)) {
1818
- const csRes = await chooseMedia({
1819
- count: 1,
1820
- sourceType: [item.type],
1821
- // "camera" | "album"
1822
- maxDuration: 60
1823
- // 使用duration属性判断是图片还是视频,图片没有该属性
1824
- });
1825
- onUploadFile(csRes);
1826
- } else {
1827
- const csRes = await chooseMessageFile({
1828
- count: 1,
1829
- type: "image"
1830
- });
1831
- onUploadFile(csRes);
1832
- }
1833
- }
1834
- async function onUpload() {
1835
- if (props.disabled) return;
1836
- if (Taro.getEnv() === "WEB") {
1837
- const csRes = await chooseMedia({
1838
- count: 1,
1839
- sourceType: ["album"],
1840
- // "camera" | "album"
1841
- maxDuration: 60
1842
- // 使用duration属性判断是图片还是视频,图片没有该属性
1843
- });
1844
- onUploadFile(csRes);
1845
- return;
1846
- }
1847
- activeSheetVisible.value = true;
1848
- }
1849
- __expose({
1850
- onUpload
1851
- });
1852
- return (_ctx, _cache) => {
1853
- const _component_nut_action_sheet = ActionSheet;
1854
- const _directive_track_click = resolveDirective("track-click");
1855
- return openBlock(), createElementBlock(
1856
- Fragment,
1857
- null,
1858
- [
1859
- withDirectives((openBlock(), createElementBlock(
1860
- "div",
1861
- {
1862
- class: normalizeClass(["ocr-invoice", [__props.disabled ? "disabled" : "", __props.className]]),
1863
- onClick: _cache[0] || (_cache[0] = ($event) => !__props.customClick ? onUpload() : null)
1864
- },
1865
- [
1866
- renderSlot(_ctx.$slots, "icon", {}, () => [
1867
- createVNode(unref(NsIcon), { name: "https://cdn.ddjf.com/static/images/beidouxing/ocr-icon.png" })
1868
- ])
1869
- ],
1870
- 2
1871
- /* CLASS */
1872
- )), [
1873
- [_directive_track_click, "\u53D1\u7968\u8BC6\u522B-\u70B9\u51FB"]
1874
- ]),
1875
- createVNode(_component_nut_action_sheet, {
1876
- visible: activeSheetVisible.value,
1877
- "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => activeSheetVisible.value = $event),
1878
- "menu-items": actionSheetMenus,
1879
- onChoose: chooseImages,
1880
- "cancel-txt": "\u53D6\u6D88"
1881
- }, null, 8, ["visible"])
1882
- ],
1883
- 64
1884
- /* STABLE_FRAGMENT */
1885
- );
1886
- };
1887
- }
1888
- });
1889
-
1890
- script$F.__file = "src/shared/components/OcrInvoice.vue";
1456
+ script$F.__file = "src/shared/components/OcrBusinessLicense.vue";
1891
1457
 
1892
1458
  var HttpMethod = /* @__PURE__ */ ((HttpMethod2) => {
1893
1459
  HttpMethod2["get"] = "GET";
@@ -1935,7 +1501,6 @@ const request = (config) => {
1935
1501
  }
1936
1502
  }).catch((e) => {
1937
1503
  console.log("request.catch===", e);
1938
- reject(e);
1939
1504
  });
1940
1505
  });
1941
1506
  };
@@ -1994,6 +1559,15 @@ function isApp() {
1994
1559
  var __defProp = Object.defineProperty;
1995
1560
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1996
1561
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
1562
+ var TrackingEventType = /* @__PURE__ */ ((TrackingEventType2) => {
1563
+ TrackingEventType2["PAGE_VIEW"] = "page_view";
1564
+ TrackingEventType2["PAGE_LEAVE"] = "page_leave";
1565
+ TrackingEventType2["APP_DEVICE_INFO"] = "app_device_info";
1566
+ TrackingEventType2["CLICK"] = "click";
1567
+ TrackingEventType2["CUSTOM"] = "custom";
1568
+ return TrackingEventType2;
1569
+ })(TrackingEventType || {});
1570
+ const { PAGE_VIEW, PAGE_LEAVE, CLICK, CUSTOM, APP_DEVICE_INFO } = TrackingEventType;
1997
1571
  const DEFAULT_CONFIG = {
1998
1572
  enabled: true,
1999
1573
  debug: false,
@@ -2443,6 +2017,7 @@ class TrackingSDK {
2443
2017
  * 发送埋点数据
2444
2018
  */
2445
2019
  async flush() {
2020
+ console.log(this.eventQueue.length, "this.eventQueue.length");
2446
2021
  if (this.eventQueue.length === 0) return;
2447
2022
  const events = [...this.eventQueue];
2448
2023
  this.eventQueue = [];
@@ -3128,11 +2703,9 @@ const endpointsList$2 = {
3128
2703
  certificateNo: params.user,
3129
2704
  accountAuthFlag: params.accountAuthFlag || false,
3130
2705
  channelCode: params.channelCode || null,
3131
- payFinishJumpUrl: params.payFinishJumpUrl || null,
3132
- useCloudBean: params.useCloudBean || false
2706
+ payFinishJumpUrl: params.payFinishJumpUrl || null
3133
2707
  }),
3134
2708
  transform: (data) => {
3135
- console.log(data, "data-----");
3136
2709
  let json = null;
3137
2710
  try {
3138
2711
  json = JSON.parse(data.prePayStr);
@@ -3200,7 +2773,6 @@ const vendor$2 = {
3200
2773
  title: data.msg,
3201
2774
  icon: "none"
3202
2775
  });
3203
- reject(data.msg);
3204
2776
  }
3205
2777
  }).catch((e) => {
3206
2778
  reject(e);
@@ -3364,8 +2936,6 @@ const requestBrandWCPayByBean = (params, Appcode = "") => {
3364
2936
  }
3365
2937
  });
3366
2938
  }
3367
- }).catch(() => {
3368
- resolve(false);
3369
2939
  });
3370
2940
  });
3371
2941
  };
@@ -3491,7 +3061,7 @@ var script$E = /* @__PURE__ */ defineComponent({
3491
3061
  const _directive_track_click = resolveDirective("track-click");
3492
3062
  return openBlock(), createElementBlock("view", _hoisted_1$B, [
3493
3063
  createElementVNode("view", _hoisted_2$r, [
3494
- createVNode(script$O, {
3064
+ createVNode(script$M, {
3495
3065
  items: amounts.value,
3496
3066
  selected: state.selected,
3497
3067
  onChange: onAmountSelect
@@ -3770,25 +3340,17 @@ const _hoisted_6$9 = {
3770
3340
  };
3771
3341
  const _hoisted_7$6 = { class: "amount" };
3772
3342
  const _hoisted_8$5 = ["src"];
3773
- const _hoisted_9$4 = {
3774
- key: 0,
3775
- class: "balance-warning"
3776
- };
3343
+ const _hoisted_9$4 = { class: "amount-footer" };
3777
3344
  const _hoisted_10$3 = {
3778
- key: 1,
3779
- class: "balance-warning-tip"
3780
- };
3781
- const _hoisted_11$3 = { class: "amount-footer" };
3782
- const _hoisted_12$3 = {
3783
3345
  key: 0,
3784
3346
  class: "agreement"
3785
3347
  };
3786
- const _hoisted_13$2 = { class: "buy-amount" };
3787
- const _hoisted_14$2 = { class: "left" };
3788
- const _hoisted_15$2 = { class: "amount" };
3348
+ const _hoisted_11$3 = { class: "buy-amount" };
3349
+ const _hoisted_12$3 = { class: "left" };
3350
+ const _hoisted_13$2 = { class: "amount" };
3351
+ const _hoisted_14$2 = { class: "item" };
3352
+ const _hoisted_15$2 = { class: "item" };
3789
3353
  const _hoisted_16$2 = { class: "item" };
3790
- const _hoisted_17$2 = { class: "item" };
3791
- const _hoisted_18$2 = { class: "item" };
3792
3354
  var script$A = /* @__PURE__ */ defineComponent({
3793
3355
  __name: "TradeView",
3794
3356
  props: {
@@ -3821,28 +3383,8 @@ var script$A = /* @__PURE__ */ defineComponent({
3821
3383
  state.selected = selected;
3822
3384
  selectBean.value = false;
3823
3385
  };
3824
- const extraPaymentAmount = computed(() => {
3825
- if (!selectBean.value || !amounts.value[state.selected]) {
3826
- return 0;
3827
- }
3828
- const paymentAmount = amounts.value[state.selected].paymentAmount || 0;
3829
- const currentBalance = balance.value || 0;
3830
- return Math.max(0, paymentAmount - currentBalance);
3831
- });
3832
3386
  const currentAmount = computed(() => {
3833
- if (!amounts.value[state.selected]) {
3834
- return 0;
3835
- }
3836
- if (selectBean.value) {
3837
- if (balance.value < amounts.value[state.selected].paymentAmount) {
3838
- return extraPaymentAmount.value;
3839
- }
3840
- return 0;
3841
- }
3842
- return amounts.value[state.selected].paymentAmount || 0;
3843
- });
3844
- const isCombinedPayment = computed(() => {
3845
- return selectBean.value && amounts.value[state.selected] && balance.value < amounts.value[state.selected].paymentAmount;
3387
+ return amounts.value[state.selected] && !selectBean.value ? amounts.value[state.selected].paymentAmount : 0;
3846
3388
  });
3847
3389
  onMounted(() => {
3848
3390
  const $http = useHttp$2({ Appcode: props.headerApp, Tenant: props.tenant });
@@ -3856,28 +3398,24 @@ var script$A = /* @__PURE__ */ defineComponent({
3856
3398
  const showDialog = ref(false);
3857
3399
  async function beanPay() {
3858
3400
  const $http = useHttp$2({ Appcode: props.headerApp, Tenant: props.tenant });
3859
- try {
3860
- const response = await $http.post(
3861
- `/payment/paymentCaseConfig/purchase/${amounts.value[state.selected].id}`
3862
- );
3401
+ $http.post(`/payment/paymentCaseConfig/purchase/${amounts.value[state.selected].id}`).then((response) => {
3863
3402
  if (response) {
3864
3403
  showDialog.value = false;
3865
3404
  emit("complete", { result: response, type: "bean" });
3866
3405
  } else {
3867
3406
  showToast({
3868
- title: response?.message || "\u652F\u4ED8\u5931\u8D25",
3407
+ title: response.message,
3869
3408
  icon: "none"
3870
3409
  });
3871
3410
  }
3872
- } catch (error) {
3873
- showToast({
3874
- title: error?.message || "\u652F\u4ED8\u5931\u8D25",
3875
- icon: "none"
3876
- });
3877
- }
3411
+ });
3878
3412
  }
3879
- function proceedWechatPayment() {
3880
- if (!state.agreed) {
3413
+ const onPayClick = () => {
3414
+ if (selectBean.value) {
3415
+ showDialog.value = true;
3416
+ return;
3417
+ }
3418
+ if (!selectBean.value && !state.agreed) {
3881
3419
  showToast({
3882
3420
  title: "\u8BF7\u52FE\u9009\u300A\u5927\u9053\u4E91\u5E73\u53F0\u4E91\u8C46\u5145\u503C\u534F\u8BAE\u300B",
3883
3421
  icon: "none"
@@ -3896,75 +3434,40 @@ var script$A = /* @__PURE__ */ defineComponent({
3896
3434
  }
3897
3435
  requestBrandWCPayByBean({
3898
3436
  caseConfigId: amounts.value[state.selected].id,
3899
- amount: currentAmount.value,
3437
+ amount: amounts.value[state.selected].paymentAmount,
3900
3438
  app: "loankitMp",
3901
3439
  tenant: props.tenant,
3902
3440
  accountAuthFlag: false,
3903
3441
  channelCode: "centergzh",
3904
3442
  payFinishJumpUrl: props.payFinishJumpUrl,
3905
- fromMini: !!params.from,
3906
- useCloudBean: isCombinedPayment.value
3443
+ fromMini: !!params.from
3907
3444
  }).then((result) => {
3445
+ console.log(result, "------requestBrandWCPay");
3908
3446
  state.buttonLoading = false;
3909
3447
  if (typeof result === "boolean" && result) {
3910
3448
  window.location.href = props.payFinishJumpUrl;
3911
3449
  } else {
3912
- emit("complete", {
3913
- result,
3914
- type: isCombinedPayment.value ? "combined" : "wePay"
3915
- });
3450
+ emit("complete", { result, type: "wePay" });
3916
3451
  }
3917
- }).catch((error) => {
3918
- state.buttonLoading = false;
3919
- showToast({
3920
- title: error.message || "\u652F\u4ED8\u5931\u8D25",
3921
- icon: "none"
3922
- });
3923
3452
  });
3924
3453
  } else {
3925
3454
  wx.login({
3926
3455
  success({ code }) {
3927
- requestPaymentByBean(
3928
- {
3929
- caseConfigId: amounts.value[state.selected].id,
3930
- amount: currentAmount.value,
3931
- app: props.app,
3932
- tenant: props.tenant,
3933
- user: code
3934
- },
3935
- props.headerApp
3936
- ).then((result) => {
3456
+ requestPaymentByBean({
3457
+ caseConfigId: amounts.value[state.selected].id,
3458
+ amount: amounts.value[state.selected].paymentAmount,
3459
+ app: props.app,
3460
+ tenant: props.tenant,
3461
+ user: code
3462
+ }, props.headerApp).then((result) => {
3937
3463
  state.buttonLoading = false;
3938
3464
  if (result) {
3939
- emit("complete", {
3940
- result: true,
3941
- type: isCombinedPayment.value ? "combined" : "wePay"
3942
- });
3465
+ emit("complete", { result: true, type: "wePay" });
3943
3466
  }
3944
- }).catch((error) => {
3945
- state.buttonLoading = false;
3946
- showToast({
3947
- title: error.message || "\u652F\u4ED8\u5931\u8D25",
3948
- icon: "none"
3949
- });
3950
- });
3951
- },
3952
- fail() {
3953
- state.buttonLoading = false;
3954
- showToast({
3955
- title: "\u767B\u5F55\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5",
3956
- icon: "none"
3957
3467
  });
3958
3468
  }
3959
3469
  });
3960
3470
  }
3961
- }
3962
- const onPayClick = () => {
3963
- if (selectBean.value && !isCombinedPayment.value) {
3964
- showDialog.value = true;
3965
- return;
3966
- }
3967
- proceedWechatPayment();
3968
3471
  };
3969
3472
  return (_ctx, _cache) => {
3970
3473
  const _component_nut_checkbox = Checkbox;
@@ -3987,28 +3490,29 @@ var script$A = /* @__PURE__ */ defineComponent({
3987
3490
  -1
3988
3491
  /* CACHED */
3989
3492
  )),
3990
- !selectBean.value || isCombinedPayment.value ? (openBlock(), createElementBlock(
3493
+ !selectBean.value ? (openBlock(), createElementBlock(
3991
3494
  "div",
3992
3495
  _hoisted_5$d,
3993
- " \u4F59\u989D " + toDisplayString(unref(formatAmount)(balance.value || 0)),
3496
+ "\u4F59\u989D " + toDisplayString(unref(formatAmount)(balance.value || 0)),
3994
3497
  1
3995
3498
  /* TEXT */
3996
3499
  )) : (openBlock(), createElementBlock(
3997
3500
  "div",
3998
3501
  _hoisted_6$9,
3999
- " \u6263\u51CF\u540E\u4F59\u989D " + toDisplayString(unref(formatAmount)(balance.value - amounts.value[state.selected].paymentAmount)),
3502
+ "\u6263\u51CF\u540E\u4F59\u989D " + toDisplayString(unref(formatAmount)(balance.value - amounts.value[state.selected].paymentAmount)),
4000
3503
  1
4001
3504
  /* TEXT */
4002
3505
  ))
4003
3506
  ]),
4004
- createElementVNode("div", {
3507
+ balance.value >= amounts.value[state.selected].paymentAmount ? (openBlock(), createElementBlock("div", {
3508
+ key: 0,
4005
3509
  class: "right",
4006
3510
  onClick: _cache[0] || (_cache[0] = ($event) => selectBean.value = !selectBean.value)
4007
3511
  }, [
4008
3512
  createElementVNode(
4009
3513
  "div",
4010
3514
  _hoisted_7$6,
4011
- " -" + toDisplayString(unref(formatAmount)(amounts.value[state.selected].paymentAmount || 0)),
3515
+ "-" + toDisplayString(unref(formatAmount)(amounts.value[state.selected].paymentAmount || 0)),
4012
3516
  1
4013
3517
  /* TEXT */
4014
3518
  ),
@@ -4016,20 +3520,12 @@ var script$A = /* @__PURE__ */ defineComponent({
4016
3520
  class: "icon",
4017
3521
  src: selectBean.value ? "https://cdn.ddjf.com/static/images/appkit/select.svg" : "https://cdn.ddjf.com/static/images/appkit/not-select.svg"
4018
3522
  }, null, 8, _hoisted_8$5)
4019
- ]),
4020
- isCombinedPayment.value ? (openBlock(), createElementBlock(
4021
- "div",
4022
- _hoisted_9$4,
4023
- " \u4E91\u8C46\u4F59\u989D\u4E0D\u8DB3,\u8FD8\u9700\u989D\u5916\u652F\u4ED8" + toDisplayString(unref(formatAmount)(extraPaymentAmount.value)) + "\u5143 ",
4024
- 1
4025
- /* TEXT */
4026
- )) : createCommentVNode("v-if", true)
3523
+ ])) : createCommentVNode("v-if", true)
4027
3524
  ])) : createCommentVNode("v-if", true),
4028
- isCombinedPayment.value ? (openBlock(), createElementBlock("div", _hoisted_10$3, " \u8BF7\u5728\u652F\u4ED8\u5B8C\u6210\u524D\u786E\u4FDD\u5143\u8C46\u4F59\u989D\u4E0D\u88AB\u6D88\u8017,\u5426\u5219\u672C\u6B21\u6743\u76CA\u53EF\u80FD\u8D2D\u4E70\u5931\u8D25 ")) : createCommentVNode("v-if", true),
4029
3525
  renderSlot(_ctx.$slots, "banner")
4030
3526
  ]),
4031
- createElementVNode("view", _hoisted_11$3, [
4032
- !selectBean.value || isCombinedPayment.value ? (openBlock(), createElementBlock("view", _hoisted_12$3, [
3527
+ createElementVNode("view", _hoisted_9$4, [
3528
+ !selectBean.value ? (openBlock(), createElementBlock("view", _hoisted_10$3, [
4033
3529
  createVNode(_component_nut_checkbox, {
4034
3530
  modelValue: state.agreed,
4035
3531
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => state.agreed = $event)
@@ -4057,14 +3553,14 @@ var script$A = /* @__PURE__ */ defineComponent({
4057
3553
  /* STABLE */
4058
3554
  }, 8, ["modelValue"])
4059
3555
  ])) : createCommentVNode("v-if", true),
4060
- createElementVNode("div", _hoisted_13$2, [
4061
- createElementVNode("div", _hoisted_14$2, [
3556
+ createElementVNode("div", _hoisted_11$3, [
3557
+ createElementVNode("div", _hoisted_12$3, [
4062
3558
  _cache[8] || (_cache[8] = createTextVNode(
4063
3559
  " \u5F85\u652F\u4ED8\uFF1A ",
4064
3560
  -1
4065
3561
  /* CACHED */
4066
3562
  )),
4067
- createElementVNode("span", _hoisted_15$2, [
3563
+ createElementVNode("span", _hoisted_13$2, [
4068
3564
  _cache[7] || (_cache[7] = createElementVNode(
4069
3565
  "i",
4070
3566
  null,
@@ -4115,22 +3611,22 @@ var script$A = /* @__PURE__ */ defineComponent({
4115
3611
  [
4116
3612
  createElementVNode(
4117
3613
  "div",
4118
- _hoisted_16$2,
4119
- " \u4E91\u8C46\u6263\u51CF\uFF1A" + toDisplayString(unref(formatAmount)(amounts.value[state.selected].paymentAmount || 0)),
3614
+ _hoisted_14$2,
3615
+ "\u4E91\u8C46\u6263\u51CF\uFF1A" + toDisplayString(unref(formatAmount)(amounts.value[state.selected].paymentAmount || 0)),
4120
3616
  1
4121
3617
  /* TEXT */
4122
3618
  ),
4123
3619
  createElementVNode(
4124
3620
  "div",
4125
- _hoisted_17$2,
4126
- " \u6743\u76CA\u589E\u52A0\uFF1A" + toDisplayString(unref(formatAmount)(amounts.value[state.selected].priceRightNum || 0)) + "\u7B14 ",
3621
+ _hoisted_15$2,
3622
+ "\u6743\u76CA\u589E\u52A0\uFF1A" + toDisplayString(unref(formatAmount)(amounts.value[state.selected].priceRightNum || 0)) + "\u7B14",
4127
3623
  1
4128
3624
  /* TEXT */
4129
3625
  ),
4130
3626
  createElementVNode(
4131
3627
  "div",
4132
- _hoisted_18$2,
4133
- " \u6263\u51CF\u540E\u4E91\u8C46\u4F59\u989D\uFF1A" + toDisplayString(unref(formatAmount)(balance.value - amounts.value[state.selected].paymentAmount)),
3628
+ _hoisted_16$2,
3629
+ "\u6263\u51CF\u540E\u4E91\u8C46\u4F59\u989D\uFF1A" + toDisplayString(unref(formatAmount)(balance.value - amounts.value[state.selected].paymentAmount)),
4134
3630
  1
4135
3631
  /* TEXT */
4136
3632
  )
@@ -4150,7 +3646,7 @@ var script$A = /* @__PURE__ */ defineComponent({
4150
3646
  script$A.__file = "src/payment/components/TradeView.vue";
4151
3647
 
4152
3648
  const components = {
4153
- AmountPicker: script$O,
3649
+ AmountPicker: script$M,
4154
3650
  RechargeView: script$E,
4155
3651
  UserAgreement: script$D,
4156
3652
  RechargeResult: script$C,
@@ -4261,7 +3757,7 @@ var script$z = /* @__PURE__ */ defineComponent({
4261
3757
  ])
4262
3758
  ])
4263
3759
  ]),
4264
- createCommentVNode(' <div class="line"></div>\n <div class="card-row">\n <div class="card-row-left desc">\u6743\u76CA\u4F7F\u7528\u65F6\u81EA\u52A8\u6263\u51CF\u4E91\u8C46</div>\n <div class="card-row-right">\n <div class="pay" v-track-click @click="gotoRecharge">\n <div>\u5145\u503C</div>\n <img\n class="pay-icon"\n src="https://cdn.ddjf.com/static/images/bpms-workBench/bean-right.png"\n />\n </div>\n </div>\n </div> ')
3760
+ createCommentVNode(' <div class="line"></div>\r\n <div class="card-row">\r\n <div class="card-row-left desc">\u6743\u76CA\u4F7F\u7528\u65F6\u81EA\u52A8\u6263\u51CF\u4E91\u8C46</div>\r\n <div class="card-row-right">\r\n <div class="pay" v-track-click @click="gotoRecharge">\r\n <div>\u5145\u503C</div>\r\n <img\r\n class="pay-icon"\r\n src="https://cdn.ddjf.com/static/images/bpms-workBench/bean-right.png"\r\n />\r\n </div>\r\n </div>\r\n </div> ')
4265
3761
  ])
4266
3762
  ]);
4267
3763
  };
@@ -4968,7 +4464,7 @@ var script$t = /* @__PURE__ */ defineComponent({
4968
4464
  [
4969
4465
  createElementVNode("div", _hoisted_1$q, [
4970
4466
  createElementVNode("div", _hoisted_2$k, [
4971
- createVNode(unref(script$N), {
4467
+ createVNode(unref(script$L), {
4972
4468
  title: unref(Taro).getEnv() !== "WEB" ? "\u6211\u7684\u8D26\u6237" : "",
4973
4469
  class: normalizeClass({ "with-background": scrolled.value > 0 }),
4974
4470
  onClose: onPageHeaderClose
@@ -5273,7 +4769,7 @@ var script$t = /* @__PURE__ */ defineComponent({
5273
4769
  _: 1
5274
4770
  /* STABLE */
5275
4771
  }, 8, ["visible"]),
5276
- createVNode(unref(script$M), {
4772
+ createVNode(unref(script$K), {
5277
4773
  modelValue: secondBalanceOpen.value,
5278
4774
  "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => secondBalanceOpen.value = $event),
5279
4775
  title: "\u6536\u652F\u660E\u7EC6"
@@ -6642,10 +6138,7 @@ var script$k = /* @__PURE__ */ defineComponent({
6642
6138
  ), [
6643
6139
  [vModelText, formState.name]
6644
6140
  ]),
6645
- createVNode(script$I, {
6646
- "has-upload-vo": false,
6647
- onComplete: onOCRInfo
6648
- }, {
6141
+ createVNode(script$G, { onComplete: onOCRInfo }, {
6649
6142
  icon: withCtx(() => [..._cache[9] || (_cache[9] = [
6650
6143
  createElementVNode(
6651
6144
  "img",
@@ -7091,7 +6584,7 @@ var script$i = /* @__PURE__ */ defineComponent({
7091
6584
  emits: ["detail", "close", "view", "popup", "hasBanner"],
7092
6585
  setup(__props, { emit: __emit }) {
7093
6586
  const props = __props;
7094
- const { toReadFun, noticeClick } = useNotice();
6587
+ const { noticeClick } = useNotice();
7095
6588
  const bannerMessages = ref([]);
7096
6589
  const popMessages = ref([]);
7097
6590
  const activeKey = ref(0);
@@ -7216,7 +6709,7 @@ var script$i = /* @__PURE__ */ defineComponent({
7216
6709
  Fragment,
7217
6710
  null,
7218
6711
  renderList(bannerMessages.value, (item, key) => {
7219
- return withDirectives((openBlock(), createBlock(script$K, {
6712
+ return withDirectives((openBlock(), createBlock(script$I, {
7220
6713
  class: normalizeClass({ show: key === activeKey.value }),
7221
6714
  key,
7222
6715
  showClose: item.noticeType === 0,
@@ -7487,8 +6980,7 @@ function useCommonList(api, query, loading = true, method = "GET") {
7487
6980
  const isLoading = ref(false);
7488
6981
  async function fetchData(loading2) {
7489
6982
  loading2 && showLoading({
7490
- title: "\u52A0\u8F7D\u4E2D...",
7491
- mask: true
6983
+ title: "\u52A0\u8F7D\u4E2D..."
7492
6984
  });
7493
6985
  isLoading.value = true;
7494
6986
  const $http = useHttp$1();
@@ -7890,8 +7382,7 @@ var script$e = /* @__PURE__ */ defineComponent({
7890
7382
  async function readAll() {
7891
7383
  try {
7892
7384
  showLoading({
7893
- title: "\u8BF7\u7A0D\u540E...",
7894
- mask: true
7385
+ title: "\u8BF7\u7A0D\u540E..."
7895
7386
  });
7896
7387
  const appkitOptions = useAppKitOptions();
7897
7388
  const ep = endpoints["\u5168\u90E8\u5DF2\u8BFB"];
@@ -7906,7 +7397,9 @@ var script$e = /* @__PURE__ */ defineComponent({
7906
7397
  });
7907
7398
  });
7908
7399
  } finally {
7909
- getNotice();
7400
+ setTimeout(() => {
7401
+ getNotice();
7402
+ }, 300);
7910
7403
  hideLoading();
7911
7404
  }
7912
7405
  }
@@ -7939,7 +7432,7 @@ var script$e = /* @__PURE__ */ defineComponent({
7939
7432
  class: normalizeClass(["tabContainer", { inH5: unref(isWeb)() }])
7940
7433
  },
7941
7434
  [
7942
- createCommentVNode(' <ns-tabs\n v-model="state.tab"\n fill="#fff"\n square\n size="xl"\n style="height: 46px"\n @change="onTabChange"\n >\n <ns-tabs-item key="\u5168\u90E8" tab="\u5168\u90E8"></ns-tabs-item>\n <ns-tabs-item key="\u4E1A\u52A1\u6D88\u606F" tab="\u4E1A\u52A1\u6D88\u606F"></ns-tabs-item>\n <ns-tabs-item key="\u7CFB\u7EDF\u516C\u544A" tab="\u7CFB\u7EDF\u516C\u544A"></ns-tabs-item>\n <ns-tabs-item key="\u672A\u8BFB" tab="\u672A\u8BFB"></ns-tabs-item>\n </ns-tabs> '),
7435
+ createCommentVNode(' <ns-tabs\r\n v-model="state.tab"\r\n fill="#fff"\r\n square\r\n size="xl"\r\n style="height: 46px"\r\n @change="onTabChange"\r\n >\r\n <ns-tabs-item key="\u5168\u90E8" tab="\u5168\u90E8"></ns-tabs-item>\r\n <ns-tabs-item key="\u4E1A\u52A1\u6D88\u606F" tab="\u4E1A\u52A1\u6D88\u606F"></ns-tabs-item>\r\n <ns-tabs-item key="\u7CFB\u7EDF\u516C\u544A" tab="\u7CFB\u7EDF\u516C\u544A"></ns-tabs-item>\r\n <ns-tabs-item key="\u672A\u8BFB" tab="\u672A\u8BFB"></ns-tabs-item>\r\n </ns-tabs> '),
7943
7436
  createVNode(unref(NsTabs), {
7944
7437
  modelValue: state.tab,
7945
7438
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => state.tab = $event),
@@ -8525,8 +8018,7 @@ var script$b = /* @__PURE__ */ defineComponent({
8525
8018
  }
8526
8019
  async function updateImage(filePath) {
8527
8020
  showLoading({
8528
- title: "\u4E0A\u4F20\u4E2D...",
8529
- mask: true
8021
+ title: "\u4E0A\u4F20\u4E2D..."
8530
8022
  });
8531
8023
  const appkitOptions = useAppKitOptions();
8532
8024
  const $http = useHttp();
@@ -10502,8 +9994,7 @@ var script$6 = /* @__PURE__ */ defineComponent({
10502
9994
  const $http = useHttp();
10503
9995
  const appkitOptions = useAppKitOptions();
10504
9996
  showLoading({
10505
- title: "\u53CD\u9988\u4E2D...",
10506
- mask: true
9997
+ title: "\u53CD\u9988\u4E2D..."
10507
9998
  });
10508
9999
  const attachment = JSON.parse(
10509
10000
  JSON.stringify(
@@ -11213,9 +10704,8 @@ var script$2 = /* @__PURE__ */ defineComponent({
11213
10704
  rules: ["required"]
11214
10705
  }, {
11215
10706
  append: withCtx(() => [
11216
- !\u5DF2\u8BA4\u8BC1.value ? (openBlock(), createBlock(unref(script$I), {
10707
+ !\u5DF2\u8BA4\u8BC1.value ? (openBlock(), createBlock(unref(script$G), {
11217
10708
  key: 0,
11218
- "has-upload-vo": false,
11219
10709
  onComplete: onOcrComplete
11220
10710
  })) : createCommentVNode("v-if", true)
11221
10711
  ]),
@@ -11824,4 +11314,4 @@ const AppKit = {
11824
11314
  }
11825
11315
  };
11826
11316
 
11827
- export { script$t as AccountView, script$O as AmountPicker, script$M as AppDrawer, script$L as AppVerify, script$z as BalanceCard, script$s as BalanceReminder, script$r as DateRange, script$J as DeviceVersion, script$p as ListFilter, script$4 as LoginSetting, script$i as NoticeBanner, script$h as NoticeEntry, script$f as NoticeList, script$e as NoticeList2, script$H as OcrBank, script$G as OcrBusinessLicense, script$I as OcrIcon, script$F as OcrInvoice, script$N as PageHeader, script$o as PromoterCard, script$C as RechargeResult, script$E as RechargeView, script$k as SelfRegistration, script as SharePoster, script$A as TradeView, script$D as UserAgreement, script$2 as UserAuth, script$a as UserBinding, script$9 as UserBindingSuccess, script$d as UserEntry, script$6 as UserFeedback, script$5 as UserFeedbackEntry, script$7 as UserHeadCrop, script$b as UserInfo, script$3 as UserResourceEmpty, components, compressImage, compressImageWithCanvas, createHttp, AppKit as default, defaultCryptoConfig, generateUniqueId, getCompressQuality, getSdkConfig, initTracking, installTrackingPlugin, jssdkServices, requestPayment$2 as requestPayment, requestWxH5Pay, services$1 as services, trackingSDK, useAppKit, useCountdown, useCrypto, useEncode, useLogger, usePageTracking, useSafeArea, useTabbar, useUpload, useValidator, useWxAuth };
11317
+ export { script$t as AccountView, script$M as AmountPicker, script$K as AppDrawer, script$J as AppVerify, script$z as BalanceCard, script$s as BalanceReminder, script$r as DateRange, script$H as DeviceVersion, script$p as ListFilter, script$4 as LoginSetting, script$i as NoticeBanner, script$h as NoticeEntry, script$f as NoticeList, script$e as NoticeList2, script$F as OcrBusinessLicense, script$G as OcrIcon, script$L as PageHeader, script$o as PromoterCard, script$C as RechargeResult, script$E as RechargeView, script$k as SelfRegistration, script as SharePoster, script$A as TradeView, script$D as UserAgreement, script$2 as UserAuth, script$a as UserBinding, script$9 as UserBindingSuccess, script$d as UserEntry, script$6 as UserFeedback, script$5 as UserFeedbackEntry, script$7 as UserHeadCrop, script$b as UserInfo, script$3 as UserResourceEmpty, components, createHttp, AppKit as default, defaultCryptoConfig, generateUniqueId, getSdkConfig, initTracking, installTrackingPlugin, jssdkServices, requestPayment$2 as requestPayment, requestWxH5Pay, services$1 as services, trackingSDK, useAppKit, useCountdown, useCrypto, useEncode, useLogger, usePageTracking, useSafeArea, useTabbar, useUpload, useValidator, useWxAuth };