@uxda/appkit 4.3.2 → 4.3.4

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
@@ -4,12 +4,12 @@ import '@nutui/nutui-taro/dist/packages/checkbox/style/css';
4
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';
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, 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';
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';
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, NsIcon, usePopup, useNutshell, NsButtonGroup, usePaging, NsPage, NsTabs, NsTabsItem, NsPageContent, NsSkeleton, NsRepeator, NsCard, NsEmpty, NsCheckbox } from '@uxda/nutshell/taro';
12
+ import { NsForm, NsInput, NsButton, useNutshell, NsIcon, usePopup, 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$M = /* @__PURE__ */ defineComponent({
37
+ var script$O = /* @__PURE__ */ defineComponent({
38
38
  __name: "AmountPicker",
39
39
  props: {
40
40
  items: { type: Array, required: true, default: () => [] },
@@ -107,7 +107,7 @@ var script$M = /* @__PURE__ */ defineComponent({
107
107
  }
108
108
  });
109
109
 
110
- script$M.__file = "src/payment/components/AmountPicker.vue";
110
+ script$O.__file = "src/payment/components/AmountPicker.vue";
111
111
 
112
112
  const getSdkConfig = (appCode, url) => {
113
113
  return new Promise((resolve, reject) => {
@@ -310,71 +310,84 @@ function useEncode() {
310
310
  };
311
311
  }
312
312
 
313
- const globalData = {};
314
-
315
- const appKitOptions = {
316
- app: () => "",
317
- tenant: () => "",
318
- token: () => "",
319
- tempToken: () => "",
320
- baseUrl: () => "",
321
- 401() {
322
- },
323
- gray: () => ""
324
- };
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]));
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
+ });
343
358
  };
344
- const useUpload = (config) => {
345
- const appkitOptions = useAppKitOptions();
346
- const upload = (url, file) => {
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 {
347
369
  return new Promise((resolve, reject) => {
348
- uploadFile({
349
- url: config.baseUrl + url,
350
- filePath: file.path,
351
- name: "file",
352
- formData: {
353
- objectNo: `min${Date.now()}`
354
- },
355
- header: {
356
- ...config.headers,
357
- token: appkitOptions.tempToken() || appkitOptions.token()
370
+ Taro.compressImage({
371
+ src,
372
+ quality,
373
+ success: (res) => {
374
+ resolve(res);
358
375
  },
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
- }
376
+ fail: (res) => {
377
+ reject(res);
370
378
  }
371
379
  });
372
380
  });
373
- };
374
- return {
375
- upload
376
- };
377
- };
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
+ }
378
391
 
379
392
  const defaultCryptoConfig = {
380
393
  maskField: "mask",
@@ -415,6 +428,25 @@ function useCrypto(config) {
415
428
  };
416
429
  }
417
430
 
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
+
418
450
  const defaultLogOptions = {
419
451
  projectName: "ddyk-dev",
420
452
  logStore: "ddjf-internet-web",
@@ -548,11 +580,59 @@ function useWxAuth() {
548
580
  };
549
581
  }
550
582
 
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
+
551
631
  const _hoisted_1$F = {
552
632
  key: 0,
553
633
  class: "page-title"
554
634
  };
555
- var script$L = /* @__PURE__ */ defineComponent({
635
+ var script$N = /* @__PURE__ */ defineComponent({
556
636
  __name: "PageHeader",
557
637
  props: {
558
638
  title: { type: String, required: false, default: "" },
@@ -609,10 +689,10 @@ var script$L = /* @__PURE__ */ defineComponent({
609
689
  }
610
690
  });
611
691
 
612
- script$L.__file = "src/shared/components/PageHeader.vue";
692
+ script$N.__file = "src/shared/components/PageHeader.vue";
613
693
 
614
694
  const _hoisted_1$E = { class: "drawer-body" };
615
- var script$K = /* @__PURE__ */ defineComponent({
695
+ var script$M = /* @__PURE__ */ defineComponent({
616
696
  __name: "AppDrawer",
617
697
  props: {
618
698
  modelValue: { type: Boolean, required: true },
@@ -636,7 +716,7 @@ var script$K = /* @__PURE__ */ defineComponent({
636
716
  "onUpdate:visible": onVisibleChange
637
717
  }, {
638
718
  default: withCtx(() => [
639
- createVNode(script$L, {
719
+ createVNode(script$N, {
640
720
  title: __props.title,
641
721
  style: normalizeStyle(unref(Taro).getEnv() !== "WEB" ? "" : "--height: 40px"),
642
722
  onClose: onPageHeaderClose
@@ -652,18 +732,18 @@ var script$K = /* @__PURE__ */ defineComponent({
652
732
  }
653
733
  });
654
734
 
655
- script$K.__file = "src/shared/components/AppDrawer.vue";
735
+ script$M.__file = "src/shared/components/AppDrawer.vue";
656
736
 
657
737
  const _hoisted_1$D = { class: "app-verify column" };
658
738
  const _hoisted_2$s = { class: "caption" };
659
739
  const _hoisted_3$m = { class: "number" };
660
- const _hoisted_4$h = { class: "form-btn" };
661
- const _hoisted_5$d = {
740
+ const _hoisted_4$i = { class: "form-btn" };
741
+ const _hoisted_5$e = {
662
742
  key: 1,
663
743
  class: "caption"
664
744
  };
665
745
  const _hoisted_6$a = { class: "row buttons" };
666
- var script$J = /* @__PURE__ */ defineComponent({
746
+ var script$L = /* @__PURE__ */ defineComponent({
667
747
  __name: "AppVerify",
668
748
  props: {
669
749
  phone: { type: String, required: true },
@@ -738,7 +818,7 @@ var script$J = /* @__PURE__ */ defineComponent({
738
818
  method: (value) => value.length === 6
739
819
  }]
740
820
  }, null, 8, ["modelValue", "rules"]),
741
- createElementVNode("div", _hoisted_4$h, [
821
+ createElementVNode("div", _hoisted_4$i, [
742
822
  !sent.value ? withDirectives((openBlock(), createBlock(
743
823
  unref(NsButton),
744
824
  {
@@ -757,7 +837,7 @@ var script$J = /* @__PURE__ */ defineComponent({
757
837
  ]) : createCommentVNode("v-if", true),
758
838
  sent.value ? (openBlock(), createElementBlock(
759
839
  "div",
760
- _hoisted_5$d,
840
+ _hoisted_5$e,
761
841
  toDisplayString(countdown.value) + "s\u540E\u91CD\u65B0\u53D1\u9001",
762
842
  1
763
843
  /* TEXT */
@@ -770,6 +850,7 @@ var script$J = /* @__PURE__ */ defineComponent({
770
850
  createElementVNode("div", _hoisted_6$a, [
771
851
  withDirectives((openBlock(), createBlock(unref(NsButton), {
772
852
  class: "cancel-btn",
853
+ r: 20,
773
854
  onClick: _cache[2] || (_cache[2] = ($event) => emits("cancel"))
774
855
  }, {
775
856
  default: withCtx(() => [..._cache[3] || (_cache[3] = [
@@ -786,6 +867,7 @@ var script$J = /* @__PURE__ */ defineComponent({
786
867
  ]),
787
868
  withDirectives((openBlock(), createBlock(unref(NsButton), {
788
869
  color: "primary",
870
+ r: 20,
789
871
  onClick: onOk
790
872
  }, {
791
873
  default: withCtx(() => [..._cache[4] || (_cache[4] = [
@@ -806,10 +888,10 @@ var script$J = /* @__PURE__ */ defineComponent({
806
888
  }
807
889
  });
808
890
 
809
- script$J.__file = "src/shared/components/AppVerify.vue";
891
+ script$L.__file = "src/shared/components/AppVerify.vue";
810
892
 
811
893
  const _hoisted_1$C = { key: 0 };
812
- var script$I = /* @__PURE__ */ defineComponent({
894
+ var script$K = /* @__PURE__ */ defineComponent({
813
895
  __name: "index",
814
896
  props: {
815
897
  text: { type: String, required: false },
@@ -876,7 +958,7 @@ var script$I = /* @__PURE__ */ defineComponent({
876
958
  }
877
959
  });
878
960
 
879
- script$I.__file = "src/components/dd-notice-bar/index.vue";
961
+ script$K.__file = "src/components/dd-notice-bar/index.vue";
880
962
 
881
963
  const typeMappings = {
882
964
  CZ: "\u5145\u503C",
@@ -1081,7 +1163,7 @@ function useHttp$3() {
1081
1163
  return $http;
1082
1164
  }
1083
1165
 
1084
- var script$H = /* @__PURE__ */ defineComponent({
1166
+ var script$J = /* @__PURE__ */ defineComponent({
1085
1167
  __name: "DeviceVersion",
1086
1168
  props: {
1087
1169
  versions: { type: String, required: false, default: "{}" }
@@ -1128,7 +1210,7 @@ var script$H = /* @__PURE__ */ defineComponent({
1128
1210
  }
1129
1211
  });
1130
1212
  return (_ctx, _cache) => {
1131
- return showAlert.value ? (openBlock(), createBlock(script$I, {
1213
+ return showAlert.value ? (openBlock(), createBlock(script$K, {
1132
1214
  key: 0,
1133
1215
  showClose: "",
1134
1216
  style: normalizeStyle(topStype.value),
@@ -1139,102 +1221,262 @@ var script$H = /* @__PURE__ */ defineComponent({
1139
1221
  }
1140
1222
  });
1141
1223
 
1142
- script$H.__file = "src/shared/components/DeviceVersion.vue";
1224
+ script$J.__file = "src/shared/components/DeviceVersion.vue";
1143
1225
 
1144
- var script$G = /* @__PURE__ */ defineComponent({
1226
+ var script$I = /* @__PURE__ */ defineComponent({
1145
1227
  __name: "OcrIcon",
1146
1228
  props: {
1147
1229
  disabled: { type: Boolean, required: false, default: false },
1148
1230
  side: { type: String, required: false, default: "face" },
1149
- class: { type: String, required: false, default: "" }
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 }
1150
1236
  },
1151
1237
  emits: ["complete"],
1152
- setup(__props, { emit: __emit }) {
1238
+ setup(__props, { expose: __expose, emit: __emit }) {
1153
1239
  const appKitOptions = useAppKitOptions();
1240
+ const $http = useHttp$3(), $n = useNutshell();
1154
1241
  const emits = __emit;
1155
1242
  const props = __props;
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);
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" });
1169
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" });
1295
+ }
1296
+ } else {
1297
+ await getOcrInfo(res.result);
1298
+ }
1299
+ } else {
1300
+ hideLoading();
1301
+ showToast({
1302
+ title: res.msg,
1303
+ icon: "error"
1170
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?.startDate) {
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
+ });
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
+ }
1171
1342
  });
1343
+ } catch (err) {
1344
+ hideLoading();
1172
1345
  }
1173
1346
  }
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;
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"
1179
1360
  }
1180
- return quality;
1361
+ ];
1362
+ if (Taro.getEnv() === "WEB") {
1363
+ actionSheetMenus.pop();
1181
1364
  }
1182
- function allTrim(str) {
1183
- return str.replace(/\s+/g, "");
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
+ }
1184
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;
1185
1455
  async function onUploadFile(csRes) {
1186
- let result = null;
1187
1456
  try {
1188
- console.log("===\u4E0A\u4F20", csRes);
1189
1457
  let { path, size, tempFilePath } = csRes.tempFiles[0];
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.." });
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 });
1199
1461
  const session = appKitOptions.token();
1200
1462
  const baseUrl = appKitOptions.baseUrl();
1201
1463
  const upRes = await uploadFile({
1202
- url: baseUrl + "/hkapprove/ocr/idcard",
1464
+ url: baseUrl + props.uploadUrl,
1203
1465
  filePath,
1204
1466
  name: "file",
1205
1467
  formData: {
1206
1468
  objectNo: `min${Date.now()}`,
1207
- side: props.side
1469
+ appCode: appKitOptions.app()
1208
1470
  },
1209
1471
  header: {
1210
1472
  token: session || ""
1211
1473
  }
1212
1474
  });
1213
- hideLoading();
1214
1475
  const res = JSON.parse(upRes.data);
1215
1476
  if (res.code === "200") {
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
- }
1477
+ await getBankCardInfo(res.result);
1237
1478
  } else {
1479
+ hideLoading();
1238
1480
  showToast({
1239
1481
  title: res.msg,
1240
1482
  icon: "error"
@@ -1244,7 +1486,30 @@ var script$G = /* @__PURE__ */ defineComponent({
1244
1486
  hideLoading();
1245
1487
  console.log(err);
1246
1488
  }
1247
- emits("complete", result);
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
+ }
1248
1513
  }
1249
1514
  const activeSheetVisible = ref(false);
1250
1515
  const actionSheetMenus = [
@@ -1282,7 +1547,7 @@ var script$G = /* @__PURE__ */ defineComponent({
1282
1547
  onUploadFile(csRes);
1283
1548
  }
1284
1549
  }
1285
- async function onPhotograph() {
1550
+ async function onUpload() {
1286
1551
  if (props.disabled) return;
1287
1552
  if (Taro.getEnv() === "WEB") {
1288
1553
  const csRes = await chooseMedia({
@@ -1297,6 +1562,9 @@ var script$G = /* @__PURE__ */ defineComponent({
1297
1562
  }
1298
1563
  activeSheetVisible.value = true;
1299
1564
  }
1565
+ __expose({
1566
+ onUpload
1567
+ });
1300
1568
  return (_ctx, _cache) => {
1301
1569
  const _component_nut_action_sheet = ActionSheet;
1302
1570
  const _directive_track_click = resolveDirective("track-click");
@@ -1307,8 +1575,8 @@ var script$G = /* @__PURE__ */ defineComponent({
1307
1575
  withDirectives((openBlock(), createElementBlock(
1308
1576
  "div",
1309
1577
  {
1310
- class: normalizeClass(["ocr-icon", [__props.disabled ? "disabled" : ""]]),
1311
- onClick: onPhotograph
1578
+ class: normalizeClass(["ocr-bank", [__props.disabled ? "disabled" : ""]]),
1579
+ onClick: _cache[0] || (_cache[0] = ($event) => !__props.customClick ? onUpload() : null)
1312
1580
  },
1313
1581
  [
1314
1582
  renderSlot(_ctx.$slots, "icon", {}, () => [
@@ -1318,11 +1586,11 @@ var script$G = /* @__PURE__ */ defineComponent({
1318
1586
  2
1319
1587
  /* CLASS */
1320
1588
  )), [
1321
- [_directive_track_click, "\u8EAB\u4EFD\u8BC1\u8BC6\u522B-\u70B9\u51FB"]
1589
+ [_directive_track_click, "\u94F6\u884C\u5361\u8BC6\u522B-\u70B9\u51FB"]
1322
1590
  ]),
1323
1591
  createVNode(_component_nut_action_sheet, {
1324
1592
  visible: activeSheetVisible.value,
1325
- "onUpdate:visible": _cache[0] || (_cache[0] = ($event) => activeSheetVisible.value = $event),
1593
+ "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => activeSheetVisible.value = $event),
1326
1594
  "menu-items": actionSheetMenus,
1327
1595
  onChoose: chooseImages,
1328
1596
  "cancel-txt": "\u53D6\u6D88"
@@ -1335,48 +1603,26 @@ var script$G = /* @__PURE__ */ defineComponent({
1335
1603
  }
1336
1604
  });
1337
1605
 
1338
- script$G.__file = "src/shared/components/OcrIcon.vue";
1606
+ script$H.__file = "src/shared/components/OcrBank.vue";
1339
1607
 
1340
- var script$F = /* @__PURE__ */ defineComponent({
1608
+ var script$G = /* @__PURE__ */ defineComponent({
1341
1609
  __name: "OcrBusinessLicense",
1342
1610
  props: {
1343
- disabled: { type: Boolean, required: true }
1611
+ disabled: { type: Boolean, required: true, default: false },
1612
+ customClick: { type: Boolean, required: false, default: false }
1344
1613
  },
1345
1614
  emits: ["complete"],
1346
- setup(__props, { emit: __emit }) {
1615
+ setup(__props, { expose: __expose, emit: __emit }) {
1347
1616
  const appKitOptions = useAppKitOptions();
1348
1617
  const emits = __emit;
1349
1618
  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
- }
1372
1619
  function allTrim(str) {
1373
1620
  return str.replace(/\s+/g, "");
1374
1621
  }
1375
- async function onIconClick() {
1622
+ async function onUpload() {
1376
1623
  if (props.disabled) {
1377
1624
  return;
1378
1625
  }
1379
- console.log("===onIconClick");
1380
1626
  let result = null;
1381
1627
  try {
1382
1628
  const csRes = await chooseMedia({
@@ -1384,14 +1630,9 @@ var script$F = /* @__PURE__ */ defineComponent({
1384
1630
  sourceType: ["album", "camera"]
1385
1631
  });
1386
1632
  let { size, tempFilePath } = csRes.tempFiles[0];
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.." });
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 });
1395
1636
  const session = appKitOptions.token();
1396
1637
  const baseUrl = appKitOptions.baseUrl();
1397
1638
  const upRes = await uploadFile({
@@ -1399,7 +1640,8 @@ var script$F = /* @__PURE__ */ defineComponent({
1399
1640
  filePath,
1400
1641
  name: "file",
1401
1642
  formData: {
1402
- objectNo: `min${Date.now()}`
1643
+ objectNo: `min${Date.now()}`,
1644
+ appCode: appKitOptions.app()
1403
1645
  },
1404
1646
  header: {
1405
1647
  token: session || ""
@@ -1433,16 +1675,21 @@ var script$F = /* @__PURE__ */ defineComponent({
1433
1675
  }
1434
1676
  emits("complete", result);
1435
1677
  }
1678
+ __expose({
1679
+ onUpload
1680
+ });
1436
1681
  return (_ctx, _cache) => {
1437
1682
  const _directive_track_click = resolveDirective("track-click");
1438
1683
  return withDirectives((openBlock(), createElementBlock(
1439
1684
  "div",
1440
1685
  {
1441
1686
  class: normalizeClass([["ocr-business-license", __props.disabled ? "disabled" : ""], "ocr-icon"]),
1442
- onClick: onIconClick
1687
+ onClick: _cache[0] || (_cache[0] = ($event) => !__props.customClick ? onUpload() : null)
1443
1688
  },
1444
1689
  [
1445
- createVNode(unref(NsIcon), { name: "https://cdn.ddjf.com/static/images/beidouxing/ocr-icon.png" })
1690
+ renderSlot(_ctx.$slots, "icon", {}, () => [
1691
+ createVNode(unref(NsIcon), { name: "https://cdn.ddjf.com/static/images/beidouxing/ocr-icon.png" })
1692
+ ])
1446
1693
  ],
1447
1694
  2
1448
1695
  /* CLASS */
@@ -1453,7 +1700,194 @@ var script$F = /* @__PURE__ */ defineComponent({
1453
1700
  }
1454
1701
  });
1455
1702
 
1456
- script$F.__file = "src/shared/components/OcrBusinessLicense.vue";
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";
1457
1891
 
1458
1892
  var HttpMethod = /* @__PURE__ */ ((HttpMethod2) => {
1459
1893
  HttpMethod2["get"] = "GET";
@@ -2009,7 +2443,6 @@ class TrackingSDK {
2009
2443
  * 发送埋点数据
2010
2444
  */
2011
2445
  async flush() {
2012
- console.log(this.eventQueue.length, "this.eventQueue.length");
2013
2446
  if (this.eventQueue.length === 0) return;
2014
2447
  const events = [...this.eventQueue];
2015
2448
  this.eventQueue = [];
@@ -2961,7 +3394,7 @@ const isIOS = () => {
2961
3394
  const _hoisted_1$B = { class: "view recharge-view" };
2962
3395
  const _hoisted_2$r = { class: "flex-grow" };
2963
3396
  const _hoisted_3$l = { class: "amount-footer" };
2964
- const _hoisted_4$g = { class: "agreement" };
3397
+ const _hoisted_4$h = { class: "agreement" };
2965
3398
  var script$E = /* @__PURE__ */ defineComponent({
2966
3399
  __name: "RechargeView",
2967
3400
  props: {
@@ -3058,14 +3491,14 @@ var script$E = /* @__PURE__ */ defineComponent({
3058
3491
  const _directive_track_click = resolveDirective("track-click");
3059
3492
  return openBlock(), createElementBlock("view", _hoisted_1$B, [
3060
3493
  createElementVNode("view", _hoisted_2$r, [
3061
- createVNode(script$M, {
3494
+ createVNode(script$O, {
3062
3495
  items: amounts.value,
3063
3496
  selected: state.selected,
3064
3497
  onChange: onAmountSelect
3065
3498
  }, null, 8, ["items", "selected"])
3066
3499
  ]),
3067
3500
  createElementVNode("view", _hoisted_3$l, [
3068
- createElementVNode("view", _hoisted_4$g, [
3501
+ createElementVNode("view", _hoisted_4$h, [
3069
3502
  createVNode(_component_nut_checkbox, {
3070
3503
  modelValue: state.agreed,
3071
3504
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => state.agreed = $event)
@@ -3138,7 +3571,7 @@ const _hoisted_3$k = {
3138
3571
  key: 0,
3139
3572
  class: "caption"
3140
3573
  };
3141
- const _hoisted_4$f = {
3574
+ const _hoisted_4$g = {
3142
3575
  key: 1,
3143
3576
  class: "caption"
3144
3577
  };
@@ -3179,7 +3612,7 @@ var script$C = /* @__PURE__ */ defineComponent({
3179
3612
  ),
3180
3613
  __props.payMethod == "bean" ? (openBlock(), createElementBlock("div", _hoisted_3$k, "\u6743\u76CA\u5DF2\u5230\u8D26")) : (openBlock(), createElementBlock(
3181
3614
  "div",
3182
- _hoisted_4$f,
3615
+ _hoisted_4$g,
3183
3616
  toDisplayString(views[__props.type][1]) + "\u5C06\u57281\u5206\u949F\u4E4B\u5185\u5230\u8D26",
3184
3617
  1
3185
3618
  /* TEXT */
@@ -3326,8 +3759,8 @@ const _hoisted_3$i = {
3326
3759
  key: 0,
3327
3760
  class: "bean-buy"
3328
3761
  };
3329
- const _hoisted_4$e = { class: "left" };
3330
- const _hoisted_5$c = {
3762
+ const _hoisted_4$f = { class: "left" };
3763
+ const _hoisted_5$d = {
3331
3764
  key: 0,
3332
3765
  class: "amount"
3333
3766
  };
@@ -3546,7 +3979,7 @@ var script$A = /* @__PURE__ */ defineComponent({
3546
3979
  onChange: onAmountSelect
3547
3980
  }, null, 8, ["items", "selected"]),
3548
3981
  amounts.value[state.selected] ? (openBlock(), createElementBlock("div", _hoisted_3$i, [
3549
- createElementVNode("div", _hoisted_4$e, [
3982
+ createElementVNode("div", _hoisted_4$f, [
3550
3983
  _cache[4] || (_cache[4] = createElementVNode(
3551
3984
  "div",
3552
3985
  { class: "title" },
@@ -3556,7 +3989,7 @@ var script$A = /* @__PURE__ */ defineComponent({
3556
3989
  )),
3557
3990
  !selectBean.value || isCombinedPayment.value ? (openBlock(), createElementBlock(
3558
3991
  "div",
3559
- _hoisted_5$c,
3992
+ _hoisted_5$d,
3560
3993
  " \u4F59\u989D " + toDisplayString(unref(formatAmount)(balance.value || 0)),
3561
3994
  1
3562
3995
  /* TEXT */
@@ -3717,7 +4150,7 @@ var script$A = /* @__PURE__ */ defineComponent({
3717
4150
  script$A.__file = "src/payment/components/TradeView.vue";
3718
4151
 
3719
4152
  const components = {
3720
- AmountPicker: script$M,
4153
+ AmountPicker: script$O,
3721
4154
  RechargeView: script$E,
3722
4155
  UserAgreement: script$D,
3723
4156
  RechargeResult: script$C,
@@ -3727,8 +4160,8 @@ const components = {
3727
4160
  const _hoisted_1$w = { class: "account-card" };
3728
4161
  const _hoisted_2$n = { class: "card" };
3729
4162
  const _hoisted_3$h = { class: "card-row" };
3730
- const _hoisted_4$d = { class: "card-row-left" };
3731
- const _hoisted_5$b = { class: "bean-nums number" };
4163
+ const _hoisted_4$e = { class: "card-row-left" };
4164
+ const _hoisted_5$c = { class: "bean-nums number" };
3732
4165
  const _hoisted_6$8 = { class: "card-row-right" };
3733
4166
  var script$z = /* @__PURE__ */ defineComponent({
3734
4167
  __name: "BalanceCard",
@@ -3775,7 +4208,7 @@ var script$z = /* @__PURE__ */ defineComponent({
3775
4208
  return openBlock(), createElementBlock("div", _hoisted_1$w, [
3776
4209
  createElementVNode("div", _hoisted_2$n, [
3777
4210
  createElementVNode("div", _hoisted_3$h, [
3778
- createElementVNode("div", _hoisted_4$d, [
4211
+ createElementVNode("div", _hoisted_4$e, [
3779
4212
  _cache[0] || (_cache[0] = createElementVNode(
3780
4213
  "div",
3781
4214
  { class: "bean-box" },
@@ -3793,7 +4226,7 @@ var script$z = /* @__PURE__ */ defineComponent({
3793
4226
  )),
3794
4227
  createElementVNode(
3795
4228
  "div",
3796
- _hoisted_5$b,
4229
+ _hoisted_5$c,
3797
4230
  toDisplayString(unref(formatAmount)(balance.value.total || 0)),
3798
4231
  1
3799
4232
  /* TEXT */
@@ -3855,8 +4288,8 @@ const consumptionDirections = ["\u5168\u90E8", "\u6536\u5165", "\u652F\u51FA"];
3855
4288
  const _hoisted_1$v = { class: "consumption-filter" };
3856
4289
  const _hoisted_2$m = { class: "consumption-filter-content" };
3857
4290
  const _hoisted_3$g = { class: "title" };
3858
- const _hoisted_4$c = { class: "info" };
3859
- const _hoisted_5$a = ["onClick"];
4291
+ const _hoisted_4$d = { class: "info" };
4292
+ const _hoisted_5$b = ["onClick"];
3860
4293
  const _hoisted_6$7 = { class: "consumption-filter-btn spa-between" };
3861
4294
  var script$y = /* @__PURE__ */ defineComponent({
3862
4295
  __name: "ConsumptionFilter",
@@ -3935,7 +4368,7 @@ var script$y = /* @__PURE__ */ defineComponent({
3935
4368
  1
3936
4369
  /* TEXT */
3937
4370
  ),
3938
- createElementVNode("div", _hoisted_4$c, [
4371
+ createElementVNode("div", _hoisted_4$d, [
3939
4372
  (openBlock(true), createElementBlock(
3940
4373
  Fragment,
3941
4374
  null,
@@ -3944,7 +4377,7 @@ var script$y = /* @__PURE__ */ defineComponent({
3944
4377
  onClick: () => onFilterSectionClick(index, it.code),
3945
4378
  class: normalizeClass([getItemClass(index, it.code), "info-item"]),
3946
4379
  key: i
3947
- }, toDisplayString(typeof it === "string" ? it : it.name), 11, _hoisted_5$a);
4380
+ }, toDisplayString(typeof it === "string" ? it : it.name), 11, _hoisted_5$b);
3948
4381
  }),
3949
4382
  128
3950
4383
  /* KEYED_FRAGMENT */
@@ -3994,7 +4427,7 @@ script$y.__file = "src/balance/components/ConsumptionFilter.vue";
3994
4427
  const _hoisted_1$u = { class: "appkit-date-filter" };
3995
4428
  const _hoisted_2$l = { class: "content" };
3996
4429
  const _hoisted_3$f = { class: "time" };
3997
- const _hoisted_4$b = { class: "buttons spa-between" };
4430
+ const _hoisted_4$c = { class: "buttons spa-between" };
3998
4431
  var script$x = /* @__PURE__ */ defineComponent({
3999
4432
  __name: "DateFilter",
4000
4433
  props: {
@@ -4117,7 +4550,7 @@ var script$x = /* @__PURE__ */ defineComponent({
4117
4550
  )
4118
4551
  ])
4119
4552
  ]),
4120
- createElementVNode("div", _hoisted_4$b, [
4553
+ createElementVNode("div", _hoisted_4$c, [
4121
4554
  createElementVNode("div", {
4122
4555
  class: "btn",
4123
4556
  onClick: reset
@@ -4293,8 +4726,8 @@ script$u.__file = "src/balance/components/Tip.vue";
4293
4726
  const _hoisted_1$q = { class: "account-view" };
4294
4727
  const _hoisted_2$k = { class: "scroll-content" };
4295
4728
  const _hoisted_3$e = { class: "row jusify-right" };
4296
- const _hoisted_4$a = { class: "balance" };
4297
- const _hoisted_5$9 = { class: "bean-box spa-between" };
4729
+ const _hoisted_4$b = { class: "balance" };
4730
+ const _hoisted_5$a = { class: "bean-box spa-between" };
4298
4731
  const _hoisted_6$6 = { class: "bean-counts spa-between" };
4299
4732
  const _hoisted_7$5 = { class: "counts number" };
4300
4733
  const _hoisted_8$4 = {
@@ -4535,7 +4968,7 @@ var script$t = /* @__PURE__ */ defineComponent({
4535
4968
  [
4536
4969
  createElementVNode("div", _hoisted_1$q, [
4537
4970
  createElementVNode("div", _hoisted_2$k, [
4538
- createVNode(unref(script$L), {
4971
+ createVNode(unref(script$N), {
4539
4972
  title: unref(Taro).getEnv() !== "WEB" ? "\u6211\u7684\u8D26\u6237" : "",
4540
4973
  class: normalizeClass({ "with-background": scrolled.value > 0 }),
4541
4974
  onClose: onPageHeaderClose
@@ -4556,8 +4989,8 @@ var script$t = /* @__PURE__ */ defineComponent({
4556
4989
  [_directive_track_click]
4557
4990
  ])
4558
4991
  ]),
4559
- createElementVNode("div", _hoisted_4$a, [
4560
- createElementVNode("div", _hoisted_5$9, [
4992
+ createElementVNode("div", _hoisted_4$b, [
4993
+ createElementVNode("div", _hoisted_5$a, [
4561
4994
  _cache[9] || (_cache[9] = createElementVNode(
4562
4995
  "div",
4563
4996
  { class: "bean-img" },
@@ -4840,7 +5273,7 @@ var script$t = /* @__PURE__ */ defineComponent({
4840
5273
  _: 1
4841
5274
  /* STABLE */
4842
5275
  }, 8, ["visible"]),
4843
- createVNode(unref(script$K), {
5276
+ createVNode(unref(script$M), {
4844
5277
  modelValue: secondBalanceOpen.value,
4845
5278
  "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => secondBalanceOpen.value = $event),
4846
5279
  title: "\u6536\u652F\u660E\u7EC6"
@@ -5030,8 +5463,8 @@ script$t.__file = "src/balance/components/AccountView.vue";
5030
5463
  const _hoisted_1$p = { class: "balance-reminder" };
5031
5464
  const _hoisted_2$j = { class: "body" };
5032
5465
  const _hoisted_3$d = { class: "footer" };
5033
- const _hoisted_4$9 = { class: "col" };
5034
- const _hoisted_5$8 = { class: "col" };
5466
+ const _hoisted_4$a = { class: "col" };
5467
+ const _hoisted_5$9 = { class: "col" };
5035
5468
  var script$s = /* @__PURE__ */ defineComponent({
5036
5469
  __name: "BalanceReminder",
5037
5470
  props: {
@@ -5072,7 +5505,7 @@ var script$s = /* @__PURE__ */ defineComponent({
5072
5505
  )
5073
5506
  ]),
5074
5507
  createElementVNode("div", _hoisted_3$d, [
5075
- createElementVNode("div", _hoisted_4$9, [
5508
+ createElementVNode("div", _hoisted_4$a, [
5076
5509
  createVNode(_component_nut_button, {
5077
5510
  class: "cancel-button",
5078
5511
  onClick: _cache[0] || (_cache[0] = ($event) => emit("update:modelValue", false)),
@@ -5089,7 +5522,7 @@ var script$s = /* @__PURE__ */ defineComponent({
5089
5522
  /* STABLE */
5090
5523
  })
5091
5524
  ]),
5092
- createElementVNode("div", _hoisted_5$8, [
5525
+ createElementVNode("div", _hoisted_5$9, [
5093
5526
  withDirectives((openBlock(), createBlock(_component_nut_button, {
5094
5527
  block: "",
5095
5528
  class: "recharge-button",
@@ -5227,8 +5660,8 @@ script$r.__file = "src/balance/components/DateRange.vue";
5227
5660
  const _hoisted_1$n = { class: "list-filter-picker" };
5228
5661
  const _hoisted_2$i = { class: "list-filter-picker-content" };
5229
5662
  const _hoisted_3$c = { class: "title" };
5230
- const _hoisted_4$8 = { class: "info" };
5231
- const _hoisted_5$7 = ["onClick"];
5663
+ const _hoisted_4$9 = { class: "info" };
5664
+ const _hoisted_5$8 = ["onClick"];
5232
5665
  const _hoisted_6$5 = { class: "list-filter-picker-btn spa-between" };
5233
5666
  var script$q = /* @__PURE__ */ defineComponent({
5234
5667
  __name: "ListFilterPicker",
@@ -5305,7 +5738,7 @@ var script$q = /* @__PURE__ */ defineComponent({
5305
5738
  1
5306
5739
  /* TEXT */
5307
5740
  ),
5308
- createElementVNode("div", _hoisted_4$8, [
5741
+ createElementVNode("div", _hoisted_4$9, [
5309
5742
  (openBlock(true), createElementBlock(
5310
5743
  Fragment,
5311
5744
  null,
@@ -5314,7 +5747,7 @@ var script$q = /* @__PURE__ */ defineComponent({
5314
5747
  onClick: () => onFilterSectionClick(item.name, it.value),
5315
5748
  class: normalizeClass([getItemClass(item.name, it.value), "info-item"]),
5316
5749
  key: i
5317
- }, toDisplayString(typeof it === "string" ? it : it.label), 11, _hoisted_5$7);
5750
+ }, toDisplayString(typeof it === "string" ? it : it.label), 11, _hoisted_5$8);
5318
5751
  }),
5319
5752
  128
5320
5753
  /* KEYED_FRAGMENT */
@@ -5430,8 +5863,8 @@ const _hoisted_1$m = {
5430
5863
  };
5431
5864
  const _hoisted_2$h = { class: "promoter-card-hd-num number" };
5432
5865
  const _hoisted_3$b = ["src"];
5433
- const _hoisted_4$7 = { class: "promoter-card-ft" };
5434
- const _hoisted_5$6 = {
5866
+ const _hoisted_4$8 = { class: "promoter-card-ft" };
5867
+ const _hoisted_5$7 = {
5435
5868
  key: 0,
5436
5869
  class: "promoter-card-ft-item"
5437
5870
  };
@@ -5589,8 +6022,8 @@ var script$o = /* @__PURE__ */ defineComponent({
5589
6022
  ])), [
5590
6023
  [_directive_track_click]
5591
6024
  ]) : createCommentVNode("v-if", true),
5592
- createElementVNode("div", _hoisted_4$7, [
5593
- __props.applyRecord.accessCheckStatus === "Y" ? (openBlock(), createElementBlock("div", _hoisted_5$6, [
6025
+ createElementVNode("div", _hoisted_4$8, [
6026
+ __props.applyRecord.accessCheckStatus === "Y" ? (openBlock(), createElementBlock("div", _hoisted_5$7, [
5594
6027
  __props.\u663E\u793A\u4E0B\u7EA7\u5206\u9500\u5546 ? (openBlock(), createElementBlock(
5595
6028
  Fragment,
5596
6029
  { key: 0 },
@@ -6032,8 +6465,8 @@ script$l.__file = "src/components/dd-selector/index.vue";
6032
6465
  const _hoisted_1$j = { class: "self-registration" };
6033
6466
  const _hoisted_2$f = { class: "self-registration-body" };
6034
6467
  const _hoisted_3$a = ["src"];
6035
- const _hoisted_4$6 = { class: "self-registration__input" };
6036
- const _hoisted_5$5 = { class: "self-registration-bottom" };
6468
+ const _hoisted_4$7 = { class: "self-registration__input" };
6469
+ const _hoisted_5$6 = { class: "self-registration-bottom" };
6037
6470
  var script$k = /* @__PURE__ */ defineComponent({
6038
6471
  __name: "SelfRegistration",
6039
6472
  props: {
@@ -6193,7 +6626,7 @@ var script$k = /* @__PURE__ */ defineComponent({
6193
6626
  required: ""
6194
6627
  }, {
6195
6628
  default: withCtx(() => [
6196
- createElementVNode("div", _hoisted_4$6, [
6629
+ createElementVNode("div", _hoisted_4$7, [
6197
6630
  withDirectives(createElementVNode(
6198
6631
  "input",
6199
6632
  {
@@ -6209,7 +6642,10 @@ var script$k = /* @__PURE__ */ defineComponent({
6209
6642
  ), [
6210
6643
  [vModelText, formState.name]
6211
6644
  ]),
6212
- createVNode(script$G, { onComplete: onOCRInfo }, {
6645
+ createVNode(script$I, {
6646
+ "has-upload-vo": false,
6647
+ onComplete: onOCRInfo
6648
+ }, {
6213
6649
  icon: withCtx(() => [..._cache[9] || (_cache[9] = [
6214
6650
  createElementVNode(
6215
6651
  "img",
@@ -6344,7 +6780,7 @@ var script$k = /* @__PURE__ */ defineComponent({
6344
6780
  /* STABLE */
6345
6781
  })
6346
6782
  ]),
6347
- createElementVNode("div", _hoisted_5$5, [
6783
+ createElementVNode("div", _hoisted_5$6, [
6348
6784
  withDirectives((openBlock(), createBlock(_component_nut_button, {
6349
6785
  block: "",
6350
6786
  type: "primary",
@@ -6780,7 +7216,7 @@ var script$i = /* @__PURE__ */ defineComponent({
6780
7216
  Fragment,
6781
7217
  null,
6782
7218
  renderList(bannerMessages.value, (item, key) => {
6783
- return withDirectives((openBlock(), createBlock(script$I, {
7219
+ return withDirectives((openBlock(), createBlock(script$K, {
6784
7220
  class: normalizeClass({ show: key === activeKey.value }),
6785
7221
  key,
6786
7222
  showClose: item.noticeType === 0,
@@ -7051,7 +7487,8 @@ function useCommonList(api, query, loading = true, method = "GET") {
7051
7487
  const isLoading = ref(false);
7052
7488
  async function fetchData(loading2) {
7053
7489
  loading2 && showLoading({
7054
- title: "\u52A0\u8F7D\u4E2D..."
7490
+ title: "\u52A0\u8F7D\u4E2D...",
7491
+ mask: true
7055
7492
  });
7056
7493
  isLoading.value = true;
7057
7494
  const $http = useHttp$1();
@@ -7108,8 +7545,8 @@ const _hoisted_3$7 = {
7108
7545
  key: 0,
7109
7546
  class: "wrapper"
7110
7547
  };
7111
- const _hoisted_4$5 = ["onClick"];
7112
- const _hoisted_5$4 = { class: "time" };
7548
+ const _hoisted_4$6 = ["onClick"];
7549
+ const _hoisted_5$5 = { class: "time" };
7113
7550
  const _hoisted_6$3 = {
7114
7551
  key: 0,
7115
7552
  class: "notice-list-label"
@@ -7242,7 +7679,7 @@ var script$f = /* @__PURE__ */ defineComponent({
7242
7679
  createElementVNode("div", null, [
7243
7680
  createElementVNode(
7244
7681
  "div",
7245
- _hoisted_5$4,
7682
+ _hoisted_5$5,
7246
7683
  toDisplayString(formatMinutes(item.receiveTime)),
7247
7684
  1
7248
7685
  /* TEXT */
@@ -7299,7 +7736,7 @@ var script$f = /* @__PURE__ */ defineComponent({
7299
7736
  /* CLASS */
7300
7737
  )
7301
7738
  ])
7302
- ], 10, _hoisted_4$5)), [
7739
+ ], 10, _hoisted_4$6)), [
7303
7740
  [_directive_track_click, "\u6D88\u606F\u8BE6\u60C5"]
7304
7741
  ]);
7305
7742
  }),
@@ -7341,16 +7778,21 @@ var script$f = /* @__PURE__ */ defineComponent({
7341
7778
 
7342
7779
  script$f.__file = "src/notice/components/NoticeList.vue";
7343
7780
 
7344
- const _hoisted_1$d = {
7781
+ const _hoisted_1$d = ["onClick"];
7782
+ const _hoisted_2$9 = {
7783
+ key: 0,
7784
+ class: "custom-title-dot"
7785
+ };
7786
+ const _hoisted_3$6 = {
7345
7787
  key: 0,
7346
7788
  class: "read-all"
7347
7789
  };
7348
- const _hoisted_2$9 = {
7790
+ const _hoisted_4$5 = {
7349
7791
  key: 0,
7350
7792
  class: "news-item-title-icon",
7351
- src: "https://cdn.ddjf.com/static/images/loan-manage-app/ic_msg_system_notice.webp"
7793
+ src: "https://cdn.ddjf.com/static/images/fnfundkit/ic_msg_system_notice.png"
7352
7794
  };
7353
- const _hoisted_3$6 = { class: "news-item-time" };
7795
+ const _hoisted_5$4 = { class: "news-item-time" };
7354
7796
  var script$e = /* @__PURE__ */ defineComponent({
7355
7797
  __name: "NoticeList2",
7356
7798
  props: {
@@ -7361,9 +7803,28 @@ var script$e = /* @__PURE__ */ defineComponent({
7361
7803
  emits: ["itemClick"],
7362
7804
  setup(__props, { expose: __expose, emit: __emit }) {
7363
7805
  const props = __props;
7806
+ const tabList = ref([
7807
+ {
7808
+ label: "\u5168\u90E8",
7809
+ value: "\u5168\u90E8"
7810
+ },
7811
+ {
7812
+ label: "\u4E1A\u52A1\u6D88\u606F",
7813
+ value: "\u4E1A\u52A1\u6D88\u606F"
7814
+ },
7815
+ {
7816
+ label: "\u7CFB\u7EDF\u516C\u544A",
7817
+ value: "\u7CFB\u7EDF\u516C\u544A"
7818
+ },
7819
+ {
7820
+ label: "\u672A\u8BFB",
7821
+ value: "\u672A\u8BFB"
7822
+ }
7823
+ ]);
7364
7824
  const $http = useHttp$1(), \u663E\u793A\u9AA8\u67B6\u5C4F = ref(true);
7365
7825
  useDidShow(() => {
7366
7826
  nextPage(1);
7827
+ getNotice();
7367
7828
  });
7368
7829
  const state = reactive({
7369
7830
  search: "",
@@ -7416,6 +7877,7 @@ var script$e = /* @__PURE__ */ defineComponent({
7416
7877
  }
7417
7878
  function itemClick(item) {
7418
7879
  read(item);
7880
+ getNotice();
7419
7881
  emits("itemClick", item);
7420
7882
  }
7421
7883
  function read(item) {
@@ -7428,7 +7890,8 @@ var script$e = /* @__PURE__ */ defineComponent({
7428
7890
  async function readAll() {
7429
7891
  try {
7430
7892
  showLoading({
7431
- title: "\u8BF7\u7A0D\u540E..."
7893
+ title: "\u8BF7\u7A0D\u540E...",
7894
+ mask: true
7432
7895
  });
7433
7896
  const appkitOptions = useAppKitOptions();
7434
7897
  const ep = endpoints["\u5168\u90E8\u5DF2\u8BFB"];
@@ -7443,9 +7906,24 @@ var script$e = /* @__PURE__ */ defineComponent({
7443
7906
  });
7444
7907
  });
7445
7908
  } finally {
7909
+ getNotice();
7446
7910
  hideLoading();
7447
7911
  }
7448
7912
  }
7913
+ const noticeShow = ref(false);
7914
+ async function getNotice() {
7915
+ const appkitOptions = useAppKitOptions();
7916
+ const $http2 = useHttp$1();
7917
+ $http2.get("/cas/msg/count-unread", {
7918
+ deviceType: 2,
7919
+ appCode: props.app,
7920
+ tenantId: appkitOptions.tenant(),
7921
+ userId: props.userId
7922
+ }).then((result) => {
7923
+ if (typeof result === "object") return;
7924
+ noticeShow.value = result > 0;
7925
+ });
7926
+ }
7449
7927
  const emits = __emit;
7450
7928
  __expose({
7451
7929
  readAll
@@ -7461,7 +7939,7 @@ var script$e = /* @__PURE__ */ defineComponent({
7461
7939
  class: normalizeClass(["tabContainer", { inH5: unref(isWeb)() }])
7462
7940
  },
7463
7941
  [
7464
- createCommentVNode(' <ns-search\n v-track-search="{\n trackInput: false,\n trackSubmit: true,\n minLength: 2,\n }"\n style="margin: 0 12px"\n placeholder="\u8BF7\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22"\n v-model="state.search"\n ></ns-search> '),
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> '),
7465
7943
  createVNode(unref(NsTabs), {
7466
7944
  modelValue: state.tab,
7467
7945
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => state.tab = $event),
@@ -7469,30 +7947,50 @@ var script$e = /* @__PURE__ */ defineComponent({
7469
7947
  square: "",
7470
7948
  size: "xl",
7471
7949
  style: { "height": "46px" },
7472
- onChange: onTabChange
7950
+ class: "news-tab",
7951
+ items: tabList.value
7473
7952
  }, {
7474
- default: withCtx(() => [
7475
- createVNode(unref(NsTabsItem), {
7476
- key: "\u5168\u90E8",
7477
- tab: "\u5168\u90E8"
7478
- }),
7479
- createVNode(unref(NsTabsItem), {
7480
- key: "\u4E1A\u52A1\u6D88\u606F",
7481
- tab: "\u4E1A\u52A1\u6D88\u606F"
7482
- }),
7483
- createVNode(unref(NsTabsItem), {
7484
- key: "\u7CFB\u7EDF\u516C\u544A",
7485
- tab: "\u7CFB\u7EDF\u516C\u544A"
7486
- }),
7487
- createVNode(unref(NsTabsItem), {
7488
- key: "\u672A\u8BFB",
7489
- tab: "\u672A\u8BFB"
7490
- })
7953
+ titles: withCtx(() => [
7954
+ (openBlock(true), createElementBlock(
7955
+ Fragment,
7956
+ null,
7957
+ renderList(tabList.value, (item) => {
7958
+ return openBlock(), createElementBlock("div", {
7959
+ class: normalizeClass([{ customLine: state.tab === item.value }, "nut-tabs__titles-item custom-tab-item"]),
7960
+ key: item.value,
7961
+ onClick: ($event) => {
7962
+ state.tab = item.value;
7963
+ onTabChange();
7964
+ }
7965
+ }, [
7966
+ createElementVNode(
7967
+ "div",
7968
+ {
7969
+ class: normalizeClass(["custom-title", { active: state.tab === item.value }])
7970
+ },
7971
+ [
7972
+ createElementVNode(
7973
+ "div",
7974
+ null,
7975
+ toDisplayString(item.label),
7976
+ 1
7977
+ /* TEXT */
7978
+ ),
7979
+ item.value === "\u672A\u8BFB" && noticeShow.value ? (openBlock(), createElementBlock("div", _hoisted_2$9, " \u2022\u2022\u2022 ")) : createCommentVNode("v-if", true)
7980
+ ],
7981
+ 2
7982
+ /* CLASS */
7983
+ )
7984
+ ], 10, _hoisted_1$d);
7985
+ }),
7986
+ 128
7987
+ /* KEYED_FRAGMENT */
7988
+ ))
7491
7989
  ]),
7492
7990
  _: 1
7493
7991
  /* STABLE */
7494
- }, 8, ["modelValue"]),
7495
- state.list.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$d, [
7992
+ }, 8, ["modelValue", "items"]),
7993
+ state.list.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_3$6, [
7496
7994
  withDirectives((openBlock(), createElementBlock("div", {
7497
7995
  class: "btn",
7498
7996
  onClick: readAll
@@ -7549,7 +8047,7 @@ var script$e = /* @__PURE__ */ defineComponent({
7549
8047
  class: "news-item-title"
7550
8048
  },
7551
8049
  [
7552
- item.\u662F\u516C\u544A ? (openBlock(), createElementBlock("img", _hoisted_2$9)) : createCommentVNode("v-if", true),
8050
+ item.\u662F\u516C\u544A ? (openBlock(), createElementBlock("img", _hoisted_4$5)) : createCommentVNode("v-if", true),
7553
8051
  createTextVNode(
7554
8052
  " " + toDisplayString(item.\u6807\u9898),
7555
8053
  1
@@ -7570,7 +8068,7 @@ var script$e = /* @__PURE__ */ defineComponent({
7570
8068
  }, null, 8, ["style", "content"]),
7571
8069
  createElementVNode(
7572
8070
  "div",
7573
- _hoisted_3$6,
8071
+ _hoisted_5$4,
7574
8072
  toDisplayString(item.\u65F6\u95F4),
7575
8073
  1
7576
8074
  /* TEXT */
@@ -8027,7 +8525,8 @@ var script$b = /* @__PURE__ */ defineComponent({
8027
8525
  }
8028
8526
  async function updateImage(filePath) {
8029
8527
  showLoading({
8030
- title: "\u4E0A\u4F20\u4E2D..."
8528
+ title: "\u4E0A\u4F20\u4E2D...",
8529
+ mask: true
8031
8530
  });
8032
8531
  const appkitOptions = useAppKitOptions();
8033
8532
  const $http = useHttp();
@@ -10003,7 +10502,8 @@ var script$6 = /* @__PURE__ */ defineComponent({
10003
10502
  const $http = useHttp();
10004
10503
  const appkitOptions = useAppKitOptions();
10005
10504
  showLoading({
10006
- title: "\u53CD\u9988\u4E2D..."
10505
+ title: "\u53CD\u9988\u4E2D...",
10506
+ mask: true
10007
10507
  });
10008
10508
  const attachment = JSON.parse(
10009
10509
  JSON.stringify(
@@ -10713,8 +11213,9 @@ var script$2 = /* @__PURE__ */ defineComponent({
10713
11213
  rules: ["required"]
10714
11214
  }, {
10715
11215
  append: withCtx(() => [
10716
- !\u5DF2\u8BA4\u8BC1.value ? (openBlock(), createBlock(unref(script$G), {
11216
+ !\u5DF2\u8BA4\u8BC1.value ? (openBlock(), createBlock(unref(script$I), {
10717
11217
  key: 0,
11218
+ "has-upload-vo": false,
10718
11219
  onComplete: onOcrComplete
10719
11220
  })) : createCommentVNode("v-if", true)
10720
11221
  ]),
@@ -11323,4 +11824,4 @@ const AppKit = {
11323
11824
  }
11324
11825
  };
11325
11826
 
11326
- 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 };
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 };