@uxda/appkit 4.3.7 → 4.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/appkit.css +12 -105
- package/dist/index.js +419 -1104
- package/package.json +5 -2
- package/src/balance/components/PromoterCard.vue +0 -1
- package/src/notice/components/NoticeList2.vue +73 -232
- package/src/notice/components/useCommonList.ts +0 -1
- package/src/payment/api/endpoints.ts +0 -2
- package/src/payment/api/index.ts +0 -1
- package/src/payment/components/RechargeResult.vue +1 -0
- package/src/payment/components/RechargeView.vue +4 -0
- package/src/payment/components/TradeView.vue +125 -331
- package/src/payment/services/request-payment.ts +0 -2
- package/src/payment/types.ts +0 -1
- package/src/register/components/SelfRegistration.vue +1 -1
- package/src/shared/components/AppVerify.vue +6 -15
- package/src/shared/components/OcrBusinessLicense.vue +37 -20
- package/src/shared/components/OcrIcon.vue +67 -105
- package/src/shared/components/index.ts +1 -3
- package/src/shared/composables/index.ts +0 -1
- package/src/shared/composables/useUpload.ts +51 -96
- package/src/shared/http/Http.ts +0 -1
- package/src/shared/tracking/tracking-sdk.ts +1 -0
- package/src/shared/weixin/jssdk.ts +0 -1
- package/src/user/components/UserAuth.vue +1 -1
- package/src/user/components/UserFeedback.vue +0 -1
- package/src/user/components/UserInfo.vue +0 -2
- package/types/global.d.ts +0 -2
- package/src/shared/components/OcrBank.vue +0 -202
- package/src/shared/components/OcrInvoice.vue +0 -322
- package/src/shared/composables/useCompress.ts +0 -64
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, request as request$1,
|
|
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,
|
|
12
|
+
import { NsForm, NsInput, NsButton, NsIcon, usePopup, useNutshell, NsButtonGroup, usePaging, NsPage, NsTabs, NsTabsItem, 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$
|
|
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$
|
|
110
|
+
script$M.__file = "src/payment/components/AmountPicker.vue";
|
|
111
111
|
|
|
112
112
|
const getSdkConfig = (appCode, url) => {
|
|
113
113
|
return new Promise((resolve, reject) => {
|
|
@@ -128,7 +128,6 @@ function requestWxH5Pay(options) {
|
|
|
128
128
|
title: "\u63D0\u793A",
|
|
129
129
|
content: "\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301\u5FAE\u4FE1\u652F\u4ED8\uFF0C\u8BF7\u5728\u5FAE\u4FE1\u5185\u7F6E\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00",
|
|
130
130
|
confirmText: "\u786E\u5B9A",
|
|
131
|
-
confirmColor: "#017fff",
|
|
132
131
|
success: () => {
|
|
133
132
|
}
|
|
134
133
|
});
|
|
@@ -311,84 +310,71 @@ function useEncode() {
|
|
|
311
310
|
};
|
|
312
311
|
}
|
|
313
312
|
|
|
314
|
-
const
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
}
|
|
326
|
-
const maxWidth = 900;
|
|
327
|
-
const maxHeight = 900;
|
|
328
|
-
let width = img.width;
|
|
329
|
-
let height = img.height;
|
|
330
|
-
if (width > maxWidth || height > maxHeight) {
|
|
331
|
-
const ratio = Math.min(maxWidth / width, maxHeight / height);
|
|
332
|
-
width = width * ratio;
|
|
333
|
-
height = height * ratio;
|
|
334
|
-
}
|
|
335
|
-
canvas.width = width;
|
|
336
|
-
canvas.height = height;
|
|
337
|
-
ctx.drawImage(img, 0, 0, width, height);
|
|
338
|
-
canvas.toBlob(
|
|
339
|
-
(blob) => {
|
|
340
|
-
if (!blob) {
|
|
341
|
-
reject(new Error("\u56FE\u7247\u538B\u7F29\u5931\u8D25"));
|
|
342
|
-
return;
|
|
343
|
-
}
|
|
344
|
-
const compressedUrl = URL.createObjectURL(blob);
|
|
345
|
-
resolve(compressedUrl);
|
|
346
|
-
},
|
|
347
|
-
"image/jpeg",
|
|
348
|
-
quality / 100
|
|
349
|
-
);
|
|
350
|
-
} catch (error) {
|
|
351
|
-
reject(error);
|
|
352
|
-
}
|
|
353
|
-
};
|
|
354
|
-
img.onerror = () => {
|
|
355
|
-
reject(new Error("\u56FE\u7247\u52A0\u8F7D\u5931\u8D25"));
|
|
356
|
-
};
|
|
357
|
-
img.src = src;
|
|
358
|
-
});
|
|
313
|
+
const globalData = {};
|
|
314
|
+
|
|
315
|
+
const appKitOptions = {
|
|
316
|
+
app: () => "",
|
|
317
|
+
tenant: () => "",
|
|
318
|
+
token: () => "",
|
|
319
|
+
tempToken: () => "",
|
|
320
|
+
baseUrl: () => "",
|
|
321
|
+
401() {
|
|
322
|
+
},
|
|
323
|
+
gray: () => ""
|
|
359
324
|
};
|
|
360
|
-
|
|
361
|
-
if (
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
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) => {
|
|
370
347
|
return new Promise((resolve, reject) => {
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
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()
|
|
376
358
|
},
|
|
377
|
-
|
|
378
|
-
|
|
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
|
+
}
|
|
379
370
|
}
|
|
380
371
|
});
|
|
381
372
|
});
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
if (curSize > 6) {
|
|
388
|
-
quality = quality - (curSize - 6) / curSize * 100;
|
|
389
|
-
}
|
|
390
|
-
return quality;
|
|
391
|
-
}
|
|
373
|
+
};
|
|
374
|
+
return {
|
|
375
|
+
upload
|
|
376
|
+
};
|
|
377
|
+
};
|
|
392
378
|
|
|
393
379
|
const defaultCryptoConfig = {
|
|
394
380
|
maskField: "mask",
|
|
@@ -429,25 +415,6 @@ function useCrypto(config) {
|
|
|
429
415
|
};
|
|
430
416
|
}
|
|
431
417
|
|
|
432
|
-
const globalData = {};
|
|
433
|
-
|
|
434
|
-
const appKitOptions = {
|
|
435
|
-
app: () => "",
|
|
436
|
-
tenant: () => "",
|
|
437
|
-
token: () => "",
|
|
438
|
-
tempToken: () => "",
|
|
439
|
-
baseUrl: () => "",
|
|
440
|
-
401() {
|
|
441
|
-
},
|
|
442
|
-
gray: () => ""
|
|
443
|
-
};
|
|
444
|
-
const useAppKitOptions = () => {
|
|
445
|
-
if (!globalData.$appKitOptions) {
|
|
446
|
-
globalData.$appKitOptions = appKitOptions;
|
|
447
|
-
}
|
|
448
|
-
return globalData.$appKitOptions;
|
|
449
|
-
};
|
|
450
|
-
|
|
451
418
|
const defaultLogOptions = {
|
|
452
419
|
projectName: "ddyk-dev",
|
|
453
420
|
logStore: "ddjf-internet-web",
|
|
@@ -581,59 +548,11 @@ function useWxAuth() {
|
|
|
581
548
|
};
|
|
582
549
|
}
|
|
583
550
|
|
|
584
|
-
const mappings$1 = {
|
|
585
|
-
downloadUrl: "thrumb",
|
|
586
|
-
fileId: "id",
|
|
587
|
-
fileName: "name",
|
|
588
|
-
fileSize: "size",
|
|
589
|
-
fileSuffix: "ext",
|
|
590
|
-
fileType: "type",
|
|
591
|
-
originalUrl: "url"
|
|
592
|
-
};
|
|
593
|
-
const transformFields = (row) => {
|
|
594
|
-
return Object.fromEntries(Object.entries(row).map(([k, v]) => [mappings$1[k] || k, v]));
|
|
595
|
-
};
|
|
596
|
-
const useUpload = (config) => {
|
|
597
|
-
const appkitOptions = useAppKitOptions();
|
|
598
|
-
const upload = (url, file) => {
|
|
599
|
-
return new Promise((resolve, reject) => {
|
|
600
|
-
uploadFile({
|
|
601
|
-
url: config.baseUrl + url,
|
|
602
|
-
filePath: file.path,
|
|
603
|
-
name: "file",
|
|
604
|
-
formData: {
|
|
605
|
-
objectNo: `min${Date.now()}`,
|
|
606
|
-
appCode: config.headers?.appcode || appkitOptions.app()
|
|
607
|
-
},
|
|
608
|
-
header: {
|
|
609
|
-
...config.headers,
|
|
610
|
-
token: appkitOptions.tempToken() || appkitOptions.token()
|
|
611
|
-
},
|
|
612
|
-
success: (rsp) => {
|
|
613
|
-
const { data } = rsp;
|
|
614
|
-
try {
|
|
615
|
-
const response = JSON.parse(data);
|
|
616
|
-
console.log("===response", response);
|
|
617
|
-
resolve(transformFields(response.result));
|
|
618
|
-
} catch (e) {
|
|
619
|
-
reject({
|
|
620
|
-
message: "\u6587\u4EF6\u4E0A\u4F20\u5F02\u5E38"
|
|
621
|
-
});
|
|
622
|
-
}
|
|
623
|
-
}
|
|
624
|
-
});
|
|
625
|
-
});
|
|
626
|
-
};
|
|
627
|
-
return {
|
|
628
|
-
upload
|
|
629
|
-
};
|
|
630
|
-
};
|
|
631
|
-
|
|
632
551
|
const _hoisted_1$F = {
|
|
633
552
|
key: 0,
|
|
634
553
|
class: "page-title"
|
|
635
554
|
};
|
|
636
|
-
var script$
|
|
555
|
+
var script$L = /* @__PURE__ */ defineComponent({
|
|
637
556
|
__name: "PageHeader",
|
|
638
557
|
props: {
|
|
639
558
|
title: { type: String, required: false, default: "" },
|
|
@@ -690,10 +609,10 @@ var script$N = /* @__PURE__ */ defineComponent({
|
|
|
690
609
|
}
|
|
691
610
|
});
|
|
692
611
|
|
|
693
|
-
script$
|
|
612
|
+
script$L.__file = "src/shared/components/PageHeader.vue";
|
|
694
613
|
|
|
695
614
|
const _hoisted_1$E = { class: "drawer-body" };
|
|
696
|
-
var script$
|
|
615
|
+
var script$K = /* @__PURE__ */ defineComponent({
|
|
697
616
|
__name: "AppDrawer",
|
|
698
617
|
props: {
|
|
699
618
|
modelValue: { type: Boolean, required: true },
|
|
@@ -717,7 +636,7 @@ var script$M = /* @__PURE__ */ defineComponent({
|
|
|
717
636
|
"onUpdate:visible": onVisibleChange
|
|
718
637
|
}, {
|
|
719
638
|
default: withCtx(() => [
|
|
720
|
-
createVNode(script$
|
|
639
|
+
createVNode(script$L, {
|
|
721
640
|
title: __props.title,
|
|
722
641
|
style: normalizeStyle(unref(Taro).getEnv() !== "WEB" ? "" : "--height: 40px"),
|
|
723
642
|
onClose: onPageHeaderClose
|
|
@@ -733,18 +652,18 @@ var script$M = /* @__PURE__ */ defineComponent({
|
|
|
733
652
|
}
|
|
734
653
|
});
|
|
735
654
|
|
|
736
|
-
script$
|
|
655
|
+
script$K.__file = "src/shared/components/AppDrawer.vue";
|
|
737
656
|
|
|
738
657
|
const _hoisted_1$D = { class: "app-verify column" };
|
|
739
658
|
const _hoisted_2$s = { class: "caption" };
|
|
740
659
|
const _hoisted_3$m = { class: "number" };
|
|
741
|
-
const _hoisted_4$
|
|
742
|
-
const _hoisted_5$
|
|
660
|
+
const _hoisted_4$h = { class: "form-btn" };
|
|
661
|
+
const _hoisted_5$d = {
|
|
743
662
|
key: 1,
|
|
744
663
|
class: "caption"
|
|
745
664
|
};
|
|
746
665
|
const _hoisted_6$a = { class: "row buttons" };
|
|
747
|
-
var script$
|
|
666
|
+
var script$J = /* @__PURE__ */ defineComponent({
|
|
748
667
|
__name: "AppVerify",
|
|
749
668
|
props: {
|
|
750
669
|
phone: { type: String, required: true },
|
|
@@ -819,7 +738,7 @@ var script$L = /* @__PURE__ */ defineComponent({
|
|
|
819
738
|
method: (value) => value.length === 6
|
|
820
739
|
}]
|
|
821
740
|
}, null, 8, ["modelValue", "rules"]),
|
|
822
|
-
createElementVNode("div", _hoisted_4$
|
|
741
|
+
createElementVNode("div", _hoisted_4$h, [
|
|
823
742
|
!sent.value ? withDirectives((openBlock(), createBlock(
|
|
824
743
|
unref(NsButton),
|
|
825
744
|
{
|
|
@@ -838,7 +757,7 @@ var script$L = /* @__PURE__ */ defineComponent({
|
|
|
838
757
|
]) : createCommentVNode("v-if", true),
|
|
839
758
|
sent.value ? (openBlock(), createElementBlock(
|
|
840
759
|
"div",
|
|
841
|
-
_hoisted_5$
|
|
760
|
+
_hoisted_5$d,
|
|
842
761
|
toDisplayString(countdown.value) + "s\u540E\u91CD\u65B0\u53D1\u9001",
|
|
843
762
|
1
|
|
844
763
|
/* TEXT */
|
|
@@ -851,7 +770,6 @@ var script$L = /* @__PURE__ */ defineComponent({
|
|
|
851
770
|
createElementVNode("div", _hoisted_6$a, [
|
|
852
771
|
withDirectives((openBlock(), createBlock(unref(NsButton), {
|
|
853
772
|
class: "cancel-btn",
|
|
854
|
-
r: 20,
|
|
855
773
|
onClick: _cache[2] || (_cache[2] = ($event) => emits("cancel"))
|
|
856
774
|
}, {
|
|
857
775
|
default: withCtx(() => [..._cache[3] || (_cache[3] = [
|
|
@@ -868,7 +786,6 @@ var script$L = /* @__PURE__ */ defineComponent({
|
|
|
868
786
|
]),
|
|
869
787
|
withDirectives((openBlock(), createBlock(unref(NsButton), {
|
|
870
788
|
color: "primary",
|
|
871
|
-
r: 20,
|
|
872
789
|
onClick: onOk
|
|
873
790
|
}, {
|
|
874
791
|
default: withCtx(() => [..._cache[4] || (_cache[4] = [
|
|
@@ -889,10 +806,10 @@ var script$L = /* @__PURE__ */ defineComponent({
|
|
|
889
806
|
}
|
|
890
807
|
});
|
|
891
808
|
|
|
892
|
-
script$
|
|
809
|
+
script$J.__file = "src/shared/components/AppVerify.vue";
|
|
893
810
|
|
|
894
811
|
const _hoisted_1$C = { key: 0 };
|
|
895
|
-
var script$
|
|
812
|
+
var script$I = /* @__PURE__ */ defineComponent({
|
|
896
813
|
__name: "index",
|
|
897
814
|
props: {
|
|
898
815
|
text: { type: String, required: false },
|
|
@@ -959,7 +876,7 @@ var script$K = /* @__PURE__ */ defineComponent({
|
|
|
959
876
|
}
|
|
960
877
|
});
|
|
961
878
|
|
|
962
|
-
script$
|
|
879
|
+
script$I.__file = "src/components/dd-notice-bar/index.vue";
|
|
963
880
|
|
|
964
881
|
const typeMappings = {
|
|
965
882
|
CZ: "\u5145\u503C",
|
|
@@ -1164,7 +1081,7 @@ function useHttp$3() {
|
|
|
1164
1081
|
return $http;
|
|
1165
1082
|
}
|
|
1166
1083
|
|
|
1167
|
-
var script$
|
|
1084
|
+
var script$H = /* @__PURE__ */ defineComponent({
|
|
1168
1085
|
__name: "DeviceVersion",
|
|
1169
1086
|
props: {
|
|
1170
1087
|
versions: { type: String, required: false, default: "{}" }
|
|
@@ -1211,7 +1128,7 @@ var script$J = /* @__PURE__ */ defineComponent({
|
|
|
1211
1128
|
}
|
|
1212
1129
|
});
|
|
1213
1130
|
return (_ctx, _cache) => {
|
|
1214
|
-
return showAlert.value ? (openBlock(), createBlock(script$
|
|
1131
|
+
return showAlert.value ? (openBlock(), createBlock(script$I, {
|
|
1215
1132
|
key: 0,
|
|
1216
1133
|
showClose: "",
|
|
1217
1134
|
style: normalizeStyle(topStype.value),
|
|
@@ -1222,83 +1139,102 @@ var script$J = /* @__PURE__ */ defineComponent({
|
|
|
1222
1139
|
}
|
|
1223
1140
|
});
|
|
1224
1141
|
|
|
1225
|
-
script$
|
|
1142
|
+
script$H.__file = "src/shared/components/DeviceVersion.vue";
|
|
1226
1143
|
|
|
1227
|
-
var script$
|
|
1144
|
+
var script$G = /* @__PURE__ */ defineComponent({
|
|
1228
1145
|
__name: "OcrIcon",
|
|
1229
1146
|
props: {
|
|
1230
1147
|
disabled: { type: Boolean, required: false, default: false },
|
|
1231
1148
|
side: { type: String, required: false, default: "face" },
|
|
1232
|
-
|
|
1233
|
-
uploadUrl: { type: String, required: false, default: "/saas-base/file/uploadPublic" },
|
|
1234
|
-
customUpload: { type: Function, required: false },
|
|
1235
|
-
hasUploadVo: { type: Boolean, required: false, default: true },
|
|
1236
|
-
customClick: { type: Boolean, required: false, default: false }
|
|
1149
|
+
class: { type: String, required: false, default: "" }
|
|
1237
1150
|
},
|
|
1238
1151
|
emits: ["complete"],
|
|
1239
|
-
setup(__props, {
|
|
1152
|
+
setup(__props, { emit: __emit }) {
|
|
1240
1153
|
const appKitOptions = useAppKitOptions();
|
|
1241
|
-
const $http = useHttp$3(), $n = useNutshell();
|
|
1242
1154
|
const emits = __emit;
|
|
1243
1155
|
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);
|
|
1169
|
+
}
|
|
1170
|
+
});
|
|
1171
|
+
});
|
|
1172
|
+
}
|
|
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
|
+
}
|
|
1244
1182
|
function allTrim(str) {
|
|
1245
1183
|
return str.replace(/\s+/g, "");
|
|
1246
1184
|
}
|
|
1247
1185
|
async function onUploadFile(csRes) {
|
|
1248
1186
|
let result = null;
|
|
1249
1187
|
try {
|
|
1188
|
+
console.log("===\u4E0A\u4F20", csRes);
|
|
1250
1189
|
let { path, size, tempFilePath } = csRes.tempFiles[0];
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
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;
|
|
1256
1196
|
}
|
|
1257
|
-
|
|
1197
|
+
console.log(filePath, "filePath");
|
|
1198
|
+
showLoading({ title: "\u8EAB\u4EFD\u8BC1\u8BC6\u522B\u4E2D.." });
|
|
1258
1199
|
const session = appKitOptions.token();
|
|
1259
1200
|
const baseUrl = appKitOptions.baseUrl();
|
|
1260
1201
|
const upRes = await uploadFile({
|
|
1261
|
-
url:
|
|
1202
|
+
url: baseUrl + "/hkapprove/ocr/idcard",
|
|
1262
1203
|
filePath,
|
|
1263
1204
|
name: "file",
|
|
1264
1205
|
formData: {
|
|
1265
1206
|
objectNo: `min${Date.now()}`,
|
|
1266
|
-
side: props.side
|
|
1267
|
-
appCode: appKitOptions.app()
|
|
1207
|
+
side: props.side
|
|
1268
1208
|
},
|
|
1269
1209
|
header: {
|
|
1270
1210
|
token: session || ""
|
|
1271
1211
|
}
|
|
1272
1212
|
});
|
|
1213
|
+
hideLoading();
|
|
1273
1214
|
const res = JSON.parse(upRes.data);
|
|
1274
1215
|
if (res.code === "200") {
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
showToast({ title: "\u8BC6\u522B\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5", icon: "none" });
|
|
1296
|
-
}
|
|
1297
|
-
} else {
|
|
1298
|
-
await getOcrInfo(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" });
|
|
1299
1236
|
}
|
|
1300
1237
|
} else {
|
|
1301
|
-
hideLoading();
|
|
1302
1238
|
showToast({
|
|
1303
1239
|
title: res.msg,
|
|
1304
1240
|
icon: "error"
|
|
@@ -1308,42 +1244,7 @@ var script$I = /* @__PURE__ */ defineComponent({
|
|
|
1308
1244
|
hideLoading();
|
|
1309
1245
|
console.log(err);
|
|
1310
1246
|
}
|
|
1311
|
-
|
|
1312
|
-
}
|
|
1313
|
-
async function getOcrInfo(file) {
|
|
1314
|
-
try {
|
|
1315
|
-
const res = await $http.get("/hkbase/common/idCard", {
|
|
1316
|
-
fileUrl: typeof file === "string" ? file : file.originalUrl,
|
|
1317
|
-
side: props.side
|
|
1318
|
-
});
|
|
1319
|
-
hideLoading();
|
|
1320
|
-
if (props.side === "face" && !res?.name || props.side === "back" && !res?.signDate) {
|
|
1321
|
-
$n.dialog({
|
|
1322
|
-
title: "\u8BC6\u522B\u5931\u8D25",
|
|
1323
|
-
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`,
|
|
1324
|
-
okText: "\u6211\u77E5\u9053\u4E86",
|
|
1325
|
-
cancelText: ""
|
|
1326
|
-
});
|
|
1327
|
-
return;
|
|
1328
|
-
}
|
|
1329
|
-
emits("complete", {
|
|
1330
|
-
faceInfo: {
|
|
1331
|
-
name: allTrim(res?.name || ""),
|
|
1332
|
-
certNo: allTrim(res?.cardNumber || ""),
|
|
1333
|
-
address: allTrim(res?.address || "")
|
|
1334
|
-
},
|
|
1335
|
-
backInfo: {
|
|
1336
|
-
startDate: res?.expireDate || "",
|
|
1337
|
-
endDate: res?.signDate || ""
|
|
1338
|
-
},
|
|
1339
|
-
fileUploadVO: {
|
|
1340
|
-
fileUrl: typeof file === "string" ? file : file.originalUrl,
|
|
1341
|
-
fileKey: typeof file === "string" ? file : file.fileId
|
|
1342
|
-
}
|
|
1343
|
-
});
|
|
1344
|
-
} catch (err) {
|
|
1345
|
-
hideLoading();
|
|
1346
|
-
}
|
|
1247
|
+
emits("complete", result);
|
|
1347
1248
|
}
|
|
1348
1249
|
const activeSheetVisible = ref(false);
|
|
1349
1250
|
const actionSheetMenus = [
|
|
@@ -1370,556 +1271,32 @@ var script$I = /* @__PURE__ */ defineComponent({
|
|
|
1370
1271
|
sourceType: [item.type],
|
|
1371
1272
|
// "camera" | "album"
|
|
1372
1273
|
maxDuration: 60
|
|
1373
|
-
// 使用duration属性判断是图片还是视频,图片没有该属性
|
|
1374
|
-
});
|
|
1375
|
-
onUploadFile(csRes);
|
|
1376
|
-
} else {
|
|
1377
|
-
const csRes = await chooseMessageFile({
|
|
1378
|
-
count: 1,
|
|
1379
|
-
type: "image"
|
|
1380
|
-
});
|
|
1381
|
-
onUploadFile(csRes);
|
|
1382
|
-
}
|
|
1383
|
-
}
|
|
1384
|
-
async function onUpload() {
|
|
1385
|
-
if (props.disabled) return;
|
|
1386
|
-
if (Taro.getEnv() === "WEB") {
|
|
1387
|
-
const csRes = await chooseMedia({
|
|
1388
|
-
count: 1,
|
|
1389
|
-
sourceType: ["album"],
|
|
1390
|
-
// "camera" | "album"
|
|
1391
|
-
maxDuration: 60
|
|
1392
|
-
// 使用duration属性判断是图片还是视频,图片没有该属性
|
|
1393
|
-
});
|
|
1394
|
-
onUploadFile(csRes);
|
|
1395
|
-
return;
|
|
1396
|
-
}
|
|
1397
|
-
activeSheetVisible.value = true;
|
|
1398
|
-
}
|
|
1399
|
-
__expose({
|
|
1400
|
-
onUpload
|
|
1401
|
-
});
|
|
1402
|
-
return (_ctx, _cache) => {
|
|
1403
|
-
const _component_nut_action_sheet = ActionSheet;
|
|
1404
|
-
const _directive_track_click = resolveDirective("track-click");
|
|
1405
|
-
return openBlock(), createElementBlock(
|
|
1406
|
-
Fragment,
|
|
1407
|
-
null,
|
|
1408
|
-
[
|
|
1409
|
-
withDirectives((openBlock(), createElementBlock(
|
|
1410
|
-
"div",
|
|
1411
|
-
{
|
|
1412
|
-
class: normalizeClass(["ocr-icon", [__props.disabled ? "disabled" : "", __props.className]]),
|
|
1413
|
-
onClick: _cache[0] || (_cache[0] = ($event) => !__props.customClick ? onUpload() : null)
|
|
1414
|
-
},
|
|
1415
|
-
[
|
|
1416
|
-
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
1417
|
-
createVNode(unref(NsIcon), { name: "https://cdn.ddjf.com/static/images/beidouxing/ocr-icon.png" })
|
|
1418
|
-
])
|
|
1419
|
-
],
|
|
1420
|
-
2
|
|
1421
|
-
/* CLASS */
|
|
1422
|
-
)), [
|
|
1423
|
-
[_directive_track_click, "\u8EAB\u4EFD\u8BC1\u8BC6\u522B-\u70B9\u51FB"]
|
|
1424
|
-
]),
|
|
1425
|
-
createVNode(_component_nut_action_sheet, {
|
|
1426
|
-
visible: activeSheetVisible.value,
|
|
1427
|
-
"onUpdate:visible": _cache[1] || (_cache[1] = ($event) => activeSheetVisible.value = $event),
|
|
1428
|
-
"menu-items": actionSheetMenus,
|
|
1429
|
-
onChoose: chooseImages,
|
|
1430
|
-
"cancel-txt": "\u53D6\u6D88"
|
|
1431
|
-
}, null, 8, ["visible"])
|
|
1432
|
-
],
|
|
1433
|
-
64
|
|
1434
|
-
/* STABLE_FRAGMENT */
|
|
1435
|
-
);
|
|
1436
|
-
};
|
|
1437
|
-
}
|
|
1438
|
-
});
|
|
1439
|
-
|
|
1440
|
-
script$I.__file = "src/shared/components/OcrIcon.vue";
|
|
1441
|
-
|
|
1442
|
-
var script$H = /* @__PURE__ */ defineComponent({
|
|
1443
|
-
__name: "OcrBank",
|
|
1444
|
-
props: {
|
|
1445
|
-
disabled: { type: Boolean, required: false, default: false },
|
|
1446
|
-
class: { type: String, required: false, default: "" },
|
|
1447
|
-
uploadUrl: { type: String, required: false, default: "/hkbase/file/uploadFile" },
|
|
1448
|
-
customClick: { type: Boolean, required: false, default: false }
|
|
1449
|
-
},
|
|
1450
|
-
emits: ["complete"],
|
|
1451
|
-
setup(__props, { expose: __expose, emit: __emit }) {
|
|
1452
|
-
const appKitOptions = useAppKitOptions();
|
|
1453
|
-
const $http = useHttp$3(), $n = useNutshell();
|
|
1454
|
-
const emits = __emit;
|
|
1455
|
-
const props = __props;
|
|
1456
|
-
async function onUploadFile(csRes) {
|
|
1457
|
-
try {
|
|
1458
|
-
let { path, size, tempFilePath } = csRes.tempFiles[0];
|
|
1459
|
-
const compressImg = await compressImage(path || tempFilePath, getCompressQuality(size)) || {};
|
|
1460
|
-
const filePath = compressImg.tempFilePath || path;
|
|
1461
|
-
showLoading({ title: "\u94F6\u884C\u5361\u8BC6\u522B\u4E2D..", mask: true });
|
|
1462
|
-
const session = appKitOptions.token();
|
|
1463
|
-
const baseUrl = appKitOptions.baseUrl();
|
|
1464
|
-
const upRes = await uploadFile({
|
|
1465
|
-
url: baseUrl + props.uploadUrl,
|
|
1466
|
-
filePath,
|
|
1467
|
-
name: "file",
|
|
1468
|
-
formData: {
|
|
1469
|
-
objectNo: `min${Date.now()}`,
|
|
1470
|
-
appCode: appKitOptions.app()
|
|
1471
|
-
},
|
|
1472
|
-
header: {
|
|
1473
|
-
token: session || ""
|
|
1474
|
-
}
|
|
1475
|
-
});
|
|
1476
|
-
const res = JSON.parse(upRes.data);
|
|
1477
|
-
if (res.code === "200") {
|
|
1478
|
-
await getBankCardInfo(res.result);
|
|
1479
|
-
} else {
|
|
1480
|
-
hideLoading();
|
|
1481
|
-
showToast({
|
|
1482
|
-
title: res.msg,
|
|
1483
|
-
icon: "error"
|
|
1484
|
-
});
|
|
1485
|
-
}
|
|
1486
|
-
} catch (err) {
|
|
1487
|
-
hideLoading();
|
|
1488
|
-
console.log(err);
|
|
1489
|
-
}
|
|
1490
|
-
}
|
|
1491
|
-
async function getBankCardInfo(file) {
|
|
1492
|
-
try {
|
|
1493
|
-
const res = await $http.get("/hkbase/common/bankCard", {
|
|
1494
|
-
fileUrl: typeof file === "string" ? file : file.originalUrl
|
|
1495
|
-
});
|
|
1496
|
-
hideLoading();
|
|
1497
|
-
if (res && !res.bankCardNumber) {
|
|
1498
|
-
$n.dialog({
|
|
1499
|
-
title: "\u8BC6\u522B\u5931\u8D25",
|
|
1500
|
-
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`,
|
|
1501
|
-
okText: "\u6211\u77E5\u9053\u4E86",
|
|
1502
|
-
cancelText: ""
|
|
1503
|
-
});
|
|
1504
|
-
return;
|
|
1505
|
-
}
|
|
1506
|
-
emits("complete", {
|
|
1507
|
-
...res,
|
|
1508
|
-
fileUrl: typeof file === "string" ? file : file.originalUrl,
|
|
1509
|
-
fileKey: typeof file === "string" ? file : file.fileId
|
|
1510
|
-
});
|
|
1511
|
-
} catch (err) {
|
|
1512
|
-
hideLoading();
|
|
1513
|
-
}
|
|
1514
|
-
}
|
|
1515
|
-
const activeSheetVisible = ref(false);
|
|
1516
|
-
const actionSheetMenus = [
|
|
1517
|
-
{
|
|
1518
|
-
name: "\u62CD\u6444",
|
|
1519
|
-
type: "camera"
|
|
1520
|
-
},
|
|
1521
|
-
{
|
|
1522
|
-
name: "\u4ECE\u76F8\u518C\u9009\u62E9",
|
|
1523
|
-
type: "album"
|
|
1524
|
-
},
|
|
1525
|
-
{
|
|
1526
|
-
name: "\u4ECE\u804A\u5929\u4F1A\u8BDD\u9009\u62E9",
|
|
1527
|
-
type: "message"
|
|
1528
|
-
}
|
|
1529
|
-
];
|
|
1530
|
-
if (Taro.getEnv() === "WEB") {
|
|
1531
|
-
actionSheetMenus.pop();
|
|
1532
|
-
}
|
|
1533
|
-
async function chooseImages(item) {
|
|
1534
|
-
if (["camera", "album"].includes(item.type)) {
|
|
1535
|
-
const csRes = await chooseMedia({
|
|
1536
|
-
count: 1,
|
|
1537
|
-
sourceType: [item.type],
|
|
1538
|
-
// "camera" | "album"
|
|
1539
|
-
maxDuration: 60
|
|
1540
|
-
// 使用duration属性判断是图片还是视频,图片没有该属性
|
|
1541
|
-
});
|
|
1542
|
-
onUploadFile(csRes);
|
|
1543
|
-
} else {
|
|
1544
|
-
const csRes = await chooseMessageFile({
|
|
1545
|
-
count: 1,
|
|
1546
|
-
type: "image"
|
|
1547
|
-
});
|
|
1548
|
-
onUploadFile(csRes);
|
|
1549
|
-
}
|
|
1550
|
-
}
|
|
1551
|
-
async function onUpload() {
|
|
1552
|
-
if (props.disabled) return;
|
|
1553
|
-
if (Taro.getEnv() === "WEB") {
|
|
1554
|
-
const csRes = await chooseMedia({
|
|
1555
|
-
count: 1,
|
|
1556
|
-
sourceType: ["album"],
|
|
1557
|
-
// "camera" | "album"
|
|
1558
|
-
maxDuration: 60
|
|
1559
|
-
// 使用duration属性判断是图片还是视频,图片没有该属性
|
|
1560
|
-
});
|
|
1561
|
-
onUploadFile(csRes);
|
|
1562
|
-
return;
|
|
1563
|
-
}
|
|
1564
|
-
activeSheetVisible.value = true;
|
|
1565
|
-
}
|
|
1566
|
-
__expose({
|
|
1567
|
-
onUpload
|
|
1568
|
-
});
|
|
1569
|
-
return (_ctx, _cache) => {
|
|
1570
|
-
const _component_nut_action_sheet = ActionSheet;
|
|
1571
|
-
const _directive_track_click = resolveDirective("track-click");
|
|
1572
|
-
return openBlock(), createElementBlock(
|
|
1573
|
-
Fragment,
|
|
1574
|
-
null,
|
|
1575
|
-
[
|
|
1576
|
-
withDirectives((openBlock(), createElementBlock(
|
|
1577
|
-
"div",
|
|
1578
|
-
{
|
|
1579
|
-
class: normalizeClass(["ocr-bank", [__props.disabled ? "disabled" : ""]]),
|
|
1580
|
-
onClick: _cache[0] || (_cache[0] = ($event) => !__props.customClick ? onUpload() : null)
|
|
1581
|
-
},
|
|
1582
|
-
[
|
|
1583
|
-
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
1584
|
-
createVNode(unref(NsIcon), { name: "https://cdn.ddjf.com/static/images/beidouxing/ocr-icon.png" })
|
|
1585
|
-
])
|
|
1586
|
-
],
|
|
1587
|
-
2
|
|
1588
|
-
/* CLASS */
|
|
1589
|
-
)), [
|
|
1590
|
-
[_directive_track_click, "\u94F6\u884C\u5361\u8BC6\u522B-\u70B9\u51FB"]
|
|
1591
|
-
]),
|
|
1592
|
-
createVNode(_component_nut_action_sheet, {
|
|
1593
|
-
visible: activeSheetVisible.value,
|
|
1594
|
-
"onUpdate:visible": _cache[1] || (_cache[1] = ($event) => activeSheetVisible.value = $event),
|
|
1595
|
-
"menu-items": actionSheetMenus,
|
|
1596
|
-
onChoose: chooseImages,
|
|
1597
|
-
"cancel-txt": "\u53D6\u6D88"
|
|
1598
|
-
}, null, 8, ["visible"])
|
|
1599
|
-
],
|
|
1600
|
-
64
|
|
1601
|
-
/* STABLE_FRAGMENT */
|
|
1602
|
-
);
|
|
1603
|
-
};
|
|
1604
|
-
}
|
|
1605
|
-
});
|
|
1606
|
-
|
|
1607
|
-
script$H.__file = "src/shared/components/OcrBank.vue";
|
|
1608
|
-
|
|
1609
|
-
var script$G = /* @__PURE__ */ defineComponent({
|
|
1610
|
-
__name: "OcrBusinessLicense",
|
|
1611
|
-
props: {
|
|
1612
|
-
disabled: { type: Boolean, required: true, default: false },
|
|
1613
|
-
customClick: { type: Boolean, required: false, default: false }
|
|
1614
|
-
},
|
|
1615
|
-
emits: ["complete"],
|
|
1616
|
-
setup(__props, { expose: __expose, emit: __emit }) {
|
|
1617
|
-
const appKitOptions = useAppKitOptions();
|
|
1618
|
-
const emits = __emit;
|
|
1619
|
-
const props = __props;
|
|
1620
|
-
function allTrim(str) {
|
|
1621
|
-
return str.replace(/\s+/g, "");
|
|
1622
|
-
}
|
|
1623
|
-
async function onUpload() {
|
|
1624
|
-
if (props.disabled) {
|
|
1625
|
-
return;
|
|
1626
|
-
}
|
|
1627
|
-
let result = null;
|
|
1628
|
-
try {
|
|
1629
|
-
const csRes = await chooseMedia({
|
|
1630
|
-
count: 1,
|
|
1631
|
-
sourceType: ["album", "camera"]
|
|
1632
|
-
});
|
|
1633
|
-
let { size, tempFilePath } = csRes.tempFiles[0];
|
|
1634
|
-
const compressImg = await compressImage(tempFilePath, getCompressQuality(size)) || {};
|
|
1635
|
-
const filePath = compressImg.tempFilePath;
|
|
1636
|
-
showLoading({ title: "\u8425\u4E1A\u6267\u7167\u8BC6\u522B\u4E2D..", mask: true });
|
|
1637
|
-
const session = appKitOptions.token();
|
|
1638
|
-
const baseUrl = appKitOptions.baseUrl();
|
|
1639
|
-
const upRes = await uploadFile({
|
|
1640
|
-
url: baseUrl + "/promoact/common/parseBusinessLicense",
|
|
1641
|
-
filePath,
|
|
1642
|
-
name: "file",
|
|
1643
|
-
formData: {
|
|
1644
|
-
objectNo: `min${Date.now()}`,
|
|
1645
|
-
appCode: appKitOptions.app()
|
|
1646
|
-
},
|
|
1647
|
-
header: {
|
|
1648
|
-
token: session || ""
|
|
1649
|
-
}
|
|
1650
|
-
});
|
|
1651
|
-
hideLoading();
|
|
1652
|
-
const res = JSON.parse(upRes.data);
|
|
1653
|
-
if (res.code === "200") {
|
|
1654
|
-
const faceInfo = res.result || {};
|
|
1655
|
-
result = {
|
|
1656
|
-
companyName: allTrim(faceInfo.companyName || ""),
|
|
1657
|
-
idCardNo: allTrim(faceInfo.idCardNo || ""),
|
|
1658
|
-
legalPersonName: allTrim(faceInfo.legalPersonName || ""),
|
|
1659
|
-
fileId: faceInfo.fileId,
|
|
1660
|
-
originalUrl: faceInfo.originalUrl,
|
|
1661
|
-
downloadUrl: faceInfo.downloadUrl
|
|
1662
|
-
};
|
|
1663
|
-
console.log("===\u8BC6\u522B", result);
|
|
1664
|
-
if (!result.companyName && !result.idCardNo) {
|
|
1665
|
-
showToast({ title: "\u8BC6\u522B\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5", icon: "none" });
|
|
1666
|
-
}
|
|
1667
|
-
} else {
|
|
1668
|
-
showToast({
|
|
1669
|
-
title: res.msg,
|
|
1670
|
-
icon: "error"
|
|
1671
|
-
});
|
|
1672
|
-
}
|
|
1673
|
-
} catch (err) {
|
|
1674
|
-
hideLoading();
|
|
1675
|
-
console.log(err);
|
|
1676
|
-
}
|
|
1677
|
-
emits("complete", result);
|
|
1678
|
-
}
|
|
1679
|
-
__expose({
|
|
1680
|
-
onUpload
|
|
1681
|
-
});
|
|
1682
|
-
return (_ctx, _cache) => {
|
|
1683
|
-
const _directive_track_click = resolveDirective("track-click");
|
|
1684
|
-
return withDirectives((openBlock(), createElementBlock(
|
|
1685
|
-
"div",
|
|
1686
|
-
{
|
|
1687
|
-
class: normalizeClass([["ocr-business-license", __props.disabled ? "disabled" : ""], "ocr-icon"]),
|
|
1688
|
-
onClick: _cache[0] || (_cache[0] = ($event) => !__props.customClick ? onUpload() : null)
|
|
1689
|
-
},
|
|
1690
|
-
[
|
|
1691
|
-
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
1692
|
-
createVNode(unref(NsIcon), { name: "https://cdn.ddjf.com/static/images/beidouxing/ocr-icon.png" })
|
|
1693
|
-
])
|
|
1694
|
-
],
|
|
1695
|
-
2
|
|
1696
|
-
/* CLASS */
|
|
1697
|
-
)), [
|
|
1698
|
-
[_directive_track_click, "\u8425\u4E1A\u6267\u7167\u8BC6\u522B-\u70B9\u51FB"]
|
|
1699
|
-
]);
|
|
1700
|
-
};
|
|
1701
|
-
}
|
|
1702
|
-
});
|
|
1703
|
-
|
|
1704
|
-
script$G.__file = "src/shared/components/OcrBusinessLicense.vue";
|
|
1705
|
-
|
|
1706
|
-
var script$F = /* @__PURE__ */ defineComponent({
|
|
1707
|
-
__name: "OcrInvoice",
|
|
1708
|
-
props: {
|
|
1709
|
-
disabled: { type: Boolean, required: false, default: false },
|
|
1710
|
-
side: { type: String, required: false, default: "face" },
|
|
1711
|
-
className: { type: String, required: false, default: "" },
|
|
1712
|
-
customUpload: { type: Function, required: false },
|
|
1713
|
-
uploadUrl: { type: String, required: false, default: "/hkbase/file/uploadFile" },
|
|
1714
|
-
customClick: { type: Boolean, required: false, default: false }
|
|
1715
|
-
},
|
|
1716
|
-
emits: ["complete"],
|
|
1717
|
-
setup(__props, { expose: __expose, emit: __emit }) {
|
|
1718
|
-
const appKitOptions = useAppKitOptions();
|
|
1719
|
-
const $http = useHttp$3(), $n = useNutshell();
|
|
1720
|
-
const emits = __emit;
|
|
1721
|
-
const props = __props;
|
|
1722
|
-
function getFileType(filePath, fileName) {
|
|
1723
|
-
const lowerPath = filePath.toLowerCase();
|
|
1724
|
-
const lowerName = (fileName || "").toLowerCase();
|
|
1725
|
-
if (lowerPath.endsWith(".pdf") || lowerName.endsWith(".pdf")) {
|
|
1726
|
-
return "pdf";
|
|
1727
|
-
}
|
|
1728
|
-
const imageExtensions = [".jpg", ".jpeg", ".png", ".gif", ".bmp", ".webp"];
|
|
1729
|
-
if (imageExtensions.some((ext) => lowerPath.endsWith(ext) || lowerName.endsWith(ext))) {
|
|
1730
|
-
return "img";
|
|
1731
|
-
}
|
|
1732
|
-
return "img";
|
|
1733
|
-
}
|
|
1734
|
-
async function onUploadFile(csRes, fileType) {
|
|
1735
|
-
try {
|
|
1736
|
-
let { path, size, tempFilePath, name } = csRes.tempFiles[0];
|
|
1737
|
-
const originalPath = path || tempFilePath;
|
|
1738
|
-
const detectedFileType = fileType || getFileType(originalPath, name);
|
|
1739
|
-
let filePath = originalPath;
|
|
1740
|
-
if (detectedFileType === "img") {
|
|
1741
|
-
const compressImg = await compressImage(originalPath, getCompressQuality(size)) || {};
|
|
1742
|
-
filePath = compressImg.tempFilePath || originalPath;
|
|
1743
|
-
}
|
|
1744
|
-
if (props.customUpload) {
|
|
1745
|
-
props.customUpload(filePath, detectedFileType);
|
|
1746
|
-
return;
|
|
1747
|
-
}
|
|
1748
|
-
showLoading({ title: "\u53D1\u7968\u8BC6\u522B\u4E2D..", mask: true });
|
|
1749
|
-
const session = appKitOptions.token();
|
|
1750
|
-
const baseUrl = appKitOptions.baseUrl();
|
|
1751
|
-
const upRes = await uploadFile({
|
|
1752
|
-
url: `${baseUrl}${props.uploadUrl}`,
|
|
1753
|
-
filePath,
|
|
1754
|
-
name: "file",
|
|
1755
|
-
formData: {
|
|
1756
|
-
objectNo: `min${Date.now()}`,
|
|
1757
|
-
appCode: appKitOptions.app()
|
|
1758
|
-
},
|
|
1759
|
-
header: {
|
|
1760
|
-
token: session || ""
|
|
1761
|
-
}
|
|
1762
|
-
});
|
|
1763
|
-
const res = JSON.parse(upRes.data);
|
|
1764
|
-
if (res.code === "200") {
|
|
1765
|
-
await getOcrInfo(res.result, detectedFileType);
|
|
1766
|
-
} else {
|
|
1767
|
-
hideLoading();
|
|
1768
|
-
showToast({
|
|
1769
|
-
title: res.msg,
|
|
1770
|
-
icon: "error"
|
|
1771
|
-
});
|
|
1772
|
-
}
|
|
1773
|
-
} catch (err) {
|
|
1774
|
-
hideLoading();
|
|
1775
|
-
console.log(err);
|
|
1776
|
-
}
|
|
1777
|
-
}
|
|
1778
|
-
async function getOcrInfo(file, fileType = "img") {
|
|
1779
|
-
try {
|
|
1780
|
-
const fileUrl = typeof file === "string" ? file : file.originalUrl;
|
|
1781
|
-
const res = await $http.get("/hkbase/common/vatInvoice", {
|
|
1782
|
-
fileUrl,
|
|
1783
|
-
fileType
|
|
1784
|
-
});
|
|
1785
|
-
hideLoading();
|
|
1786
|
-
if (!res?.purchaserRegisterNum) {
|
|
1787
|
-
$n.dialog({
|
|
1788
|
-
title: "\u8BC6\u522B\u5931\u8D25",
|
|
1789
|
-
message: `\u60A8\u4E0A\u4F20\u7684${fileType === "pdf" ? "\u6587\u4EF6" : "\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${fileType === "pdf" ? "PDF\u6587\u4EF6" : "\u56FE\u7247"}\u3002\u8C22\u8C22\uFF01`,
|
|
1790
|
-
okText: "\u6211\u77E5\u9053\u4E86",
|
|
1791
|
-
cancelText: ""
|
|
1792
|
-
});
|
|
1793
|
-
return;
|
|
1794
|
-
}
|
|
1795
|
-
emits("complete", {
|
|
1796
|
-
invoiceDate: res?.invoiceDate,
|
|
1797
|
-
invoiceNum: res?.invoiceNum,
|
|
1798
|
-
invoiceNumConfirm: res?.invoiceNumConfirm,
|
|
1799
|
-
invoiceType: res?.invoiceType,
|
|
1800
|
-
noteDrawer: res?.noteDrawer,
|
|
1801
|
-
purchaserBank: res?.purchaserBank,
|
|
1802
|
-
purchaserName: res?.purchaserName,
|
|
1803
|
-
purchaserRegisterNum: res?.purchaserRegisterNum,
|
|
1804
|
-
remarks: res?.remarks,
|
|
1805
|
-
sellerName: res?.sellerName,
|
|
1806
|
-
sellerRegisterNum: res?.sellerRegisterNum,
|
|
1807
|
-
serviceType: res?.serviceType,
|
|
1808
|
-
totalAmount: res?.totalAmount,
|
|
1809
|
-
totalTax: res?.totalTax,
|
|
1810
|
-
fileUrl,
|
|
1811
|
-
fileType,
|
|
1812
|
-
fileKey: typeof file === "string" ? file : file.fileId
|
|
1813
|
-
});
|
|
1814
|
-
} catch (err) {
|
|
1815
|
-
hideLoading();
|
|
1816
|
-
}
|
|
1817
|
-
}
|
|
1818
|
-
const activeSheetVisible = ref(false);
|
|
1819
|
-
const actionSheetMenus = [
|
|
1820
|
-
{
|
|
1821
|
-
name: "\u62CD\u6444",
|
|
1822
|
-
type: "camera"
|
|
1823
|
-
},
|
|
1824
|
-
{
|
|
1825
|
-
name: "\u4ECE\u76F8\u518C\u9009\u62E9",
|
|
1826
|
-
type: "album"
|
|
1827
|
-
},
|
|
1828
|
-
{
|
|
1829
|
-
name: "\u4ECE\u804A\u5929\u4F1A\u8BDD\u9009\u62E9",
|
|
1830
|
-
type: "message"
|
|
1831
|
-
},
|
|
1832
|
-
{
|
|
1833
|
-
name: "\u9009\u62E9\u6587\u4EF6",
|
|
1834
|
-
type: "file"
|
|
1835
|
-
}
|
|
1836
|
-
];
|
|
1837
|
-
if (Taro.getEnv() === "WEB") {
|
|
1838
|
-
actionSheetMenus.splice(2, 1);
|
|
1839
|
-
}
|
|
1840
|
-
async function chooseImages(item) {
|
|
1841
|
-
if (["camera", "album"].includes(item.type)) {
|
|
1842
|
-
const csRes = await chooseMedia({
|
|
1843
|
-
count: 1,
|
|
1844
|
-
sourceType: [item.type],
|
|
1845
|
-
// "camera" | "album"
|
|
1846
|
-
maxDuration: 60
|
|
1847
|
-
// 使用duration属性判断是图片还是视频,图片没有该属性
|
|
1848
|
-
});
|
|
1849
|
-
onUploadFile(csRes);
|
|
1850
|
-
} else if (item.type === "message") {
|
|
1851
|
-
const csRes = await chooseMessageFile({
|
|
1852
|
-
count: 1,
|
|
1853
|
-
type: "image"
|
|
1854
|
-
});
|
|
1855
|
-
onUploadFile(csRes);
|
|
1856
|
-
} else if (item.type === "file") {
|
|
1857
|
-
const csRes = await chooseMessageFile({
|
|
1858
|
-
count: 1,
|
|
1859
|
-
type: "file"
|
|
1860
|
-
});
|
|
1861
|
-
onUploadFile(csRes);
|
|
1862
|
-
}
|
|
1863
|
-
}
|
|
1864
|
-
function chooseFileInWeb() {
|
|
1865
|
-
return new Promise((resolve, reject) => {
|
|
1866
|
-
const input = document.createElement("input");
|
|
1867
|
-
input.type = "file";
|
|
1868
|
-
input.accept = "image/*,.pdf";
|
|
1869
|
-
input.style.display = "none";
|
|
1870
|
-
input.onchange = async (e) => {
|
|
1871
|
-
const file = e.target?.files?.[0];
|
|
1872
|
-
if (!file) {
|
|
1873
|
-
document.body.removeChild(input);
|
|
1874
|
-
resolve();
|
|
1875
|
-
return;
|
|
1876
|
-
}
|
|
1877
|
-
let fileType = "img";
|
|
1878
|
-
if (file.type === "application/pdf" || file.name.toLowerCase().endsWith(".pdf")) {
|
|
1879
|
-
fileType = "pdf";
|
|
1880
|
-
}
|
|
1881
|
-
const filePath = URL.createObjectURL(file);
|
|
1882
|
-
try {
|
|
1883
|
-
const csRes = {
|
|
1884
|
-
tempFiles: [{
|
|
1885
|
-
path: filePath,
|
|
1886
|
-
tempFilePath: filePath,
|
|
1887
|
-
size: file.size,
|
|
1888
|
-
name: file.name
|
|
1889
|
-
}]
|
|
1890
|
-
};
|
|
1891
|
-
await onUploadFile(csRes, fileType);
|
|
1892
|
-
resolve();
|
|
1893
|
-
} catch (error) {
|
|
1894
|
-
reject(error);
|
|
1895
|
-
} finally {
|
|
1896
|
-
document.body.removeChild(input);
|
|
1897
|
-
URL.revokeObjectURL(filePath);
|
|
1898
|
-
}
|
|
1899
|
-
};
|
|
1900
|
-
input.oncancel = () => {
|
|
1901
|
-
document.body.removeChild(input);
|
|
1902
|
-
resolve();
|
|
1903
|
-
};
|
|
1904
|
-
document.body.appendChild(input);
|
|
1905
|
-
input.click();
|
|
1906
|
-
});
|
|
1274
|
+
// 使用duration属性判断是图片还是视频,图片没有该属性
|
|
1275
|
+
});
|
|
1276
|
+
onUploadFile(csRes);
|
|
1277
|
+
} else {
|
|
1278
|
+
const csRes = await chooseMessageFile({
|
|
1279
|
+
count: 1,
|
|
1280
|
+
type: "image"
|
|
1281
|
+
});
|
|
1282
|
+
onUploadFile(csRes);
|
|
1283
|
+
}
|
|
1907
1284
|
}
|
|
1908
|
-
async function
|
|
1285
|
+
async function onPhotograph() {
|
|
1909
1286
|
if (props.disabled) return;
|
|
1910
1287
|
if (Taro.getEnv() === "WEB") {
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1288
|
+
const csRes = await chooseMedia({
|
|
1289
|
+
count: 1,
|
|
1290
|
+
sourceType: ["album"],
|
|
1291
|
+
// "camera" | "album"
|
|
1292
|
+
maxDuration: 60
|
|
1293
|
+
// 使用duration属性判断是图片还是视频,图片没有该属性
|
|
1294
|
+
});
|
|
1295
|
+
onUploadFile(csRes);
|
|
1916
1296
|
return;
|
|
1917
1297
|
}
|
|
1918
1298
|
activeSheetVisible.value = true;
|
|
1919
1299
|
}
|
|
1920
|
-
__expose({
|
|
1921
|
-
onUpload
|
|
1922
|
-
});
|
|
1923
1300
|
return (_ctx, _cache) => {
|
|
1924
1301
|
const _component_nut_action_sheet = ActionSheet;
|
|
1925
1302
|
const _directive_track_click = resolveDirective("track-click");
|
|
@@ -1930,8 +1307,8 @@ var script$F = /* @__PURE__ */ defineComponent({
|
|
|
1930
1307
|
withDirectives((openBlock(), createElementBlock(
|
|
1931
1308
|
"div",
|
|
1932
1309
|
{
|
|
1933
|
-
class: normalizeClass(["ocr-
|
|
1934
|
-
onClick:
|
|
1310
|
+
class: normalizeClass(["ocr-icon", [__props.disabled ? "disabled" : ""]]),
|
|
1311
|
+
onClick: onPhotograph
|
|
1935
1312
|
},
|
|
1936
1313
|
[
|
|
1937
1314
|
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
@@ -1941,11 +1318,11 @@ var script$F = /* @__PURE__ */ defineComponent({
|
|
|
1941
1318
|
2
|
|
1942
1319
|
/* CLASS */
|
|
1943
1320
|
)), [
|
|
1944
|
-
[_directive_track_click, "\
|
|
1321
|
+
[_directive_track_click, "\u8EAB\u4EFD\u8BC1\u8BC6\u522B-\u70B9\u51FB"]
|
|
1945
1322
|
]),
|
|
1946
1323
|
createVNode(_component_nut_action_sheet, {
|
|
1947
1324
|
visible: activeSheetVisible.value,
|
|
1948
|
-
"onUpdate:visible": _cache[
|
|
1325
|
+
"onUpdate:visible": _cache[0] || (_cache[0] = ($event) => activeSheetVisible.value = $event),
|
|
1949
1326
|
"menu-items": actionSheetMenus,
|
|
1950
1327
|
onChoose: chooseImages,
|
|
1951
1328
|
"cancel-txt": "\u53D6\u6D88"
|
|
@@ -1958,7 +1335,125 @@ var script$F = /* @__PURE__ */ defineComponent({
|
|
|
1958
1335
|
}
|
|
1959
1336
|
});
|
|
1960
1337
|
|
|
1961
|
-
script$
|
|
1338
|
+
script$G.__file = "src/shared/components/OcrIcon.vue";
|
|
1339
|
+
|
|
1340
|
+
var script$F = /* @__PURE__ */ defineComponent({
|
|
1341
|
+
__name: "OcrBusinessLicense",
|
|
1342
|
+
props: {
|
|
1343
|
+
disabled: { type: Boolean, required: true }
|
|
1344
|
+
},
|
|
1345
|
+
emits: ["complete"],
|
|
1346
|
+
setup(__props, { emit: __emit }) {
|
|
1347
|
+
const appKitOptions = useAppKitOptions();
|
|
1348
|
+
const emits = __emit;
|
|
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
|
+
}
|
|
1372
|
+
function allTrim(str) {
|
|
1373
|
+
return str.replace(/\s+/g, "");
|
|
1374
|
+
}
|
|
1375
|
+
async function onIconClick() {
|
|
1376
|
+
if (props.disabled) {
|
|
1377
|
+
return;
|
|
1378
|
+
}
|
|
1379
|
+
console.log("===onIconClick");
|
|
1380
|
+
let result = null;
|
|
1381
|
+
try {
|
|
1382
|
+
const csRes = await chooseMedia({
|
|
1383
|
+
count: 1,
|
|
1384
|
+
sourceType: ["album", "camera"]
|
|
1385
|
+
});
|
|
1386
|
+
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.." });
|
|
1395
|
+
const session = appKitOptions.token();
|
|
1396
|
+
const baseUrl = appKitOptions.baseUrl();
|
|
1397
|
+
const upRes = await uploadFile({
|
|
1398
|
+
url: baseUrl + "/promoact/common/parseBusinessLicense",
|
|
1399
|
+
filePath,
|
|
1400
|
+
name: "file",
|
|
1401
|
+
formData: {
|
|
1402
|
+
objectNo: `min${Date.now()}`
|
|
1403
|
+
},
|
|
1404
|
+
header: {
|
|
1405
|
+
token: session || ""
|
|
1406
|
+
}
|
|
1407
|
+
});
|
|
1408
|
+
hideLoading();
|
|
1409
|
+
const res = JSON.parse(upRes.data);
|
|
1410
|
+
if (res.code === "200") {
|
|
1411
|
+
const faceInfo = res.result || {};
|
|
1412
|
+
result = {
|
|
1413
|
+
companyName: allTrim(faceInfo.companyName || ""),
|
|
1414
|
+
idCardNo: allTrim(faceInfo.idCardNo || ""),
|
|
1415
|
+
legalPersonName: allTrim(faceInfo.legalPersonName || ""),
|
|
1416
|
+
fileId: faceInfo.fileId,
|
|
1417
|
+
originalUrl: faceInfo.originalUrl,
|
|
1418
|
+
downloadUrl: faceInfo.downloadUrl
|
|
1419
|
+
};
|
|
1420
|
+
console.log("===\u8BC6\u522B", result);
|
|
1421
|
+
if (!result.companyName && !result.idCardNo) {
|
|
1422
|
+
showToast({ title: "\u8BC6\u522B\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5", icon: "none" });
|
|
1423
|
+
}
|
|
1424
|
+
} else {
|
|
1425
|
+
showToast({
|
|
1426
|
+
title: res.msg,
|
|
1427
|
+
icon: "error"
|
|
1428
|
+
});
|
|
1429
|
+
}
|
|
1430
|
+
} catch (err) {
|
|
1431
|
+
hideLoading();
|
|
1432
|
+
console.log(err);
|
|
1433
|
+
}
|
|
1434
|
+
emits("complete", result);
|
|
1435
|
+
}
|
|
1436
|
+
return (_ctx, _cache) => {
|
|
1437
|
+
const _directive_track_click = resolveDirective("track-click");
|
|
1438
|
+
return withDirectives((openBlock(), createElementBlock(
|
|
1439
|
+
"div",
|
|
1440
|
+
{
|
|
1441
|
+
class: normalizeClass([["ocr-business-license", __props.disabled ? "disabled" : ""], "ocr-icon"]),
|
|
1442
|
+
onClick: onIconClick
|
|
1443
|
+
},
|
|
1444
|
+
[
|
|
1445
|
+
createVNode(unref(NsIcon), { name: "https://cdn.ddjf.com/static/images/beidouxing/ocr-icon.png" })
|
|
1446
|
+
],
|
|
1447
|
+
2
|
|
1448
|
+
/* CLASS */
|
|
1449
|
+
)), [
|
|
1450
|
+
[_directive_track_click, "\u8425\u4E1A\u6267\u7167\u8BC6\u522B-\u70B9\u51FB"]
|
|
1451
|
+
]);
|
|
1452
|
+
};
|
|
1453
|
+
}
|
|
1454
|
+
});
|
|
1455
|
+
|
|
1456
|
+
script$F.__file = "src/shared/components/OcrBusinessLicense.vue";
|
|
1962
1457
|
|
|
1963
1458
|
var HttpMethod = /* @__PURE__ */ ((HttpMethod2) => {
|
|
1964
1459
|
HttpMethod2["get"] = "GET";
|
|
@@ -2006,7 +1501,6 @@ const request = (config) => {
|
|
|
2006
1501
|
}
|
|
2007
1502
|
}).catch((e) => {
|
|
2008
1503
|
console.log("request.catch===", e);
|
|
2009
|
-
reject(e);
|
|
2010
1504
|
});
|
|
2011
1505
|
});
|
|
2012
1506
|
};
|
|
@@ -2514,6 +2008,7 @@ class TrackingSDK {
|
|
|
2514
2008
|
* 发送埋点数据
|
|
2515
2009
|
*/
|
|
2516
2010
|
async flush() {
|
|
2011
|
+
console.log(this.eventQueue.length, "this.eventQueue.length");
|
|
2517
2012
|
if (this.eventQueue.length === 0) return;
|
|
2518
2013
|
const events = [...this.eventQueue];
|
|
2519
2014
|
this.eventQueue = [];
|
|
@@ -3199,11 +2694,9 @@ const endpointsList$2 = {
|
|
|
3199
2694
|
certificateNo: params.user,
|
|
3200
2695
|
accountAuthFlag: params.accountAuthFlag || false,
|
|
3201
2696
|
channelCode: params.channelCode || null,
|
|
3202
|
-
payFinishJumpUrl: params.payFinishJumpUrl || null
|
|
3203
|
-
useCloudBean: params.useCloudBean || false
|
|
2697
|
+
payFinishJumpUrl: params.payFinishJumpUrl || null
|
|
3204
2698
|
}),
|
|
3205
2699
|
transform: (data) => {
|
|
3206
|
-
console.log(data, "data-----");
|
|
3207
2700
|
let json = null;
|
|
3208
2701
|
try {
|
|
3209
2702
|
json = JSON.parse(data.prePayStr);
|
|
@@ -3271,7 +2764,6 @@ const vendor$2 = {
|
|
|
3271
2764
|
title: data.msg,
|
|
3272
2765
|
icon: "none"
|
|
3273
2766
|
});
|
|
3274
|
-
reject(data.msg);
|
|
3275
2767
|
}
|
|
3276
2768
|
}).catch((e) => {
|
|
3277
2769
|
reject(e);
|
|
@@ -3435,8 +2927,6 @@ const requestBrandWCPayByBean = (params, Appcode = "") => {
|
|
|
3435
2927
|
}
|
|
3436
2928
|
});
|
|
3437
2929
|
}
|
|
3438
|
-
}).catch(() => {
|
|
3439
|
-
resolve(false);
|
|
3440
2930
|
});
|
|
3441
2931
|
});
|
|
3442
2932
|
};
|
|
@@ -3465,7 +2955,7 @@ const isIOS = () => {
|
|
|
3465
2955
|
const _hoisted_1$B = { class: "view recharge-view" };
|
|
3466
2956
|
const _hoisted_2$r = { class: "flex-grow" };
|
|
3467
2957
|
const _hoisted_3$l = { class: "amount-footer" };
|
|
3468
|
-
const _hoisted_4$
|
|
2958
|
+
const _hoisted_4$g = { class: "agreement" };
|
|
3469
2959
|
var script$E = /* @__PURE__ */ defineComponent({
|
|
3470
2960
|
__name: "RechargeView",
|
|
3471
2961
|
props: {
|
|
@@ -3473,7 +2963,7 @@ var script$E = /* @__PURE__ */ defineComponent({
|
|
|
3473
2963
|
tenant: { type: String, required: true },
|
|
3474
2964
|
payFinishJumpUrl: { type: String, required: false }
|
|
3475
2965
|
},
|
|
3476
|
-
emits: ["complete", "agree"],
|
|
2966
|
+
emits: ["complete", "agree", "loaded"],
|
|
3477
2967
|
setup(__props, { emit: __emit }) {
|
|
3478
2968
|
const props = __props;
|
|
3479
2969
|
const { params } = useRouter();
|
|
@@ -3500,6 +2990,7 @@ var script$E = /* @__PURE__ */ defineComponent({
|
|
|
3500
2990
|
tenant: props.tenant
|
|
3501
2991
|
}).then((response) => {
|
|
3502
2992
|
amounts.value = response;
|
|
2993
|
+
emit("loaded");
|
|
3503
2994
|
});
|
|
3504
2995
|
});
|
|
3505
2996
|
const onPayClick = () => {
|
|
@@ -3562,14 +3053,15 @@ var script$E = /* @__PURE__ */ defineComponent({
|
|
|
3562
3053
|
const _directive_track_click = resolveDirective("track-click");
|
|
3563
3054
|
return openBlock(), createElementBlock("view", _hoisted_1$B, [
|
|
3564
3055
|
createElementVNode("view", _hoisted_2$r, [
|
|
3565
|
-
createVNode(script$
|
|
3056
|
+
createVNode(script$M, {
|
|
3566
3057
|
items: amounts.value,
|
|
3567
3058
|
selected: state.selected,
|
|
3568
3059
|
onChange: onAmountSelect
|
|
3569
|
-
}, null, 8, ["items", "selected"])
|
|
3060
|
+
}, null, 8, ["items", "selected"]),
|
|
3061
|
+
renderSlot(_ctx.$slots, "banner")
|
|
3570
3062
|
]),
|
|
3571
3063
|
createElementVNode("view", _hoisted_3$l, [
|
|
3572
|
-
createElementVNode("view", _hoisted_4$
|
|
3064
|
+
createElementVNode("view", _hoisted_4$g, [
|
|
3573
3065
|
createVNode(_component_nut_checkbox, {
|
|
3574
3066
|
modelValue: state.agreed,
|
|
3575
3067
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => state.agreed = $event)
|
|
@@ -3642,7 +3134,7 @@ const _hoisted_3$k = {
|
|
|
3642
3134
|
key: 0,
|
|
3643
3135
|
class: "caption"
|
|
3644
3136
|
};
|
|
3645
|
-
const _hoisted_4$
|
|
3137
|
+
const _hoisted_4$f = {
|
|
3646
3138
|
key: 1,
|
|
3647
3139
|
class: "caption"
|
|
3648
3140
|
};
|
|
@@ -3683,7 +3175,7 @@ var script$C = /* @__PURE__ */ defineComponent({
|
|
|
3683
3175
|
),
|
|
3684
3176
|
__props.payMethod == "bean" ? (openBlock(), createElementBlock("div", _hoisted_3$k, "\u6743\u76CA\u5DF2\u5230\u8D26")) : (openBlock(), createElementBlock(
|
|
3685
3177
|
"div",
|
|
3686
|
-
_hoisted_4$
|
|
3178
|
+
_hoisted_4$f,
|
|
3687
3179
|
toDisplayString(views[__props.type][1]) + "\u5C06\u57281\u5206\u949F\u4E4B\u5185\u5230\u8D26",
|
|
3688
3180
|
1
|
|
3689
3181
|
/* TEXT */
|
|
@@ -3830,8 +3322,8 @@ const _hoisted_3$i = {
|
|
|
3830
3322
|
key: 0,
|
|
3831
3323
|
class: "bean-buy"
|
|
3832
3324
|
};
|
|
3833
|
-
const _hoisted_4$
|
|
3834
|
-
const _hoisted_5$
|
|
3325
|
+
const _hoisted_4$e = { class: "left" };
|
|
3326
|
+
const _hoisted_5$c = {
|
|
3835
3327
|
key: 0,
|
|
3836
3328
|
class: "amount"
|
|
3837
3329
|
};
|
|
@@ -3841,35 +3333,26 @@ const _hoisted_6$9 = {
|
|
|
3841
3333
|
};
|
|
3842
3334
|
const _hoisted_7$6 = { class: "amount" };
|
|
3843
3335
|
const _hoisted_8$5 = ["src"];
|
|
3844
|
-
const _hoisted_9$4 = {
|
|
3845
|
-
key: 0,
|
|
3846
|
-
class: "balance-warning"
|
|
3847
|
-
};
|
|
3336
|
+
const _hoisted_9$4 = { class: "amount-footer" };
|
|
3848
3337
|
const _hoisted_10$3 = {
|
|
3849
|
-
key: 1,
|
|
3850
|
-
class: "balance-warning-tip"
|
|
3851
|
-
};
|
|
3852
|
-
const _hoisted_11$3 = { class: "amount-footer" };
|
|
3853
|
-
const _hoisted_12$3 = {
|
|
3854
3338
|
key: 0,
|
|
3855
3339
|
class: "agreement"
|
|
3856
3340
|
};
|
|
3857
|
-
const
|
|
3858
|
-
const
|
|
3859
|
-
const
|
|
3341
|
+
const _hoisted_11$3 = { class: "buy-amount" };
|
|
3342
|
+
const _hoisted_12$3 = { class: "left" };
|
|
3343
|
+
const _hoisted_13$2 = { class: "amount" };
|
|
3344
|
+
const _hoisted_14$2 = { class: "item" };
|
|
3345
|
+
const _hoisted_15$2 = { class: "item" };
|
|
3860
3346
|
const _hoisted_16$2 = { class: "item" };
|
|
3861
|
-
const _hoisted_17$2 = { class: "item" };
|
|
3862
|
-
const _hoisted_18$2 = { class: "item" };
|
|
3863
3347
|
var script$A = /* @__PURE__ */ defineComponent({
|
|
3864
3348
|
__name: "TradeView",
|
|
3865
3349
|
props: {
|
|
3866
3350
|
headerApp: { type: String, required: true },
|
|
3867
3351
|
app: { type: String, required: true },
|
|
3868
3352
|
tenant: { type: String, required: true },
|
|
3869
|
-
payFinishJumpUrl: { type: String, required: false }
|
|
3870
|
-
apps: { type: String, required: false }
|
|
3353
|
+
payFinishJumpUrl: { type: String, required: false }
|
|
3871
3354
|
},
|
|
3872
|
-
emits: ["complete", "agree"],
|
|
3355
|
+
emits: ["complete", "agree", "loaded"],
|
|
3873
3356
|
setup(__props, { emit: __emit }) {
|
|
3874
3357
|
const props = __props;
|
|
3875
3358
|
const { formatAmount } = useAmount();
|
|
@@ -3893,28 +3376,8 @@ var script$A = /* @__PURE__ */ defineComponent({
|
|
|
3893
3376
|
state.selected = selected;
|
|
3894
3377
|
selectBean.value = false;
|
|
3895
3378
|
};
|
|
3896
|
-
const extraPaymentAmount = computed(() => {
|
|
3897
|
-
if (!selectBean.value || !amounts.value[state.selected]) {
|
|
3898
|
-
return 0;
|
|
3899
|
-
}
|
|
3900
|
-
const paymentAmount = amounts.value[state.selected].paymentAmount || 0;
|
|
3901
|
-
const currentBalance = balance.value || 0;
|
|
3902
|
-
return Math.max(0, paymentAmount - currentBalance);
|
|
3903
|
-
});
|
|
3904
3379
|
const currentAmount = computed(() => {
|
|
3905
|
-
|
|
3906
|
-
return 0;
|
|
3907
|
-
}
|
|
3908
|
-
if (selectBean.value) {
|
|
3909
|
-
if (balance.value < amounts.value[state.selected].paymentAmount) {
|
|
3910
|
-
return extraPaymentAmount.value;
|
|
3911
|
-
}
|
|
3912
|
-
return 0;
|
|
3913
|
-
}
|
|
3914
|
-
return amounts.value[state.selected].paymentAmount || 0;
|
|
3915
|
-
});
|
|
3916
|
-
const isCombinedPayment = computed(() => {
|
|
3917
|
-
return selectBean.value && amounts.value[state.selected] && balance.value < amounts.value[state.selected].paymentAmount;
|
|
3380
|
+
return amounts.value[state.selected] && !selectBean.value ? amounts.value[state.selected].paymentAmount : 0;
|
|
3918
3381
|
});
|
|
3919
3382
|
onMounted(() => {
|
|
3920
3383
|
const $http = useHttp$2({ Appcode: props.headerApp, Tenant: props.tenant });
|
|
@@ -3923,33 +3386,30 @@ var script$A = /* @__PURE__ */ defineComponent({
|
|
|
3923
3386
|
}).then((res) => {
|
|
3924
3387
|
balance.value = res.balance;
|
|
3925
3388
|
amounts.value = res.paymentCaseConfigVOS;
|
|
3389
|
+
emit("loaded");
|
|
3926
3390
|
});
|
|
3927
3391
|
});
|
|
3928
3392
|
const showDialog = ref(false);
|
|
3929
3393
|
async function beanPay() {
|
|
3930
3394
|
const $http = useHttp$2({ Appcode: props.headerApp, Tenant: props.tenant });
|
|
3931
|
-
|
|
3932
|
-
const response = await $http.post(
|
|
3933
|
-
`/payment/paymentCaseConfig/purchase/${amounts.value[state.selected].id}`
|
|
3934
|
-
);
|
|
3395
|
+
$http.post(`/payment/paymentCaseConfig/purchase/${amounts.value[state.selected].id}`).then((response) => {
|
|
3935
3396
|
if (response) {
|
|
3936
3397
|
showDialog.value = false;
|
|
3937
3398
|
emit("complete", { result: response, type: "bean" });
|
|
3938
3399
|
} else {
|
|
3939
3400
|
showToast({
|
|
3940
|
-
title: response
|
|
3401
|
+
title: response.message,
|
|
3941
3402
|
icon: "none"
|
|
3942
3403
|
});
|
|
3943
3404
|
}
|
|
3944
|
-
}
|
|
3945
|
-
showToast({
|
|
3946
|
-
title: error?.message || "\u652F\u4ED8\u5931\u8D25",
|
|
3947
|
-
icon: "none"
|
|
3948
|
-
});
|
|
3949
|
-
}
|
|
3405
|
+
});
|
|
3950
3406
|
}
|
|
3951
|
-
|
|
3952
|
-
if (
|
|
3407
|
+
const onPayClick = () => {
|
|
3408
|
+
if (selectBean.value) {
|
|
3409
|
+
showDialog.value = true;
|
|
3410
|
+
return;
|
|
3411
|
+
}
|
|
3412
|
+
if (!selectBean.value && !state.agreed) {
|
|
3953
3413
|
showToast({
|
|
3954
3414
|
title: "\u8BF7\u52FE\u9009\u300A\u5927\u9053\u4E91\u5E73\u53F0\u4E91\u8C46\u5145\u503C\u534F\u8BAE\u300B",
|
|
3955
3415
|
icon: "none"
|
|
@@ -3968,109 +3428,41 @@ var script$A = /* @__PURE__ */ defineComponent({
|
|
|
3968
3428
|
}
|
|
3969
3429
|
requestBrandWCPayByBean({
|
|
3970
3430
|
caseConfigId: amounts.value[state.selected].id,
|
|
3971
|
-
amount:
|
|
3431
|
+
amount: amounts.value[state.selected].paymentAmount,
|
|
3972
3432
|
app: "loankitMp",
|
|
3973
3433
|
tenant: props.tenant,
|
|
3974
3434
|
accountAuthFlag: false,
|
|
3975
3435
|
channelCode: "centergzh",
|
|
3976
3436
|
payFinishJumpUrl: props.payFinishJumpUrl,
|
|
3977
|
-
fromMini: !!params.from
|
|
3978
|
-
useCloudBean: isCombinedPayment.value
|
|
3437
|
+
fromMini: !!params.from
|
|
3979
3438
|
}).then((result) => {
|
|
3439
|
+
console.log(result, "------requestBrandWCPay");
|
|
3980
3440
|
state.buttonLoading = false;
|
|
3981
3441
|
if (typeof result === "boolean" && result) {
|
|
3982
3442
|
window.location.href = props.payFinishJumpUrl;
|
|
3983
3443
|
} else {
|
|
3984
|
-
emit("complete", {
|
|
3985
|
-
result,
|
|
3986
|
-
type: isCombinedPayment.value ? "combined" : "wePay"
|
|
3987
|
-
});
|
|
3444
|
+
emit("complete", { result, type: "wePay" });
|
|
3988
3445
|
}
|
|
3989
|
-
}).catch((error) => {
|
|
3990
|
-
state.buttonLoading = false;
|
|
3991
|
-
showToast({
|
|
3992
|
-
title: error.message || "\u652F\u4ED8\u5931\u8D25",
|
|
3993
|
-
icon: "none"
|
|
3994
|
-
});
|
|
3995
3446
|
});
|
|
3996
3447
|
} else {
|
|
3997
3448
|
wx.login({
|
|
3998
3449
|
success({ code }) {
|
|
3999
|
-
requestPaymentByBean(
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
},
|
|
4007
|
-
props.headerApp
|
|
4008
|
-
).then((result) => {
|
|
3450
|
+
requestPaymentByBean({
|
|
3451
|
+
caseConfigId: amounts.value[state.selected].id,
|
|
3452
|
+
amount: amounts.value[state.selected].paymentAmount,
|
|
3453
|
+
app: props.app,
|
|
3454
|
+
tenant: props.tenant,
|
|
3455
|
+
user: code
|
|
3456
|
+
}, props.headerApp).then((result) => {
|
|
4009
3457
|
state.buttonLoading = false;
|
|
4010
3458
|
if (result) {
|
|
4011
|
-
emit("complete", {
|
|
4012
|
-
result: true,
|
|
4013
|
-
type: isCombinedPayment.value ? "combined" : "wePay"
|
|
4014
|
-
});
|
|
3459
|
+
emit("complete", { result: true, type: "wePay" });
|
|
4015
3460
|
}
|
|
4016
|
-
}).catch((error) => {
|
|
4017
|
-
state.buttonLoading = false;
|
|
4018
|
-
showToast({
|
|
4019
|
-
title: error.message || "\u652F\u4ED8\u5931\u8D25",
|
|
4020
|
-
icon: "none"
|
|
4021
|
-
});
|
|
4022
|
-
});
|
|
4023
|
-
},
|
|
4024
|
-
fail() {
|
|
4025
|
-
state.buttonLoading = false;
|
|
4026
|
-
showToast({
|
|
4027
|
-
title: "\u767B\u5F55\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5",
|
|
4028
|
-
icon: "none"
|
|
4029
3461
|
});
|
|
4030
3462
|
}
|
|
4031
3463
|
});
|
|
4032
3464
|
}
|
|
4033
|
-
}
|
|
4034
|
-
const onPayClick = async () => {
|
|
4035
|
-
if (selectBean.value && !isCombinedPayment.value) {
|
|
4036
|
-
showDialog.value = true;
|
|
4037
|
-
return;
|
|
4038
|
-
}
|
|
4039
|
-
if (isCombinedPayment.value) {
|
|
4040
|
-
const res = await checkBalance();
|
|
4041
|
-
if (!res) return;
|
|
4042
|
-
}
|
|
4043
|
-
proceedWechatPayment();
|
|
4044
3465
|
};
|
|
4045
|
-
async function checkBalance() {
|
|
4046
|
-
const $http = useHttp$2();
|
|
4047
|
-
return new Promise((resolve, reject) => {
|
|
4048
|
-
state.buttonLoading = true;
|
|
4049
|
-
$http.get(endpoints$2.\u83B7\u53D6\u4F59\u989D\u660E\u7EC6, {
|
|
4050
|
-
app: props.apps
|
|
4051
|
-
}).then((data) => {
|
|
4052
|
-
state.buttonLoading = false;
|
|
4053
|
-
if (data.commonAccount < balance.value) {
|
|
4054
|
-
showModal({
|
|
4055
|
-
title: "\u6E29\u99A8\u63D0\u793A",
|
|
4056
|
-
content: "\u4E91\u8C46\u4E0D\u8DB3\uFF0C\u8BF7\u5237\u65B0\u540E\u518D\u6B21\u786E\u8BA4",
|
|
4057
|
-
showCancel: false,
|
|
4058
|
-
confirmText: "\u5237\u65B0",
|
|
4059
|
-
confirmColor: "#017fff",
|
|
4060
|
-
success: () => {
|
|
4061
|
-
balance.value = data.commonAccount;
|
|
4062
|
-
}
|
|
4063
|
-
});
|
|
4064
|
-
resolve(false);
|
|
4065
|
-
} else {
|
|
4066
|
-
resolve(true);
|
|
4067
|
-
}
|
|
4068
|
-
}).catch((error) => {
|
|
4069
|
-
state.buttonLoading = false;
|
|
4070
|
-
resolve(false);
|
|
4071
|
-
});
|
|
4072
|
-
});
|
|
4073
|
-
}
|
|
4074
3466
|
return (_ctx, _cache) => {
|
|
4075
3467
|
const _component_nut_checkbox = Checkbox;
|
|
4076
3468
|
const _component_nut_button = Button;
|
|
@@ -4084,7 +3476,7 @@ var script$A = /* @__PURE__ */ defineComponent({
|
|
|
4084
3476
|
onChange: onAmountSelect
|
|
4085
3477
|
}, null, 8, ["items", "selected"]),
|
|
4086
3478
|
amounts.value[state.selected] ? (openBlock(), createElementBlock("div", _hoisted_3$i, [
|
|
4087
|
-
createElementVNode("div", _hoisted_4$
|
|
3479
|
+
createElementVNode("div", _hoisted_4$e, [
|
|
4088
3480
|
_cache[4] || (_cache[4] = createElementVNode(
|
|
4089
3481
|
"div",
|
|
4090
3482
|
{ class: "title" },
|
|
@@ -4092,28 +3484,29 @@ var script$A = /* @__PURE__ */ defineComponent({
|
|
|
4092
3484
|
-1
|
|
4093
3485
|
/* CACHED */
|
|
4094
3486
|
)),
|
|
4095
|
-
!selectBean.value
|
|
3487
|
+
!selectBean.value ? (openBlock(), createElementBlock(
|
|
4096
3488
|
"div",
|
|
4097
|
-
_hoisted_5$
|
|
4098
|
-
"
|
|
3489
|
+
_hoisted_5$c,
|
|
3490
|
+
"\u4F59\u989D " + toDisplayString(unref(formatAmount)(balance.value || 0)),
|
|
4099
3491
|
1
|
|
4100
3492
|
/* TEXT */
|
|
4101
3493
|
)) : (openBlock(), createElementBlock(
|
|
4102
3494
|
"div",
|
|
4103
3495
|
_hoisted_6$9,
|
|
4104
|
-
"
|
|
3496
|
+
"\u6263\u51CF\u540E\u4F59\u989D " + toDisplayString(unref(formatAmount)(balance.value - amounts.value[state.selected].paymentAmount)),
|
|
4105
3497
|
1
|
|
4106
3498
|
/* TEXT */
|
|
4107
3499
|
))
|
|
4108
3500
|
]),
|
|
4109
|
-
|
|
3501
|
+
balance.value >= amounts.value[state.selected].paymentAmount ? (openBlock(), createElementBlock("div", {
|
|
3502
|
+
key: 0,
|
|
4110
3503
|
class: "right",
|
|
4111
3504
|
onClick: _cache[0] || (_cache[0] = ($event) => selectBean.value = !selectBean.value)
|
|
4112
3505
|
}, [
|
|
4113
3506
|
createElementVNode(
|
|
4114
3507
|
"div",
|
|
4115
3508
|
_hoisted_7$6,
|
|
4116
|
-
"
|
|
3509
|
+
"-" + toDisplayString(unref(formatAmount)(amounts.value[state.selected].paymentAmount || 0)),
|
|
4117
3510
|
1
|
|
4118
3511
|
/* TEXT */
|
|
4119
3512
|
),
|
|
@@ -4121,20 +3514,12 @@ var script$A = /* @__PURE__ */ defineComponent({
|
|
|
4121
3514
|
class: "icon",
|
|
4122
3515
|
src: selectBean.value ? "https://cdn.ddjf.com/static/images/appkit/select.svg" : "https://cdn.ddjf.com/static/images/appkit/not-select.svg"
|
|
4123
3516
|
}, null, 8, _hoisted_8$5)
|
|
4124
|
-
]),
|
|
4125
|
-
isCombinedPayment.value ? (openBlock(), createElementBlock(
|
|
4126
|
-
"div",
|
|
4127
|
-
_hoisted_9$4,
|
|
4128
|
-
" \u4E91\u8C46\u4F59\u989D\u4E0D\u8DB3,\u8FD8\u9700\u989D\u5916\u652F\u4ED8" + toDisplayString(unref(formatAmount)(extraPaymentAmount.value)) + "\u5143 ",
|
|
4129
|
-
1
|
|
4130
|
-
/* TEXT */
|
|
4131
|
-
)) : createCommentVNode("v-if", true)
|
|
3517
|
+
])) : createCommentVNode("v-if", true)
|
|
4132
3518
|
])) : createCommentVNode("v-if", true),
|
|
4133
|
-
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),
|
|
4134
3519
|
renderSlot(_ctx.$slots, "banner")
|
|
4135
3520
|
]),
|
|
4136
|
-
createElementVNode("view",
|
|
4137
|
-
!selectBean.value
|
|
3521
|
+
createElementVNode("view", _hoisted_9$4, [
|
|
3522
|
+
!selectBean.value ? (openBlock(), createElementBlock("view", _hoisted_10$3, [
|
|
4138
3523
|
createVNode(_component_nut_checkbox, {
|
|
4139
3524
|
modelValue: state.agreed,
|
|
4140
3525
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => state.agreed = $event)
|
|
@@ -4162,14 +3547,14 @@ var script$A = /* @__PURE__ */ defineComponent({
|
|
|
4162
3547
|
/* STABLE */
|
|
4163
3548
|
}, 8, ["modelValue"])
|
|
4164
3549
|
])) : createCommentVNode("v-if", true),
|
|
4165
|
-
createElementVNode("div",
|
|
4166
|
-
createElementVNode("div",
|
|
3550
|
+
createElementVNode("div", _hoisted_11$3, [
|
|
3551
|
+
createElementVNode("div", _hoisted_12$3, [
|
|
4167
3552
|
_cache[8] || (_cache[8] = createTextVNode(
|
|
4168
3553
|
" \u5F85\u652F\u4ED8\uFF1A ",
|
|
4169
3554
|
-1
|
|
4170
3555
|
/* CACHED */
|
|
4171
3556
|
)),
|
|
4172
|
-
createElementVNode("span",
|
|
3557
|
+
createElementVNode("span", _hoisted_13$2, [
|
|
4173
3558
|
_cache[7] || (_cache[7] = createElementVNode(
|
|
4174
3559
|
"i",
|
|
4175
3560
|
null,
|
|
@@ -4220,22 +3605,22 @@ var script$A = /* @__PURE__ */ defineComponent({
|
|
|
4220
3605
|
[
|
|
4221
3606
|
createElementVNode(
|
|
4222
3607
|
"div",
|
|
4223
|
-
|
|
4224
|
-
"
|
|
3608
|
+
_hoisted_14$2,
|
|
3609
|
+
"\u4E91\u8C46\u6263\u51CF\uFF1A" + toDisplayString(unref(formatAmount)(amounts.value[state.selected].paymentAmount || 0)),
|
|
4225
3610
|
1
|
|
4226
3611
|
/* TEXT */
|
|
4227
3612
|
),
|
|
4228
3613
|
createElementVNode(
|
|
4229
3614
|
"div",
|
|
4230
|
-
|
|
4231
|
-
"
|
|
3615
|
+
_hoisted_15$2,
|
|
3616
|
+
"\u6743\u76CA\u589E\u52A0\uFF1A" + toDisplayString(unref(formatAmount)(amounts.value[state.selected].priceRightNum || 0)) + "\u7B14",
|
|
4232
3617
|
1
|
|
4233
3618
|
/* TEXT */
|
|
4234
3619
|
),
|
|
4235
3620
|
createElementVNode(
|
|
4236
3621
|
"div",
|
|
4237
|
-
|
|
4238
|
-
"
|
|
3622
|
+
_hoisted_16$2,
|
|
3623
|
+
"\u6263\u51CF\u540E\u4E91\u8C46\u4F59\u989D\uFF1A" + toDisplayString(unref(formatAmount)(balance.value - amounts.value[state.selected].paymentAmount)),
|
|
4239
3624
|
1
|
|
4240
3625
|
/* TEXT */
|
|
4241
3626
|
)
|
|
@@ -4255,7 +3640,7 @@ var script$A = /* @__PURE__ */ defineComponent({
|
|
|
4255
3640
|
script$A.__file = "src/payment/components/TradeView.vue";
|
|
4256
3641
|
|
|
4257
3642
|
const components = {
|
|
4258
|
-
AmountPicker: script$
|
|
3643
|
+
AmountPicker: script$M,
|
|
4259
3644
|
RechargeView: script$E,
|
|
4260
3645
|
UserAgreement: script$D,
|
|
4261
3646
|
RechargeResult: script$C,
|
|
@@ -4265,8 +3650,8 @@ const components = {
|
|
|
4265
3650
|
const _hoisted_1$w = { class: "account-card" };
|
|
4266
3651
|
const _hoisted_2$n = { class: "card" };
|
|
4267
3652
|
const _hoisted_3$h = { class: "card-row" };
|
|
4268
|
-
const _hoisted_4$
|
|
4269
|
-
const _hoisted_5$
|
|
3653
|
+
const _hoisted_4$d = { class: "card-row-left" };
|
|
3654
|
+
const _hoisted_5$b = { class: "bean-nums number" };
|
|
4270
3655
|
const _hoisted_6$8 = { class: "card-row-right" };
|
|
4271
3656
|
var script$z = /* @__PURE__ */ defineComponent({
|
|
4272
3657
|
__name: "BalanceCard",
|
|
@@ -4313,7 +3698,7 @@ var script$z = /* @__PURE__ */ defineComponent({
|
|
|
4313
3698
|
return openBlock(), createElementBlock("div", _hoisted_1$w, [
|
|
4314
3699
|
createElementVNode("div", _hoisted_2$n, [
|
|
4315
3700
|
createElementVNode("div", _hoisted_3$h, [
|
|
4316
|
-
createElementVNode("div", _hoisted_4$
|
|
3701
|
+
createElementVNode("div", _hoisted_4$d, [
|
|
4317
3702
|
_cache[0] || (_cache[0] = createElementVNode(
|
|
4318
3703
|
"div",
|
|
4319
3704
|
{ class: "bean-box" },
|
|
@@ -4331,7 +3716,7 @@ var script$z = /* @__PURE__ */ defineComponent({
|
|
|
4331
3716
|
)),
|
|
4332
3717
|
createElementVNode(
|
|
4333
3718
|
"div",
|
|
4334
|
-
_hoisted_5$
|
|
3719
|
+
_hoisted_5$b,
|
|
4335
3720
|
toDisplayString(unref(formatAmount)(balance.value.total || 0)),
|
|
4336
3721
|
1
|
|
4337
3722
|
/* TEXT */
|
|
@@ -4393,8 +3778,8 @@ const consumptionDirections = ["\u5168\u90E8", "\u6536\u5165", "\u652F\u51FA"];
|
|
|
4393
3778
|
const _hoisted_1$v = { class: "consumption-filter" };
|
|
4394
3779
|
const _hoisted_2$m = { class: "consumption-filter-content" };
|
|
4395
3780
|
const _hoisted_3$g = { class: "title" };
|
|
4396
|
-
const _hoisted_4$
|
|
4397
|
-
const _hoisted_5$
|
|
3781
|
+
const _hoisted_4$c = { class: "info" };
|
|
3782
|
+
const _hoisted_5$a = ["onClick"];
|
|
4398
3783
|
const _hoisted_6$7 = { class: "consumption-filter-btn spa-between" };
|
|
4399
3784
|
var script$y = /* @__PURE__ */ defineComponent({
|
|
4400
3785
|
__name: "ConsumptionFilter",
|
|
@@ -4473,7 +3858,7 @@ var script$y = /* @__PURE__ */ defineComponent({
|
|
|
4473
3858
|
1
|
|
4474
3859
|
/* TEXT */
|
|
4475
3860
|
),
|
|
4476
|
-
createElementVNode("div", _hoisted_4$
|
|
3861
|
+
createElementVNode("div", _hoisted_4$c, [
|
|
4477
3862
|
(openBlock(true), createElementBlock(
|
|
4478
3863
|
Fragment,
|
|
4479
3864
|
null,
|
|
@@ -4482,7 +3867,7 @@ var script$y = /* @__PURE__ */ defineComponent({
|
|
|
4482
3867
|
onClick: () => onFilterSectionClick(index, it.code),
|
|
4483
3868
|
class: normalizeClass([getItemClass(index, it.code), "info-item"]),
|
|
4484
3869
|
key: i
|
|
4485
|
-
}, toDisplayString(typeof it === "string" ? it : it.name), 11, _hoisted_5$
|
|
3870
|
+
}, toDisplayString(typeof it === "string" ? it : it.name), 11, _hoisted_5$a);
|
|
4486
3871
|
}),
|
|
4487
3872
|
128
|
|
4488
3873
|
/* KEYED_FRAGMENT */
|
|
@@ -4532,7 +3917,7 @@ script$y.__file = "src/balance/components/ConsumptionFilter.vue";
|
|
|
4532
3917
|
const _hoisted_1$u = { class: "appkit-date-filter" };
|
|
4533
3918
|
const _hoisted_2$l = { class: "content" };
|
|
4534
3919
|
const _hoisted_3$f = { class: "time" };
|
|
4535
|
-
const _hoisted_4$
|
|
3920
|
+
const _hoisted_4$b = { class: "buttons spa-between" };
|
|
4536
3921
|
var script$x = /* @__PURE__ */ defineComponent({
|
|
4537
3922
|
__name: "DateFilter",
|
|
4538
3923
|
props: {
|
|
@@ -4655,7 +4040,7 @@ var script$x = /* @__PURE__ */ defineComponent({
|
|
|
4655
4040
|
)
|
|
4656
4041
|
])
|
|
4657
4042
|
]),
|
|
4658
|
-
createElementVNode("div", _hoisted_4$
|
|
4043
|
+
createElementVNode("div", _hoisted_4$b, [
|
|
4659
4044
|
createElementVNode("div", {
|
|
4660
4045
|
class: "btn",
|
|
4661
4046
|
onClick: reset
|
|
@@ -4831,8 +4216,8 @@ script$u.__file = "src/balance/components/Tip.vue";
|
|
|
4831
4216
|
const _hoisted_1$q = { class: "account-view" };
|
|
4832
4217
|
const _hoisted_2$k = { class: "scroll-content" };
|
|
4833
4218
|
const _hoisted_3$e = { class: "row jusify-right" };
|
|
4834
|
-
const _hoisted_4$
|
|
4835
|
-
const _hoisted_5$
|
|
4219
|
+
const _hoisted_4$a = { class: "balance" };
|
|
4220
|
+
const _hoisted_5$9 = { class: "bean-box spa-between" };
|
|
4836
4221
|
const _hoisted_6$6 = { class: "bean-counts spa-between" };
|
|
4837
4222
|
const _hoisted_7$5 = { class: "counts number" };
|
|
4838
4223
|
const _hoisted_8$4 = {
|
|
@@ -5073,7 +4458,7 @@ var script$t = /* @__PURE__ */ defineComponent({
|
|
|
5073
4458
|
[
|
|
5074
4459
|
createElementVNode("div", _hoisted_1$q, [
|
|
5075
4460
|
createElementVNode("div", _hoisted_2$k, [
|
|
5076
|
-
createVNode(unref(script$
|
|
4461
|
+
createVNode(unref(script$L), {
|
|
5077
4462
|
title: unref(Taro).getEnv() !== "WEB" ? "\u6211\u7684\u8D26\u6237" : "",
|
|
5078
4463
|
class: normalizeClass({ "with-background": scrolled.value > 0 }),
|
|
5079
4464
|
onClose: onPageHeaderClose
|
|
@@ -5094,8 +4479,8 @@ var script$t = /* @__PURE__ */ defineComponent({
|
|
|
5094
4479
|
[_directive_track_click]
|
|
5095
4480
|
])
|
|
5096
4481
|
]),
|
|
5097
|
-
createElementVNode("div", _hoisted_4$
|
|
5098
|
-
createElementVNode("div", _hoisted_5$
|
|
4482
|
+
createElementVNode("div", _hoisted_4$a, [
|
|
4483
|
+
createElementVNode("div", _hoisted_5$9, [
|
|
5099
4484
|
_cache[9] || (_cache[9] = createElementVNode(
|
|
5100
4485
|
"div",
|
|
5101
4486
|
{ class: "bean-img" },
|
|
@@ -5378,7 +4763,7 @@ var script$t = /* @__PURE__ */ defineComponent({
|
|
|
5378
4763
|
_: 1
|
|
5379
4764
|
/* STABLE */
|
|
5380
4765
|
}, 8, ["visible"]),
|
|
5381
|
-
createVNode(unref(script$
|
|
4766
|
+
createVNode(unref(script$K), {
|
|
5382
4767
|
modelValue: secondBalanceOpen.value,
|
|
5383
4768
|
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => secondBalanceOpen.value = $event),
|
|
5384
4769
|
title: "\u6536\u652F\u660E\u7EC6"
|
|
@@ -5568,8 +4953,8 @@ script$t.__file = "src/balance/components/AccountView.vue";
|
|
|
5568
4953
|
const _hoisted_1$p = { class: "balance-reminder" };
|
|
5569
4954
|
const _hoisted_2$j = { class: "body" };
|
|
5570
4955
|
const _hoisted_3$d = { class: "footer" };
|
|
5571
|
-
const _hoisted_4$
|
|
5572
|
-
const _hoisted_5$
|
|
4956
|
+
const _hoisted_4$9 = { class: "col" };
|
|
4957
|
+
const _hoisted_5$8 = { class: "col" };
|
|
5573
4958
|
var script$s = /* @__PURE__ */ defineComponent({
|
|
5574
4959
|
__name: "BalanceReminder",
|
|
5575
4960
|
props: {
|
|
@@ -5610,7 +4995,7 @@ var script$s = /* @__PURE__ */ defineComponent({
|
|
|
5610
4995
|
)
|
|
5611
4996
|
]),
|
|
5612
4997
|
createElementVNode("div", _hoisted_3$d, [
|
|
5613
|
-
createElementVNode("div", _hoisted_4$
|
|
4998
|
+
createElementVNode("div", _hoisted_4$9, [
|
|
5614
4999
|
createVNode(_component_nut_button, {
|
|
5615
5000
|
class: "cancel-button",
|
|
5616
5001
|
onClick: _cache[0] || (_cache[0] = ($event) => emit("update:modelValue", false)),
|
|
@@ -5627,7 +5012,7 @@ var script$s = /* @__PURE__ */ defineComponent({
|
|
|
5627
5012
|
/* STABLE */
|
|
5628
5013
|
})
|
|
5629
5014
|
]),
|
|
5630
|
-
createElementVNode("div", _hoisted_5$
|
|
5015
|
+
createElementVNode("div", _hoisted_5$8, [
|
|
5631
5016
|
withDirectives((openBlock(), createBlock(_component_nut_button, {
|
|
5632
5017
|
block: "",
|
|
5633
5018
|
class: "recharge-button",
|
|
@@ -5765,8 +5150,8 @@ script$r.__file = "src/balance/components/DateRange.vue";
|
|
|
5765
5150
|
const _hoisted_1$n = { class: "list-filter-picker" };
|
|
5766
5151
|
const _hoisted_2$i = { class: "list-filter-picker-content" };
|
|
5767
5152
|
const _hoisted_3$c = { class: "title" };
|
|
5768
|
-
const _hoisted_4$
|
|
5769
|
-
const _hoisted_5$
|
|
5153
|
+
const _hoisted_4$8 = { class: "info" };
|
|
5154
|
+
const _hoisted_5$7 = ["onClick"];
|
|
5770
5155
|
const _hoisted_6$5 = { class: "list-filter-picker-btn spa-between" };
|
|
5771
5156
|
var script$q = /* @__PURE__ */ defineComponent({
|
|
5772
5157
|
__name: "ListFilterPicker",
|
|
@@ -5843,7 +5228,7 @@ var script$q = /* @__PURE__ */ defineComponent({
|
|
|
5843
5228
|
1
|
|
5844
5229
|
/* TEXT */
|
|
5845
5230
|
),
|
|
5846
|
-
createElementVNode("div", _hoisted_4$
|
|
5231
|
+
createElementVNode("div", _hoisted_4$8, [
|
|
5847
5232
|
(openBlock(true), createElementBlock(
|
|
5848
5233
|
Fragment,
|
|
5849
5234
|
null,
|
|
@@ -5852,7 +5237,7 @@ var script$q = /* @__PURE__ */ defineComponent({
|
|
|
5852
5237
|
onClick: () => onFilterSectionClick(item.name, it.value),
|
|
5853
5238
|
class: normalizeClass([getItemClass(item.name, it.value), "info-item"]),
|
|
5854
5239
|
key: i
|
|
5855
|
-
}, toDisplayString(typeof it === "string" ? it : it.label), 11, _hoisted_5$
|
|
5240
|
+
}, toDisplayString(typeof it === "string" ? it : it.label), 11, _hoisted_5$7);
|
|
5856
5241
|
}),
|
|
5857
5242
|
128
|
|
5858
5243
|
/* KEYED_FRAGMENT */
|
|
@@ -5968,8 +5353,8 @@ const _hoisted_1$m = {
|
|
|
5968
5353
|
};
|
|
5969
5354
|
const _hoisted_2$h = { class: "promoter-card-hd-num number" };
|
|
5970
5355
|
const _hoisted_3$b = ["src"];
|
|
5971
|
-
const _hoisted_4$
|
|
5972
|
-
const _hoisted_5$
|
|
5356
|
+
const _hoisted_4$7 = { class: "promoter-card-ft" };
|
|
5357
|
+
const _hoisted_5$6 = {
|
|
5973
5358
|
key: 0,
|
|
5974
5359
|
class: "promoter-card-ft-item"
|
|
5975
5360
|
};
|
|
@@ -6065,7 +5450,6 @@ var script$o = /* @__PURE__ */ defineComponent({
|
|
|
6065
5450
|
showModal({
|
|
6066
5451
|
content: toastMap[type],
|
|
6067
5452
|
showCancel: false,
|
|
6068
|
-
confirmColor: "#017fff",
|
|
6069
5453
|
confirmText: "\u77E5\u9053\u4E86"
|
|
6070
5454
|
});
|
|
6071
5455
|
}
|
|
@@ -6128,8 +5512,8 @@ var script$o = /* @__PURE__ */ defineComponent({
|
|
|
6128
5512
|
])), [
|
|
6129
5513
|
[_directive_track_click]
|
|
6130
5514
|
]) : createCommentVNode("v-if", true),
|
|
6131
|
-
createElementVNode("div", _hoisted_4$
|
|
6132
|
-
__props.applyRecord.accessCheckStatus === "Y" ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
5515
|
+
createElementVNode("div", _hoisted_4$7, [
|
|
5516
|
+
__props.applyRecord.accessCheckStatus === "Y" ? (openBlock(), createElementBlock("div", _hoisted_5$6, [
|
|
6133
5517
|
__props.\u663E\u793A\u4E0B\u7EA7\u5206\u9500\u5546 ? (openBlock(), createElementBlock(
|
|
6134
5518
|
Fragment,
|
|
6135
5519
|
{ key: 0 },
|
|
@@ -6571,8 +5955,8 @@ script$l.__file = "src/components/dd-selector/index.vue";
|
|
|
6571
5955
|
const _hoisted_1$j = { class: "self-registration" };
|
|
6572
5956
|
const _hoisted_2$f = { class: "self-registration-body" };
|
|
6573
5957
|
const _hoisted_3$a = ["src"];
|
|
6574
|
-
const _hoisted_4$
|
|
6575
|
-
const _hoisted_5$
|
|
5958
|
+
const _hoisted_4$6 = { class: "self-registration__input" };
|
|
5959
|
+
const _hoisted_5$5 = { class: "self-registration-bottom" };
|
|
6576
5960
|
var script$k = /* @__PURE__ */ defineComponent({
|
|
6577
5961
|
__name: "SelfRegistration",
|
|
6578
5962
|
props: {
|
|
@@ -6732,7 +6116,7 @@ var script$k = /* @__PURE__ */ defineComponent({
|
|
|
6732
6116
|
required: ""
|
|
6733
6117
|
}, {
|
|
6734
6118
|
default: withCtx(() => [
|
|
6735
|
-
createElementVNode("div", _hoisted_4$
|
|
6119
|
+
createElementVNode("div", _hoisted_4$6, [
|
|
6736
6120
|
withDirectives(createElementVNode(
|
|
6737
6121
|
"input",
|
|
6738
6122
|
{
|
|
@@ -6748,10 +6132,7 @@ var script$k = /* @__PURE__ */ defineComponent({
|
|
|
6748
6132
|
), [
|
|
6749
6133
|
[vModelText, formState.name]
|
|
6750
6134
|
]),
|
|
6751
|
-
createVNode(script$
|
|
6752
|
-
"has-upload-vo": false,
|
|
6753
|
-
onComplete: onOCRInfo
|
|
6754
|
-
}, {
|
|
6135
|
+
createVNode(script$G, { onComplete: onOCRInfo }, {
|
|
6755
6136
|
icon: withCtx(() => [..._cache[9] || (_cache[9] = [
|
|
6756
6137
|
createElementVNode(
|
|
6757
6138
|
"img",
|
|
@@ -6886,7 +6267,7 @@ var script$k = /* @__PURE__ */ defineComponent({
|
|
|
6886
6267
|
/* STABLE */
|
|
6887
6268
|
})
|
|
6888
6269
|
]),
|
|
6889
|
-
createElementVNode("div", _hoisted_5$
|
|
6270
|
+
createElementVNode("div", _hoisted_5$5, [
|
|
6890
6271
|
withDirectives((openBlock(), createBlock(_component_nut_button, {
|
|
6891
6272
|
block: "",
|
|
6892
6273
|
type: "primary",
|
|
@@ -7322,7 +6703,7 @@ var script$i = /* @__PURE__ */ defineComponent({
|
|
|
7322
6703
|
Fragment,
|
|
7323
6704
|
null,
|
|
7324
6705
|
renderList(bannerMessages.value, (item, key) => {
|
|
7325
|
-
return withDirectives((openBlock(), createBlock(script$
|
|
6706
|
+
return withDirectives((openBlock(), createBlock(script$I, {
|
|
7326
6707
|
class: normalizeClass({ show: key === activeKey.value }),
|
|
7327
6708
|
key,
|
|
7328
6709
|
showClose: item.noticeType === 0,
|
|
@@ -7593,8 +6974,7 @@ function useCommonList(api, query, loading = true, method = "GET") {
|
|
|
7593
6974
|
const isLoading = ref(false);
|
|
7594
6975
|
async function fetchData(loading2) {
|
|
7595
6976
|
loading2 && showLoading({
|
|
7596
|
-
title: "\u52A0\u8F7D\u4E2D..."
|
|
7597
|
-
mask: true
|
|
6977
|
+
title: "\u52A0\u8F7D\u4E2D..."
|
|
7598
6978
|
});
|
|
7599
6979
|
isLoading.value = true;
|
|
7600
6980
|
const $http = useHttp$1();
|
|
@@ -7651,8 +7031,8 @@ const _hoisted_3$7 = {
|
|
|
7651
7031
|
key: 0,
|
|
7652
7032
|
class: "wrapper"
|
|
7653
7033
|
};
|
|
7654
|
-
const _hoisted_4$
|
|
7655
|
-
const _hoisted_5$
|
|
7034
|
+
const _hoisted_4$5 = ["onClick"];
|
|
7035
|
+
const _hoisted_5$4 = { class: "time" };
|
|
7656
7036
|
const _hoisted_6$3 = {
|
|
7657
7037
|
key: 0,
|
|
7658
7038
|
class: "notice-list-label"
|
|
@@ -7785,7 +7165,7 @@ var script$f = /* @__PURE__ */ defineComponent({
|
|
|
7785
7165
|
createElementVNode("div", null, [
|
|
7786
7166
|
createElementVNode(
|
|
7787
7167
|
"div",
|
|
7788
|
-
_hoisted_5$
|
|
7168
|
+
_hoisted_5$4,
|
|
7789
7169
|
toDisplayString(formatMinutes(item.receiveTime)),
|
|
7790
7170
|
1
|
|
7791
7171
|
/* TEXT */
|
|
@@ -7842,7 +7222,7 @@ var script$f = /* @__PURE__ */ defineComponent({
|
|
|
7842
7222
|
/* CLASS */
|
|
7843
7223
|
)
|
|
7844
7224
|
])
|
|
7845
|
-
], 10, _hoisted_4$
|
|
7225
|
+
], 10, _hoisted_4$5)), [
|
|
7846
7226
|
[_directive_track_click, "\u6D88\u606F\u8BE6\u60C5"]
|
|
7847
7227
|
]);
|
|
7848
7228
|
}),
|
|
@@ -7884,21 +7264,16 @@ var script$f = /* @__PURE__ */ defineComponent({
|
|
|
7884
7264
|
|
|
7885
7265
|
script$f.__file = "src/notice/components/NoticeList.vue";
|
|
7886
7266
|
|
|
7887
|
-
const _hoisted_1$d =
|
|
7888
|
-
const _hoisted_2$9 = {
|
|
7889
|
-
key: 0,
|
|
7890
|
-
class: "custom-title-dot"
|
|
7891
|
-
};
|
|
7892
|
-
const _hoisted_3$6 = {
|
|
7267
|
+
const _hoisted_1$d = {
|
|
7893
7268
|
key: 0,
|
|
7894
7269
|
class: "read-all"
|
|
7895
7270
|
};
|
|
7896
|
-
const
|
|
7271
|
+
const _hoisted_2$9 = {
|
|
7897
7272
|
key: 0,
|
|
7898
7273
|
class: "news-item-title-icon",
|
|
7899
|
-
src: "https://cdn.ddjf.com/static/images/
|
|
7274
|
+
src: "https://cdn.ddjf.com/static/images/loan-manage-app/ic_msg_system_notice.webp"
|
|
7900
7275
|
};
|
|
7901
|
-
const
|
|
7276
|
+
const _hoisted_3$6 = { class: "news-item-time" };
|
|
7902
7277
|
var script$e = /* @__PURE__ */ defineComponent({
|
|
7903
7278
|
__name: "NoticeList2",
|
|
7904
7279
|
props: {
|
|
@@ -7909,28 +7284,9 @@ var script$e = /* @__PURE__ */ defineComponent({
|
|
|
7909
7284
|
emits: ["itemClick"],
|
|
7910
7285
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
7911
7286
|
const props = __props;
|
|
7912
|
-
const tabList = ref([
|
|
7913
|
-
{
|
|
7914
|
-
label: "\u5168\u90E8",
|
|
7915
|
-
value: "\u5168\u90E8"
|
|
7916
|
-
},
|
|
7917
|
-
{
|
|
7918
|
-
label: "\u4E1A\u52A1\u6D88\u606F",
|
|
7919
|
-
value: "\u4E1A\u52A1\u6D88\u606F"
|
|
7920
|
-
},
|
|
7921
|
-
{
|
|
7922
|
-
label: "\u7CFB\u7EDF\u516C\u544A",
|
|
7923
|
-
value: "\u7CFB\u7EDF\u516C\u544A"
|
|
7924
|
-
},
|
|
7925
|
-
{
|
|
7926
|
-
label: "\u672A\u8BFB",
|
|
7927
|
-
value: "\u672A\u8BFB"
|
|
7928
|
-
}
|
|
7929
|
-
]);
|
|
7930
7287
|
const $http = useHttp$1(), \u663E\u793A\u9AA8\u67B6\u5C4F = ref(true);
|
|
7931
7288
|
useDidShow(() => {
|
|
7932
7289
|
nextPage(1);
|
|
7933
|
-
getNotice();
|
|
7934
7290
|
});
|
|
7935
7291
|
const state = reactive({
|
|
7936
7292
|
search: "",
|
|
@@ -7983,7 +7339,6 @@ var script$e = /* @__PURE__ */ defineComponent({
|
|
|
7983
7339
|
}
|
|
7984
7340
|
function itemClick(item) {
|
|
7985
7341
|
read(item);
|
|
7986
|
-
getNotice();
|
|
7987
7342
|
emits("itemClick", item);
|
|
7988
7343
|
}
|
|
7989
7344
|
function read(item) {
|
|
@@ -7996,8 +7351,7 @@ var script$e = /* @__PURE__ */ defineComponent({
|
|
|
7996
7351
|
async function readAll() {
|
|
7997
7352
|
try {
|
|
7998
7353
|
showLoading({
|
|
7999
|
-
title: "\u8BF7\u7A0D\u540E..."
|
|
8000
|
-
mask: true
|
|
7354
|
+
title: "\u8BF7\u7A0D\u540E..."
|
|
8001
7355
|
});
|
|
8002
7356
|
const appkitOptions = useAppKitOptions();
|
|
8003
7357
|
const ep = endpoints["\u5168\u90E8\u5DF2\u8BFB"];
|
|
@@ -8012,24 +7366,9 @@ var script$e = /* @__PURE__ */ defineComponent({
|
|
|
8012
7366
|
});
|
|
8013
7367
|
});
|
|
8014
7368
|
} finally {
|
|
8015
|
-
getNotice();
|
|
8016
7369
|
hideLoading();
|
|
8017
7370
|
}
|
|
8018
7371
|
}
|
|
8019
|
-
const noticeShow = ref(false);
|
|
8020
|
-
async function getNotice() {
|
|
8021
|
-
const appkitOptions = useAppKitOptions();
|
|
8022
|
-
const $http2 = useHttp$1();
|
|
8023
|
-
$http2.get("/cas/msg/count-unread", {
|
|
8024
|
-
deviceType: 2,
|
|
8025
|
-
appCode: props.app,
|
|
8026
|
-
tenantId: appkitOptions.tenant(),
|
|
8027
|
-
userId: props.userId
|
|
8028
|
-
}).then((result) => {
|
|
8029
|
-
if (typeof result === "object") return;
|
|
8030
|
-
noticeShow.value = result > 0;
|
|
8031
|
-
});
|
|
8032
|
-
}
|
|
8033
7372
|
const emits = __emit;
|
|
8034
7373
|
__expose({
|
|
8035
7374
|
readAll
|
|
@@ -8045,7 +7384,7 @@ var script$e = /* @__PURE__ */ defineComponent({
|
|
|
8045
7384
|
class: normalizeClass(["tabContainer", { inH5: unref(isWeb)() }])
|
|
8046
7385
|
},
|
|
8047
7386
|
[
|
|
8048
|
-
createCommentVNode(' <ns-
|
|
7387
|
+
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> '),
|
|
8049
7388
|
createVNode(unref(NsTabs), {
|
|
8050
7389
|
modelValue: state.tab,
|
|
8051
7390
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => state.tab = $event),
|
|
@@ -8053,50 +7392,30 @@ var script$e = /* @__PURE__ */ defineComponent({
|
|
|
8053
7392
|
square: "",
|
|
8054
7393
|
size: "xl",
|
|
8055
7394
|
style: { "height": "46px" },
|
|
8056
|
-
|
|
8057
|
-
items: tabList.value
|
|
7395
|
+
onChange: onTabChange
|
|
8058
7396
|
}, {
|
|
8059
|
-
|
|
8060
|
-
(
|
|
8061
|
-
|
|
8062
|
-
|
|
8063
|
-
|
|
8064
|
-
|
|
8065
|
-
|
|
8066
|
-
|
|
8067
|
-
|
|
8068
|
-
|
|
8069
|
-
|
|
8070
|
-
|
|
8071
|
-
|
|
8072
|
-
|
|
8073
|
-
|
|
8074
|
-
|
|
8075
|
-
|
|
8076
|
-
},
|
|
8077
|
-
[
|
|
8078
|
-
createElementVNode(
|
|
8079
|
-
"div",
|
|
8080
|
-
null,
|
|
8081
|
-
toDisplayString(item.label),
|
|
8082
|
-
1
|
|
8083
|
-
/* TEXT */
|
|
8084
|
-
),
|
|
8085
|
-
item.value === "\u672A\u8BFB" && noticeShow.value ? (openBlock(), createElementBlock("div", _hoisted_2$9, " \u2022\u2022\u2022 ")) : createCommentVNode("v-if", true)
|
|
8086
|
-
],
|
|
8087
|
-
2
|
|
8088
|
-
/* CLASS */
|
|
8089
|
-
)
|
|
8090
|
-
], 10, _hoisted_1$d);
|
|
8091
|
-
}),
|
|
8092
|
-
128
|
|
8093
|
-
/* KEYED_FRAGMENT */
|
|
8094
|
-
))
|
|
7397
|
+
default: withCtx(() => [
|
|
7398
|
+
createVNode(unref(NsTabsItem), {
|
|
7399
|
+
key: "\u5168\u90E8",
|
|
7400
|
+
tab: "\u5168\u90E8"
|
|
7401
|
+
}),
|
|
7402
|
+
createVNode(unref(NsTabsItem), {
|
|
7403
|
+
key: "\u4E1A\u52A1\u6D88\u606F",
|
|
7404
|
+
tab: "\u4E1A\u52A1\u6D88\u606F"
|
|
7405
|
+
}),
|
|
7406
|
+
createVNode(unref(NsTabsItem), {
|
|
7407
|
+
key: "\u7CFB\u7EDF\u516C\u544A",
|
|
7408
|
+
tab: "\u7CFB\u7EDF\u516C\u544A"
|
|
7409
|
+
}),
|
|
7410
|
+
createVNode(unref(NsTabsItem), {
|
|
7411
|
+
key: "\u672A\u8BFB",
|
|
7412
|
+
tab: "\u672A\u8BFB"
|
|
7413
|
+
})
|
|
8095
7414
|
]),
|
|
8096
7415
|
_: 1
|
|
8097
7416
|
/* STABLE */
|
|
8098
|
-
}, 8, ["modelValue"
|
|
8099
|
-
state.list.length > 0 ? (openBlock(), createElementBlock("div",
|
|
7417
|
+
}, 8, ["modelValue"]),
|
|
7418
|
+
state.list.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
8100
7419
|
withDirectives((openBlock(), createElementBlock("div", {
|
|
8101
7420
|
class: "btn",
|
|
8102
7421
|
onClick: readAll
|
|
@@ -8153,7 +7472,7 @@ var script$e = /* @__PURE__ */ defineComponent({
|
|
|
8153
7472
|
class: "news-item-title"
|
|
8154
7473
|
},
|
|
8155
7474
|
[
|
|
8156
|
-
item.\u662F\u516C\u544A ? (openBlock(), createElementBlock("img",
|
|
7475
|
+
item.\u662F\u516C\u544A ? (openBlock(), createElementBlock("img", _hoisted_2$9)) : createCommentVNode("v-if", true),
|
|
8157
7476
|
createTextVNode(
|
|
8158
7477
|
" " + toDisplayString(item.\u6807\u9898),
|
|
8159
7478
|
1
|
|
@@ -8174,7 +7493,7 @@ var script$e = /* @__PURE__ */ defineComponent({
|
|
|
8174
7493
|
}, null, 8, ["style", "content"]),
|
|
8175
7494
|
createElementVNode(
|
|
8176
7495
|
"div",
|
|
8177
|
-
|
|
7496
|
+
_hoisted_3$6,
|
|
8178
7497
|
toDisplayString(item.\u65F6\u95F4),
|
|
8179
7498
|
1
|
|
8180
7499
|
/* TEXT */
|
|
@@ -8631,8 +7950,7 @@ var script$b = /* @__PURE__ */ defineComponent({
|
|
|
8631
7950
|
}
|
|
8632
7951
|
async function updateImage(filePath) {
|
|
8633
7952
|
showLoading({
|
|
8634
|
-
title: "\u4E0A\u4F20\u4E2D..."
|
|
8635
|
-
mask: true
|
|
7953
|
+
title: "\u4E0A\u4F20\u4E2D..."
|
|
8636
7954
|
});
|
|
8637
7955
|
const appkitOptions = useAppKitOptions();
|
|
8638
7956
|
const $http = useHttp();
|
|
@@ -8745,7 +8063,6 @@ var script$b = /* @__PURE__ */ defineComponent({
|
|
|
8745
8063
|
title: "\u63D0\u793A",
|
|
8746
8064
|
content: "\u786E\u5B9A\u8981\u9000\u51FA\u767B\u5F55\u5417\uFF1F",
|
|
8747
8065
|
confirmText: "\u786E\u5B9A",
|
|
8748
|
-
confirmColor: "#017fff",
|
|
8749
8066
|
success: async (e) => {
|
|
8750
8067
|
if (e.confirm) {
|
|
8751
8068
|
emits("logout");
|
|
@@ -10609,8 +9926,7 @@ var script$6 = /* @__PURE__ */ defineComponent({
|
|
|
10609
9926
|
const $http = useHttp();
|
|
10610
9927
|
const appkitOptions = useAppKitOptions();
|
|
10611
9928
|
showLoading({
|
|
10612
|
-
title: "\u53CD\u9988\u4E2D..."
|
|
10613
|
-
mask: true
|
|
9929
|
+
title: "\u53CD\u9988\u4E2D..."
|
|
10614
9930
|
});
|
|
10615
9931
|
const attachment = JSON.parse(
|
|
10616
9932
|
JSON.stringify(
|
|
@@ -11320,9 +10636,8 @@ var script$2 = /* @__PURE__ */ defineComponent({
|
|
|
11320
10636
|
rules: ["required"]
|
|
11321
10637
|
}, {
|
|
11322
10638
|
append: withCtx(() => [
|
|
11323
|
-
!\u5DF2\u8BA4\u8BC1.value ? (openBlock(), createBlock(unref(script$
|
|
10639
|
+
!\u5DF2\u8BA4\u8BC1.value ? (openBlock(), createBlock(unref(script$G), {
|
|
11324
10640
|
key: 0,
|
|
11325
|
-
"has-upload-vo": false,
|
|
11326
10641
|
onComplete: onOcrComplete
|
|
11327
10642
|
})) : createCommentVNode("v-if", true)
|
|
11328
10643
|
]),
|
|
@@ -11931,4 +11246,4 @@ const AppKit = {
|
|
|
11931
11246
|
}
|
|
11932
11247
|
};
|
|
11933
11248
|
|
|
11934
|
-
export { script$t as AccountView, script$
|
|
11249
|
+
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 };
|