@uxda/appkit 4.3.6 → 4.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.mjs +7 -7
- package/COMPONENT_USAGE.md +1523 -1523
- package/PROJECT_DOCS.md +142 -142
- package/README.md +187 -187
- package/babel.config.js +12 -12
- package/dist/appkit.css +15 -63
- package/dist/assets/asset-DcH8Kg-2 +1 -0
- package/dist/index.js +259 -806
- package/package.json +79 -79
- package/project.config.json +15 -15
- package/project.tt.json +13 -13
- package/rollup.config.mjs +78 -78
- package/src/Appkit.ts +72 -72
- package/src/balance/api/endpoints.ts +133 -133
- package/src/balance/api/index.ts +118 -118
- package/src/balance/components/AccountView.vue +770 -770
- package/src/balance/components/BalanceCard.vue +210 -210
- package/src/balance/components/BalanceReminder.vue +84 -84
- package/src/balance/components/ConsumptionFilter.vue +218 -218
- package/src/balance/components/ConsumptionRules.vue +68 -68
- package/src/balance/components/DateFilter.vue +259 -259
- package/src/balance/components/DateRange.vue +111 -111
- package/src/balance/components/ListFilter.vue +62 -62
- package/src/balance/components/ListFilterPicker.vue +191 -191
- package/src/balance/components/PromoterCard.vue +307 -308
- package/src/balance/components/SecondBalance.vue +77 -77
- package/src/balance/components/Tip.vue +45 -45
- package/src/balance/components/index.ts +8 -8
- package/src/balance/types.ts +99 -99
- package/src/components/bt-cropper/index.vue +730 -730
- package/src/components/bt-cropper/utils/calcCropper.js +42 -42
- package/src/components/bt-cropper/utils/calcImagePosition.js +23 -23
- package/src/components/bt-cropper/utils/calcImageSize.js +37 -37
- package/src/components/bt-cropper/utils/calcPointDistance.js +12 -12
- package/src/components/bt-cropper/utils/calcRightAndBottom.js +7 -7
- package/src/components/bt-cropper/utils/ratio.js +3 -3
- package/src/components/bt-cropper/utils/tools.js +25 -25
- package/src/components/dd-area/index.vue +225 -225
- package/src/components/dd-icon/doc.md +21 -21
- package/src/components/dd-icon/index.vue +23 -23
- package/src/components/dd-notice-bar/index.vue +78 -78
- package/src/components/dd-search/doc.md +34 -34
- package/src/components/dd-search/index.vue +168 -168
- package/src/components/dd-selector/index.vue +124 -124
- package/src/components/dd-skeleton/doc.md +19 -19
- package/src/components/dd-skeleton/index.vue +36 -36
- package/src/global.ts +6 -6
- package/src/index.ts +101 -101
- package/src/main.scss +1 -1
- package/src/notice/api/endpoints.ts +54 -54
- package/src/notice/api/index.ts +121 -121
- package/src/notice/components/NoticeBanner.vue +247 -247
- package/src/notice/components/NoticeEntry.vue +99 -99
- package/src/notice/components/NoticeList.vue +311 -311
- package/src/notice/components/NoticeList2.vue +400 -399
- package/src/notice/components/NoticePopup.vue +163 -163
- package/src/notice/components/index.ts +6 -6
- package/src/notice/components/useCommonList.ts +86 -87
- package/src/notice/components/useNotice.ts +35 -35
- package/src/notice/index.ts +1 -1
- package/src/notice/types.ts +25 -25
- package/src/payment/api/config.ts +7 -7
- package/src/payment/api/endpoints.ts +96 -98
- package/src/payment/api/index.ts +107 -108
- package/src/payment/components/AmountPicker.vue +90 -90
- package/src/payment/components/RechargeResult.vue +69 -68
- package/src/payment/components/RechargeView.vue +191 -191
- package/src/payment/components/RightsPicker.vue +105 -105
- package/src/payment/components/TradeView.vue +363 -571
- package/src/payment/components/UserAgreement.vue +234 -234
- package/src/payment/components/index.ts +22 -22
- package/src/payment/index.ts +5 -5
- package/src/payment/services/index.ts +16 -16
- package/src/payment/services/invoke-recharge.ts +25 -25
- package/src/payment/services/request-payment.ts +130 -132
- package/src/payment/types.ts +33 -34
- package/src/register/components/SelfRegistration.vue +233 -233
- package/src/register/components/index.ts +2 -2
- package/src/scenarios/components/SharePoster.vue +364 -364
- package/src/scenarios/components/index.ts +2 -2
- package/src/scenarios/components/poster-paste.vue +93 -93
- package/src/scenarios/components/share-poster.md +273 -273
- package/src/shared/components/AppDrawer.vue +53 -53
- package/src/shared/components/AppVerify.vue +128 -137
- package/src/shared/components/DeviceVersion.vue +78 -78
- package/src/shared/components/EmptyView.vue +33 -33
- package/src/shared/components/OcrBusinessLicense.vue +137 -120
- package/src/shared/components/OcrIcon.vue +229 -267
- package/src/shared/components/PageHeader.vue +84 -84
- package/src/shared/components/index.ts +8 -10
- package/src/shared/composables/index.ts +9 -10
- package/src/shared/composables/useAmount.ts +46 -46
- package/src/shared/composables/useCountdown.ts +46 -46
- package/src/shared/composables/useCrypto.ts +76 -76
- package/src/shared/composables/useDeviceEnv.ts +26 -26
- package/src/shared/composables/useDragBox.ts +97 -97
- package/src/shared/composables/useEncode.ts +43 -43
- package/src/shared/composables/useLogger.ts +144 -144
- package/src/shared/composables/useSafeArea.ts +46 -46
- package/src/shared/composables/useTabbar.ts +24 -24
- package/src/shared/composables/useUpload.ts +61 -106
- package/src/shared/composables/useValidator.ts +32 -32
- package/src/shared/composables/useWxAuth.ts +48 -48
- package/src/shared/http/Http.ts +148 -149
- package/src/shared/http/index.ts +1 -1
- package/src/shared/http/types.ts +163 -163
- package/src/shared/index.ts +9 -9
- package/src/shared/tracking/directives/index.ts +40 -40
- package/src/shared/tracking/examples/page-tracking-template.vue +27 -27
- package/src/shared/tracking/tracking-sdk.ts +1 -0
- package/src/shared/weixin/index.ts +9 -9
- package/src/shared/weixin/jssdk.ts +103 -104
- package/src/shared/weixin/payment.ts +38 -38
- package/src/styles/vars.scss +3 -3
- package/src/user/api/endpoints.ts +17 -17
- package/src/user/api/index.ts +123 -123
- package/src/user/components/LoginSetting.vue +114 -114
- package/src/user/components/UserAuth.vue +218 -218
- package/src/user/components/UserBinding.vue +277 -277
- package/src/user/components/UserBindingSuccess.vue +80 -80
- package/src/user/components/UserEntry.vue +139 -139
- package/src/user/components/UserFeedback.vue +427 -428
- package/src/user/components/UserFeedbackEntry.vue +175 -175
- package/src/user/components/UserHeadCrop.vue +65 -65
- package/src/user/components/UserInfo.vue +709 -711
- package/src/user/components/UserResourceEmpty.vue +75 -75
- package/src/user/components/index.ts +23 -23
- package/src/user/index.ts +1 -1
- package/src/utils/utils.ts +33 -33
- package/tsconfig.json +30 -30
- package/types/global.d.ts +22 -24
- package/types/vue.d.ts +10 -10
- package/src/shared/components/OcrBank.vue +0 -202
- package/src/shared/components/OcrInvoice.vue +0 -218
- package/src/shared/composables/useCompress.ts +0 -64
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Grid, GridItem, Popup, ActionSheet, Checkbox, Button, Dialog, DatePicker, Form, FormItem, RadioGroup, Radio, Ellipsis, Skeleton, Cell, Input, Steps, Step } from '@nutui/nutui-taro';
|
|
2
2
|
import '@nutui/nutui-taro/dist/packages/button/style/css';
|
|
3
3
|
import '@nutui/nutui-taro/dist/packages/checkbox/style/css';
|
|
4
|
-
import { defineComponent, reactive,
|
|
4
|
+
import { defineComponent, reactive, createBlock, openBlock, withCtx, createElementBlock, Fragment, renderList, normalizeClass, createElementVNode, toDisplayString, createTextVNode, ref, computed, onUnmounted, resolveDirective, createCommentVNode, withDirectives, renderSlot, createVNode, normalizeStyle, unref, isRef, onMounted, createStaticVNode, watch, vShow, mergeModels, useModel, resolveComponent, vModelText, watchPostEffect, withModifiers } from 'vue';
|
|
5
5
|
import '@nutui/nutui-taro/dist/packages/grid/style/css';
|
|
6
6
|
import '@nutui/nutui-taro/dist/packages/griditem/style/css';
|
|
7
|
-
import Taro, { showModal, getSystemInfoSync, getMenuButtonBoundingClientRect, request as request$1,
|
|
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, 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,7 +652,7 @@ 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" };
|
|
@@ -744,7 +663,7 @@ const _hoisted_5$e = {
|
|
|
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 },
|
|
@@ -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,262 +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
|
-
certNo: allTrim(faceInfo.num || ""),
|
|
1283
|
-
address: allTrim(faceInfo.address || "")
|
|
1284
|
-
},
|
|
1285
|
-
backInfo: {
|
|
1286
|
-
startDate: backInfo?.startDate || "",
|
|
1287
|
-
endDate: backInfo?.endDate || ""
|
|
1288
|
-
},
|
|
1289
|
-
fileUploadVO: res.result.fileUploadVO || {}
|
|
1290
|
-
};
|
|
1291
|
-
if (props.side === "face" && !result.faceInfo.name && !result.faceInfo.certNo) {
|
|
1292
|
-
showToast({ title: "\u8BC6\u522B\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5", icon: "none" });
|
|
1293
|
-
}
|
|
1294
|
-
if (props.side === "back" && !result.backInfo?.startDate && !result.backInfo?.endDate) {
|
|
1295
|
-
showToast({ title: "\u8BC6\u522B\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5", icon: "none" });
|
|
1296
|
-
}
|
|
1297
|
-
} else {
|
|
1298
|
-
await getOcrInfo(res.result);
|
|
1299
|
-
}
|
|
1300
|
-
} else {
|
|
1301
|
-
hideLoading();
|
|
1302
|
-
showToast({
|
|
1303
|
-
title: res.msg,
|
|
1304
|
-
icon: "error"
|
|
1305
|
-
});
|
|
1306
|
-
}
|
|
1307
|
-
} catch (err) {
|
|
1308
|
-
hideLoading();
|
|
1309
|
-
console.log(err);
|
|
1310
|
-
}
|
|
1311
|
-
props.hasUploadVo && (result?.faceInfo.name || result?.backInfo.startDate) && emits("complete", result);
|
|
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
|
-
}
|
|
1347
|
-
}
|
|
1348
|
-
const activeSheetVisible = ref(false);
|
|
1349
|
-
const actionSheetMenus = [
|
|
1350
|
-
{
|
|
1351
|
-
name: "\u62CD\u6444",
|
|
1352
|
-
type: "camera"
|
|
1353
|
-
},
|
|
1354
|
-
{
|
|
1355
|
-
name: "\u4ECE\u76F8\u518C\u9009\u62E9",
|
|
1356
|
-
type: "album"
|
|
1357
|
-
},
|
|
1358
|
-
{
|
|
1359
|
-
name: "\u4ECE\u804A\u5929\u4F1A\u8BDD\u9009\u62E9",
|
|
1360
|
-
type: "message"
|
|
1361
|
-
}
|
|
1362
|
-
];
|
|
1363
|
-
if (Taro.getEnv() === "WEB") {
|
|
1364
|
-
actionSheetMenus.pop();
|
|
1365
|
-
}
|
|
1366
|
-
async function chooseImages(item) {
|
|
1367
|
-
if (["camera", "album"].includes(item.type)) {
|
|
1368
|
-
const csRes = await chooseMedia({
|
|
1369
|
-
count: 1,
|
|
1370
|
-
sourceType: [item.type],
|
|
1371
|
-
// "camera" | "album"
|
|
1372
|
-
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)
|
|
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 || "")
|
|
1414
1223
|
},
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
)
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
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 || ""
|
|
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" });
|
|
1474
1236
|
}
|
|
1475
|
-
});
|
|
1476
|
-
const res = JSON.parse(upRes.data);
|
|
1477
|
-
if (res.code === "200") {
|
|
1478
|
-
await getBankCardInfo(res.result);
|
|
1479
1237
|
} else {
|
|
1480
|
-
hideLoading();
|
|
1481
1238
|
showToast({
|
|
1482
1239
|
title: res.msg,
|
|
1483
1240
|
icon: "error"
|
|
@@ -1487,30 +1244,7 @@ var script$H = /* @__PURE__ */ defineComponent({
|
|
|
1487
1244
|
hideLoading();
|
|
1488
1245
|
console.log(err);
|
|
1489
1246
|
}
|
|
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
|
-
}
|
|
1247
|
+
emits("complete", result);
|
|
1514
1248
|
}
|
|
1515
1249
|
const activeSheetVisible = ref(false);
|
|
1516
1250
|
const actionSheetMenus = [
|
|
@@ -1548,7 +1282,7 @@ var script$H = /* @__PURE__ */ defineComponent({
|
|
|
1548
1282
|
onUploadFile(csRes);
|
|
1549
1283
|
}
|
|
1550
1284
|
}
|
|
1551
|
-
async function
|
|
1285
|
+
async function onPhotograph() {
|
|
1552
1286
|
if (props.disabled) return;
|
|
1553
1287
|
if (Taro.getEnv() === "WEB") {
|
|
1554
1288
|
const csRes = await chooseMedia({
|
|
@@ -1563,9 +1297,6 @@ var script$H = /* @__PURE__ */ defineComponent({
|
|
|
1563
1297
|
}
|
|
1564
1298
|
activeSheetVisible.value = true;
|
|
1565
1299
|
}
|
|
1566
|
-
__expose({
|
|
1567
|
-
onUpload
|
|
1568
|
-
});
|
|
1569
1300
|
return (_ctx, _cache) => {
|
|
1570
1301
|
const _component_nut_action_sheet = ActionSheet;
|
|
1571
1302
|
const _directive_track_click = resolveDirective("track-click");
|
|
@@ -1576,8 +1307,8 @@ var script$H = /* @__PURE__ */ defineComponent({
|
|
|
1576
1307
|
withDirectives((openBlock(), createElementBlock(
|
|
1577
1308
|
"div",
|
|
1578
1309
|
{
|
|
1579
|
-
class: normalizeClass(["ocr-
|
|
1580
|
-
onClick:
|
|
1310
|
+
class: normalizeClass(["ocr-icon", [__props.disabled ? "disabled" : ""]]),
|
|
1311
|
+
onClick: onPhotograph
|
|
1581
1312
|
},
|
|
1582
1313
|
[
|
|
1583
1314
|
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
@@ -1587,11 +1318,11 @@ var script$H = /* @__PURE__ */ defineComponent({
|
|
|
1587
1318
|
2
|
|
1588
1319
|
/* CLASS */
|
|
1589
1320
|
)), [
|
|
1590
|
-
[_directive_track_click, "\
|
|
1321
|
+
[_directive_track_click, "\u8EAB\u4EFD\u8BC1\u8BC6\u522B-\u70B9\u51FB"]
|
|
1591
1322
|
]),
|
|
1592
1323
|
createVNode(_component_nut_action_sheet, {
|
|
1593
1324
|
visible: activeSheetVisible.value,
|
|
1594
|
-
"onUpdate:visible": _cache[
|
|
1325
|
+
"onUpdate:visible": _cache[0] || (_cache[0] = ($event) => activeSheetVisible.value = $event),
|
|
1595
1326
|
"menu-items": actionSheetMenus,
|
|
1596
1327
|
onChoose: chooseImages,
|
|
1597
1328
|
"cancel-txt": "\u53D6\u6D88"
|
|
@@ -1604,26 +1335,48 @@ var script$H = /* @__PURE__ */ defineComponent({
|
|
|
1604
1335
|
}
|
|
1605
1336
|
});
|
|
1606
1337
|
|
|
1607
|
-
script$
|
|
1338
|
+
script$G.__file = "src/shared/components/OcrIcon.vue";
|
|
1608
1339
|
|
|
1609
|
-
var script$
|
|
1340
|
+
var script$F = /* @__PURE__ */ defineComponent({
|
|
1610
1341
|
__name: "OcrBusinessLicense",
|
|
1611
1342
|
props: {
|
|
1612
|
-
disabled: { type: Boolean, required: true
|
|
1613
|
-
customClick: { type: Boolean, required: false, default: false }
|
|
1343
|
+
disabled: { type: Boolean, required: true }
|
|
1614
1344
|
},
|
|
1615
1345
|
emits: ["complete"],
|
|
1616
|
-
setup(__props, {
|
|
1346
|
+
setup(__props, { emit: __emit }) {
|
|
1617
1347
|
const appKitOptions = useAppKitOptions();
|
|
1618
1348
|
const emits = __emit;
|
|
1619
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
|
+
}
|
|
1620
1372
|
function allTrim(str) {
|
|
1621
1373
|
return str.replace(/\s+/g, "");
|
|
1622
1374
|
}
|
|
1623
|
-
async function
|
|
1375
|
+
async function onIconClick() {
|
|
1624
1376
|
if (props.disabled) {
|
|
1625
1377
|
return;
|
|
1626
1378
|
}
|
|
1379
|
+
console.log("===onIconClick");
|
|
1627
1380
|
let result = null;
|
|
1628
1381
|
try {
|
|
1629
1382
|
const csRes = await chooseMedia({
|
|
@@ -1631,9 +1384,14 @@ var script$G = /* @__PURE__ */ defineComponent({
|
|
|
1631
1384
|
sourceType: ["album", "camera"]
|
|
1632
1385
|
});
|
|
1633
1386
|
let { size, tempFilePath } = csRes.tempFiles[0];
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
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.." });
|
|
1637
1395
|
const session = appKitOptions.token();
|
|
1638
1396
|
const baseUrl = appKitOptions.baseUrl();
|
|
1639
1397
|
const upRes = await uploadFile({
|
|
@@ -1641,8 +1399,7 @@ var script$G = /* @__PURE__ */ defineComponent({
|
|
|
1641
1399
|
filePath,
|
|
1642
1400
|
name: "file",
|
|
1643
1401
|
formData: {
|
|
1644
|
-
objectNo: `min${Date.now()}
|
|
1645
|
-
appCode: appKitOptions.app()
|
|
1402
|
+
objectNo: `min${Date.now()}`
|
|
1646
1403
|
},
|
|
1647
1404
|
header: {
|
|
1648
1405
|
token: session || ""
|
|
@@ -1676,21 +1433,16 @@ var script$G = /* @__PURE__ */ defineComponent({
|
|
|
1676
1433
|
}
|
|
1677
1434
|
emits("complete", result);
|
|
1678
1435
|
}
|
|
1679
|
-
__expose({
|
|
1680
|
-
onUpload
|
|
1681
|
-
});
|
|
1682
1436
|
return (_ctx, _cache) => {
|
|
1683
1437
|
const _directive_track_click = resolveDirective("track-click");
|
|
1684
1438
|
return withDirectives((openBlock(), createElementBlock(
|
|
1685
1439
|
"div",
|
|
1686
1440
|
{
|
|
1687
1441
|
class: normalizeClass([["ocr-business-license", __props.disabled ? "disabled" : ""], "ocr-icon"]),
|
|
1688
|
-
onClick:
|
|
1442
|
+
onClick: onIconClick
|
|
1689
1443
|
},
|
|
1690
1444
|
[
|
|
1691
|
-
|
|
1692
|
-
createVNode(unref(NsIcon), { name: "https://cdn.ddjf.com/static/images/beidouxing/ocr-icon.png" })
|
|
1693
|
-
])
|
|
1445
|
+
createVNode(unref(NsIcon), { name: "https://cdn.ddjf.com/static/images/beidouxing/ocr-icon.png" })
|
|
1694
1446
|
],
|
|
1695
1447
|
2
|
|
1696
1448
|
/* CLASS */
|
|
@@ -1701,194 +1453,7 @@ var script$G = /* @__PURE__ */ defineComponent({
|
|
|
1701
1453
|
}
|
|
1702
1454
|
});
|
|
1703
1455
|
|
|
1704
|
-
script$
|
|
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
|
-
async function onUploadFile(csRes) {
|
|
1723
|
-
try {
|
|
1724
|
-
let { path, size, tempFilePath } = csRes.tempFiles[0];
|
|
1725
|
-
const compressImg = await compressImage(path || tempFilePath, getCompressQuality(size)) || {};
|
|
1726
|
-
const filePath = compressImg.tempFilePath || path;
|
|
1727
|
-
if (props.customUpload) {
|
|
1728
|
-
props.customUpload(filePath);
|
|
1729
|
-
return;
|
|
1730
|
-
}
|
|
1731
|
-
showLoading({ title: "\u53D1\u7968\u8BC6\u522B\u4E2D..", mask: true });
|
|
1732
|
-
const session = appKitOptions.token();
|
|
1733
|
-
const baseUrl = appKitOptions.baseUrl();
|
|
1734
|
-
const upRes = await uploadFile({
|
|
1735
|
-
url: `${baseUrl}${props.uploadUrl}`,
|
|
1736
|
-
filePath,
|
|
1737
|
-
name: "file",
|
|
1738
|
-
formData: {
|
|
1739
|
-
objectNo: `min${Date.now()}`,
|
|
1740
|
-
appCode: appKitOptions.app()
|
|
1741
|
-
},
|
|
1742
|
-
header: {
|
|
1743
|
-
token: session || ""
|
|
1744
|
-
}
|
|
1745
|
-
});
|
|
1746
|
-
const res = JSON.parse(upRes.data);
|
|
1747
|
-
if (res.code === "200") {
|
|
1748
|
-
await getOcrInfo(res.result);
|
|
1749
|
-
} else {
|
|
1750
|
-
hideLoading();
|
|
1751
|
-
showToast({
|
|
1752
|
-
title: res.msg,
|
|
1753
|
-
icon: "error"
|
|
1754
|
-
});
|
|
1755
|
-
}
|
|
1756
|
-
} catch (err) {
|
|
1757
|
-
hideLoading();
|
|
1758
|
-
console.log(err);
|
|
1759
|
-
}
|
|
1760
|
-
}
|
|
1761
|
-
async function getOcrInfo(file) {
|
|
1762
|
-
try {
|
|
1763
|
-
const res = await $http.get("/hkbase/common/vatInvoice", {
|
|
1764
|
-
fileUrl: typeof file === "string" ? file : file.originalUrl,
|
|
1765
|
-
fileType: "img"
|
|
1766
|
-
});
|
|
1767
|
-
hideLoading();
|
|
1768
|
-
if (!res?.purchaserRegisterNum) {
|
|
1769
|
-
$n.dialog({
|
|
1770
|
-
title: "\u8BC6\u522B\u5931\u8D25",
|
|
1771
|
-
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`,
|
|
1772
|
-
okText: "\u6211\u77E5\u9053\u4E86",
|
|
1773
|
-
cancelText: ""
|
|
1774
|
-
});
|
|
1775
|
-
return;
|
|
1776
|
-
}
|
|
1777
|
-
emits("complete", {
|
|
1778
|
-
invoiceDate: res?.invoiceDate,
|
|
1779
|
-
invoiceNum: res?.invoiceNum,
|
|
1780
|
-
invoiceNumConfirm: res?.invoiceNumConfirm,
|
|
1781
|
-
invoiceType: res?.invoiceType,
|
|
1782
|
-
noteDrawer: res?.noteDrawer,
|
|
1783
|
-
purchaserBank: res?.purchaserBank,
|
|
1784
|
-
purchaserName: res?.purchaserName,
|
|
1785
|
-
purchaserRegisterNum: res?.purchaserRegisterNum,
|
|
1786
|
-
remarks: res?.remarks,
|
|
1787
|
-
sellerName: res?.sellerName,
|
|
1788
|
-
sellerRegisterNum: res?.sellerRegisterNum,
|
|
1789
|
-
serviceType: res?.serviceType,
|
|
1790
|
-
totalAmount: res?.totalAmount,
|
|
1791
|
-
totalTax: res?.totalTax,
|
|
1792
|
-
fileUrl: typeof file === "string" ? file : file.originalUrl,
|
|
1793
|
-
fileKey: typeof file === "string" ? file : file.fileId
|
|
1794
|
-
});
|
|
1795
|
-
} catch (err) {
|
|
1796
|
-
hideLoading();
|
|
1797
|
-
}
|
|
1798
|
-
}
|
|
1799
|
-
const activeSheetVisible = ref(false);
|
|
1800
|
-
const actionSheetMenus = [
|
|
1801
|
-
{
|
|
1802
|
-
name: "\u62CD\u6444",
|
|
1803
|
-
type: "camera"
|
|
1804
|
-
},
|
|
1805
|
-
{
|
|
1806
|
-
name: "\u4ECE\u76F8\u518C\u9009\u62E9",
|
|
1807
|
-
type: "album"
|
|
1808
|
-
},
|
|
1809
|
-
{
|
|
1810
|
-
name: "\u4ECE\u804A\u5929\u4F1A\u8BDD\u9009\u62E9",
|
|
1811
|
-
type: "message"
|
|
1812
|
-
}
|
|
1813
|
-
];
|
|
1814
|
-
if (Taro.getEnv() === "WEB") {
|
|
1815
|
-
actionSheetMenus.pop();
|
|
1816
|
-
}
|
|
1817
|
-
async function chooseImages(item) {
|
|
1818
|
-
if (["camera", "album"].includes(item.type)) {
|
|
1819
|
-
const csRes = await chooseMedia({
|
|
1820
|
-
count: 1,
|
|
1821
|
-
sourceType: [item.type],
|
|
1822
|
-
// "camera" | "album"
|
|
1823
|
-
maxDuration: 60
|
|
1824
|
-
// 使用duration属性判断是图片还是视频,图片没有该属性
|
|
1825
|
-
});
|
|
1826
|
-
onUploadFile(csRes);
|
|
1827
|
-
} else {
|
|
1828
|
-
const csRes = await chooseMessageFile({
|
|
1829
|
-
count: 1,
|
|
1830
|
-
type: "image"
|
|
1831
|
-
});
|
|
1832
|
-
onUploadFile(csRes);
|
|
1833
|
-
}
|
|
1834
|
-
}
|
|
1835
|
-
async function onUpload() {
|
|
1836
|
-
if (props.disabled) return;
|
|
1837
|
-
if (Taro.getEnv() === "WEB") {
|
|
1838
|
-
const csRes = await chooseMedia({
|
|
1839
|
-
count: 1,
|
|
1840
|
-
sourceType: ["album"],
|
|
1841
|
-
// "camera" | "album"
|
|
1842
|
-
maxDuration: 60
|
|
1843
|
-
// 使用duration属性判断是图片还是视频,图片没有该属性
|
|
1844
|
-
});
|
|
1845
|
-
onUploadFile(csRes);
|
|
1846
|
-
return;
|
|
1847
|
-
}
|
|
1848
|
-
activeSheetVisible.value = true;
|
|
1849
|
-
}
|
|
1850
|
-
__expose({
|
|
1851
|
-
onUpload
|
|
1852
|
-
});
|
|
1853
|
-
return (_ctx, _cache) => {
|
|
1854
|
-
const _component_nut_action_sheet = ActionSheet;
|
|
1855
|
-
const _directive_track_click = resolveDirective("track-click");
|
|
1856
|
-
return openBlock(), createElementBlock(
|
|
1857
|
-
Fragment,
|
|
1858
|
-
null,
|
|
1859
|
-
[
|
|
1860
|
-
withDirectives((openBlock(), createElementBlock(
|
|
1861
|
-
"div",
|
|
1862
|
-
{
|
|
1863
|
-
class: normalizeClass(["ocr-invoice", [__props.disabled ? "disabled" : "", __props.className]]),
|
|
1864
|
-
onClick: _cache[0] || (_cache[0] = ($event) => !__props.customClick ? onUpload() : null)
|
|
1865
|
-
},
|
|
1866
|
-
[
|
|
1867
|
-
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
1868
|
-
createVNode(unref(NsIcon), { name: "https://cdn.ddjf.com/static/images/beidouxing/ocr-icon.png" })
|
|
1869
|
-
])
|
|
1870
|
-
],
|
|
1871
|
-
2
|
|
1872
|
-
/* CLASS */
|
|
1873
|
-
)), [
|
|
1874
|
-
[_directive_track_click, "\u53D1\u7968\u8BC6\u522B-\u70B9\u51FB"]
|
|
1875
|
-
]),
|
|
1876
|
-
createVNode(_component_nut_action_sheet, {
|
|
1877
|
-
visible: activeSheetVisible.value,
|
|
1878
|
-
"onUpdate:visible": _cache[1] || (_cache[1] = ($event) => activeSheetVisible.value = $event),
|
|
1879
|
-
"menu-items": actionSheetMenus,
|
|
1880
|
-
onChoose: chooseImages,
|
|
1881
|
-
"cancel-txt": "\u53D6\u6D88"
|
|
1882
|
-
}, null, 8, ["visible"])
|
|
1883
|
-
],
|
|
1884
|
-
64
|
|
1885
|
-
/* STABLE_FRAGMENT */
|
|
1886
|
-
);
|
|
1887
|
-
};
|
|
1888
|
-
}
|
|
1889
|
-
});
|
|
1890
|
-
|
|
1891
|
-
script$F.__file = "src/shared/components/OcrInvoice.vue";
|
|
1456
|
+
script$F.__file = "src/shared/components/OcrBusinessLicense.vue";
|
|
1892
1457
|
|
|
1893
1458
|
var HttpMethod = /* @__PURE__ */ ((HttpMethod2) => {
|
|
1894
1459
|
HttpMethod2["get"] = "GET";
|
|
@@ -1936,7 +1501,6 @@ const request = (config) => {
|
|
|
1936
1501
|
}
|
|
1937
1502
|
}).catch((e) => {
|
|
1938
1503
|
console.log("request.catch===", e);
|
|
1939
|
-
reject(e);
|
|
1940
1504
|
});
|
|
1941
1505
|
});
|
|
1942
1506
|
};
|
|
@@ -1995,6 +1559,15 @@ function isApp() {
|
|
|
1995
1559
|
var __defProp = Object.defineProperty;
|
|
1996
1560
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1997
1561
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1562
|
+
var TrackingEventType = /* @__PURE__ */ ((TrackingEventType2) => {
|
|
1563
|
+
TrackingEventType2["PAGE_VIEW"] = "page_view";
|
|
1564
|
+
TrackingEventType2["PAGE_LEAVE"] = "page_leave";
|
|
1565
|
+
TrackingEventType2["APP_DEVICE_INFO"] = "app_device_info";
|
|
1566
|
+
TrackingEventType2["CLICK"] = "click";
|
|
1567
|
+
TrackingEventType2["CUSTOM"] = "custom";
|
|
1568
|
+
return TrackingEventType2;
|
|
1569
|
+
})(TrackingEventType || {});
|
|
1570
|
+
const { PAGE_VIEW, PAGE_LEAVE, CLICK, CUSTOM, APP_DEVICE_INFO } = TrackingEventType;
|
|
1998
1571
|
const DEFAULT_CONFIG = {
|
|
1999
1572
|
enabled: true,
|
|
2000
1573
|
debug: false,
|
|
@@ -2444,6 +2017,7 @@ class TrackingSDK {
|
|
|
2444
2017
|
* 发送埋点数据
|
|
2445
2018
|
*/
|
|
2446
2019
|
async flush() {
|
|
2020
|
+
console.log(this.eventQueue.length, "this.eventQueue.length");
|
|
2447
2021
|
if (this.eventQueue.length === 0) return;
|
|
2448
2022
|
const events = [...this.eventQueue];
|
|
2449
2023
|
this.eventQueue = [];
|
|
@@ -3129,11 +2703,9 @@ const endpointsList$2 = {
|
|
|
3129
2703
|
certificateNo: params.user,
|
|
3130
2704
|
accountAuthFlag: params.accountAuthFlag || false,
|
|
3131
2705
|
channelCode: params.channelCode || null,
|
|
3132
|
-
payFinishJumpUrl: params.payFinishJumpUrl || null
|
|
3133
|
-
useCloudBean: params.useCloudBean || false
|
|
2706
|
+
payFinishJumpUrl: params.payFinishJumpUrl || null
|
|
3134
2707
|
}),
|
|
3135
2708
|
transform: (data) => {
|
|
3136
|
-
console.log(data, "data-----");
|
|
3137
2709
|
let json = null;
|
|
3138
2710
|
try {
|
|
3139
2711
|
json = JSON.parse(data.prePayStr);
|
|
@@ -3201,7 +2773,6 @@ const vendor$2 = {
|
|
|
3201
2773
|
title: data.msg,
|
|
3202
2774
|
icon: "none"
|
|
3203
2775
|
});
|
|
3204
|
-
reject(data.msg);
|
|
3205
2776
|
}
|
|
3206
2777
|
}).catch((e) => {
|
|
3207
2778
|
reject(e);
|
|
@@ -3365,8 +2936,6 @@ const requestBrandWCPayByBean = (params, Appcode = "") => {
|
|
|
3365
2936
|
}
|
|
3366
2937
|
});
|
|
3367
2938
|
}
|
|
3368
|
-
}).catch(() => {
|
|
3369
|
-
resolve(false);
|
|
3370
2939
|
});
|
|
3371
2940
|
});
|
|
3372
2941
|
};
|
|
@@ -3492,7 +3061,7 @@ var script$E = /* @__PURE__ */ defineComponent({
|
|
|
3492
3061
|
const _directive_track_click = resolveDirective("track-click");
|
|
3493
3062
|
return openBlock(), createElementBlock("view", _hoisted_1$B, [
|
|
3494
3063
|
createElementVNode("view", _hoisted_2$r, [
|
|
3495
|
-
createVNode(script$
|
|
3064
|
+
createVNode(script$M, {
|
|
3496
3065
|
items: amounts.value,
|
|
3497
3066
|
selected: state.selected,
|
|
3498
3067
|
onChange: onAmountSelect
|
|
@@ -3771,33 +3340,24 @@ const _hoisted_6$9 = {
|
|
|
3771
3340
|
};
|
|
3772
3341
|
const _hoisted_7$6 = { class: "amount" };
|
|
3773
3342
|
const _hoisted_8$5 = ["src"];
|
|
3774
|
-
const _hoisted_9$4 = {
|
|
3775
|
-
key: 0,
|
|
3776
|
-
class: "balance-warning"
|
|
3777
|
-
};
|
|
3343
|
+
const _hoisted_9$4 = { class: "amount-footer" };
|
|
3778
3344
|
const _hoisted_10$3 = {
|
|
3779
|
-
key: 1,
|
|
3780
|
-
class: "balance-warning-tip"
|
|
3781
|
-
};
|
|
3782
|
-
const _hoisted_11$3 = { class: "amount-footer" };
|
|
3783
|
-
const _hoisted_12$3 = {
|
|
3784
3345
|
key: 0,
|
|
3785
3346
|
class: "agreement"
|
|
3786
3347
|
};
|
|
3787
|
-
const
|
|
3788
|
-
const
|
|
3789
|
-
const
|
|
3348
|
+
const _hoisted_11$3 = { class: "buy-amount" };
|
|
3349
|
+
const _hoisted_12$3 = { class: "left" };
|
|
3350
|
+
const _hoisted_13$2 = { class: "amount" };
|
|
3351
|
+
const _hoisted_14$2 = { class: "item" };
|
|
3352
|
+
const _hoisted_15$2 = { class: "item" };
|
|
3790
3353
|
const _hoisted_16$2 = { class: "item" };
|
|
3791
|
-
const _hoisted_17$2 = { class: "item" };
|
|
3792
|
-
const _hoisted_18$2 = { class: "item" };
|
|
3793
3354
|
var script$A = /* @__PURE__ */ defineComponent({
|
|
3794
3355
|
__name: "TradeView",
|
|
3795
3356
|
props: {
|
|
3796
3357
|
headerApp: { type: String, required: true },
|
|
3797
3358
|
app: { type: String, required: true },
|
|
3798
3359
|
tenant: { type: String, required: true },
|
|
3799
|
-
payFinishJumpUrl: { type: String, required: false }
|
|
3800
|
-
apps: { type: String, required: false }
|
|
3360
|
+
payFinishJumpUrl: { type: String, required: false }
|
|
3801
3361
|
},
|
|
3802
3362
|
emits: ["complete", "agree"],
|
|
3803
3363
|
setup(__props, { emit: __emit }) {
|
|
@@ -3823,28 +3383,8 @@ var script$A = /* @__PURE__ */ defineComponent({
|
|
|
3823
3383
|
state.selected = selected;
|
|
3824
3384
|
selectBean.value = false;
|
|
3825
3385
|
};
|
|
3826
|
-
const extraPaymentAmount = computed(() => {
|
|
3827
|
-
if (!selectBean.value || !amounts.value[state.selected]) {
|
|
3828
|
-
return 0;
|
|
3829
|
-
}
|
|
3830
|
-
const paymentAmount = amounts.value[state.selected].paymentAmount || 0;
|
|
3831
|
-
const currentBalance = balance.value || 0;
|
|
3832
|
-
return Math.max(0, paymentAmount - currentBalance);
|
|
3833
|
-
});
|
|
3834
3386
|
const currentAmount = computed(() => {
|
|
3835
|
-
|
|
3836
|
-
return 0;
|
|
3837
|
-
}
|
|
3838
|
-
if (selectBean.value) {
|
|
3839
|
-
if (balance.value < amounts.value[state.selected].paymentAmount) {
|
|
3840
|
-
return extraPaymentAmount.value;
|
|
3841
|
-
}
|
|
3842
|
-
return 0;
|
|
3843
|
-
}
|
|
3844
|
-
return amounts.value[state.selected].paymentAmount || 0;
|
|
3845
|
-
});
|
|
3846
|
-
const isCombinedPayment = computed(() => {
|
|
3847
|
-
return selectBean.value && amounts.value[state.selected] && balance.value < amounts.value[state.selected].paymentAmount;
|
|
3387
|
+
return amounts.value[state.selected] && !selectBean.value ? amounts.value[state.selected].paymentAmount : 0;
|
|
3848
3388
|
});
|
|
3849
3389
|
onMounted(() => {
|
|
3850
3390
|
const $http = useHttp$2({ Appcode: props.headerApp, Tenant: props.tenant });
|
|
@@ -3858,28 +3398,24 @@ var script$A = /* @__PURE__ */ defineComponent({
|
|
|
3858
3398
|
const showDialog = ref(false);
|
|
3859
3399
|
async function beanPay() {
|
|
3860
3400
|
const $http = useHttp$2({ Appcode: props.headerApp, Tenant: props.tenant });
|
|
3861
|
-
|
|
3862
|
-
const response = await $http.post(
|
|
3863
|
-
`/payment/paymentCaseConfig/purchase/${amounts.value[state.selected].id}`
|
|
3864
|
-
);
|
|
3401
|
+
$http.post(`/payment/paymentCaseConfig/purchase/${amounts.value[state.selected].id}`).then((response) => {
|
|
3865
3402
|
if (response) {
|
|
3866
3403
|
showDialog.value = false;
|
|
3867
3404
|
emit("complete", { result: response, type: "bean" });
|
|
3868
3405
|
} else {
|
|
3869
3406
|
showToast({
|
|
3870
|
-
title: response
|
|
3407
|
+
title: response.message,
|
|
3871
3408
|
icon: "none"
|
|
3872
3409
|
});
|
|
3873
3410
|
}
|
|
3874
|
-
}
|
|
3875
|
-
showToast({
|
|
3876
|
-
title: error?.message || "\u652F\u4ED8\u5931\u8D25",
|
|
3877
|
-
icon: "none"
|
|
3878
|
-
});
|
|
3879
|
-
}
|
|
3411
|
+
});
|
|
3880
3412
|
}
|
|
3881
|
-
|
|
3882
|
-
if (
|
|
3413
|
+
const onPayClick = () => {
|
|
3414
|
+
if (selectBean.value) {
|
|
3415
|
+
showDialog.value = true;
|
|
3416
|
+
return;
|
|
3417
|
+
}
|
|
3418
|
+
if (!selectBean.value && !state.agreed) {
|
|
3883
3419
|
showToast({
|
|
3884
3420
|
title: "\u8BF7\u52FE\u9009\u300A\u5927\u9053\u4E91\u5E73\u53F0\u4E91\u8C46\u5145\u503C\u534F\u8BAE\u300B",
|
|
3885
3421
|
icon: "none"
|
|
@@ -3898,109 +3434,41 @@ var script$A = /* @__PURE__ */ defineComponent({
|
|
|
3898
3434
|
}
|
|
3899
3435
|
requestBrandWCPayByBean({
|
|
3900
3436
|
caseConfigId: amounts.value[state.selected].id,
|
|
3901
|
-
amount:
|
|
3437
|
+
amount: amounts.value[state.selected].paymentAmount,
|
|
3902
3438
|
app: "loankitMp",
|
|
3903
3439
|
tenant: props.tenant,
|
|
3904
3440
|
accountAuthFlag: false,
|
|
3905
3441
|
channelCode: "centergzh",
|
|
3906
3442
|
payFinishJumpUrl: props.payFinishJumpUrl,
|
|
3907
|
-
fromMini: !!params.from
|
|
3908
|
-
useCloudBean: isCombinedPayment.value
|
|
3443
|
+
fromMini: !!params.from
|
|
3909
3444
|
}).then((result) => {
|
|
3445
|
+
console.log(result, "------requestBrandWCPay");
|
|
3910
3446
|
state.buttonLoading = false;
|
|
3911
3447
|
if (typeof result === "boolean" && result) {
|
|
3912
3448
|
window.location.href = props.payFinishJumpUrl;
|
|
3913
3449
|
} else {
|
|
3914
|
-
emit("complete", {
|
|
3915
|
-
result,
|
|
3916
|
-
type: isCombinedPayment.value ? "combined" : "wePay"
|
|
3917
|
-
});
|
|
3450
|
+
emit("complete", { result, type: "wePay" });
|
|
3918
3451
|
}
|
|
3919
|
-
}).catch((error) => {
|
|
3920
|
-
state.buttonLoading = false;
|
|
3921
|
-
showToast({
|
|
3922
|
-
title: error.message || "\u652F\u4ED8\u5931\u8D25",
|
|
3923
|
-
icon: "none"
|
|
3924
|
-
});
|
|
3925
3452
|
});
|
|
3926
3453
|
} else {
|
|
3927
3454
|
wx.login({
|
|
3928
3455
|
success({ code }) {
|
|
3929
|
-
requestPaymentByBean(
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
},
|
|
3937
|
-
props.headerApp
|
|
3938
|
-
).then((result) => {
|
|
3456
|
+
requestPaymentByBean({
|
|
3457
|
+
caseConfigId: amounts.value[state.selected].id,
|
|
3458
|
+
amount: amounts.value[state.selected].paymentAmount,
|
|
3459
|
+
app: props.app,
|
|
3460
|
+
tenant: props.tenant,
|
|
3461
|
+
user: code
|
|
3462
|
+
}, props.headerApp).then((result) => {
|
|
3939
3463
|
state.buttonLoading = false;
|
|
3940
3464
|
if (result) {
|
|
3941
|
-
emit("complete", {
|
|
3942
|
-
result: true,
|
|
3943
|
-
type: isCombinedPayment.value ? "combined" : "wePay"
|
|
3944
|
-
});
|
|
3465
|
+
emit("complete", { result: true, type: "wePay" });
|
|
3945
3466
|
}
|
|
3946
|
-
}).catch((error) => {
|
|
3947
|
-
state.buttonLoading = false;
|
|
3948
|
-
showToast({
|
|
3949
|
-
title: error.message || "\u652F\u4ED8\u5931\u8D25",
|
|
3950
|
-
icon: "none"
|
|
3951
|
-
});
|
|
3952
|
-
});
|
|
3953
|
-
},
|
|
3954
|
-
fail() {
|
|
3955
|
-
state.buttonLoading = false;
|
|
3956
|
-
showToast({
|
|
3957
|
-
title: "\u767B\u5F55\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5",
|
|
3958
|
-
icon: "none"
|
|
3959
3467
|
});
|
|
3960
3468
|
}
|
|
3961
3469
|
});
|
|
3962
3470
|
}
|
|
3963
|
-
}
|
|
3964
|
-
const onPayClick = async () => {
|
|
3965
|
-
if (selectBean.value && !isCombinedPayment.value) {
|
|
3966
|
-
showDialog.value = true;
|
|
3967
|
-
return;
|
|
3968
|
-
}
|
|
3969
|
-
if (isCombinedPayment.value) {
|
|
3970
|
-
const res = await checkBalance();
|
|
3971
|
-
if (!res) return;
|
|
3972
|
-
}
|
|
3973
|
-
proceedWechatPayment();
|
|
3974
3471
|
};
|
|
3975
|
-
async function checkBalance() {
|
|
3976
|
-
const $http = useHttp$2();
|
|
3977
|
-
return new Promise((resolve, reject) => {
|
|
3978
|
-
state.buttonLoading = true;
|
|
3979
|
-
$http.get(endpoints$2.\u83B7\u53D6\u4F59\u989D\u660E\u7EC6, {
|
|
3980
|
-
app: props.apps
|
|
3981
|
-
}).then((data) => {
|
|
3982
|
-
state.buttonLoading = false;
|
|
3983
|
-
if (data.commonAccount < balance.value) {
|
|
3984
|
-
showModal({
|
|
3985
|
-
title: "\u6E29\u99A8\u63D0\u793A",
|
|
3986
|
-
content: "\u4E91\u8C46\u4E0D\u8DB3\uFF0C\u8BF7\u5237\u65B0\u540E\u518D\u6B21\u786E\u8BA4",
|
|
3987
|
-
showCancel: false,
|
|
3988
|
-
confirmText: "\u5237\u65B0",
|
|
3989
|
-
confirmColor: "#017fff",
|
|
3990
|
-
success: () => {
|
|
3991
|
-
balance.value = data.commonAccount;
|
|
3992
|
-
}
|
|
3993
|
-
});
|
|
3994
|
-
resolve(false);
|
|
3995
|
-
} else {
|
|
3996
|
-
resolve(true);
|
|
3997
|
-
}
|
|
3998
|
-
}).catch((error) => {
|
|
3999
|
-
state.buttonLoading = false;
|
|
4000
|
-
resolve(false);
|
|
4001
|
-
});
|
|
4002
|
-
});
|
|
4003
|
-
}
|
|
4004
3472
|
return (_ctx, _cache) => {
|
|
4005
3473
|
const _component_nut_checkbox = Checkbox;
|
|
4006
3474
|
const _component_nut_button = Button;
|
|
@@ -4022,28 +3490,29 @@ var script$A = /* @__PURE__ */ defineComponent({
|
|
|
4022
3490
|
-1
|
|
4023
3491
|
/* CACHED */
|
|
4024
3492
|
)),
|
|
4025
|
-
!selectBean.value
|
|
3493
|
+
!selectBean.value ? (openBlock(), createElementBlock(
|
|
4026
3494
|
"div",
|
|
4027
3495
|
_hoisted_5$d,
|
|
4028
|
-
"
|
|
3496
|
+
"\u4F59\u989D " + toDisplayString(unref(formatAmount)(balance.value || 0)),
|
|
4029
3497
|
1
|
|
4030
3498
|
/* TEXT */
|
|
4031
3499
|
)) : (openBlock(), createElementBlock(
|
|
4032
3500
|
"div",
|
|
4033
3501
|
_hoisted_6$9,
|
|
4034
|
-
"
|
|
3502
|
+
"\u6263\u51CF\u540E\u4F59\u989D " + toDisplayString(unref(formatAmount)(balance.value - amounts.value[state.selected].paymentAmount)),
|
|
4035
3503
|
1
|
|
4036
3504
|
/* TEXT */
|
|
4037
3505
|
))
|
|
4038
3506
|
]),
|
|
4039
|
-
|
|
3507
|
+
balance.value >= amounts.value[state.selected].paymentAmount ? (openBlock(), createElementBlock("div", {
|
|
3508
|
+
key: 0,
|
|
4040
3509
|
class: "right",
|
|
4041
3510
|
onClick: _cache[0] || (_cache[0] = ($event) => selectBean.value = !selectBean.value)
|
|
4042
3511
|
}, [
|
|
4043
3512
|
createElementVNode(
|
|
4044
3513
|
"div",
|
|
4045
3514
|
_hoisted_7$6,
|
|
4046
|
-
"
|
|
3515
|
+
"-" + toDisplayString(unref(formatAmount)(amounts.value[state.selected].paymentAmount || 0)),
|
|
4047
3516
|
1
|
|
4048
3517
|
/* TEXT */
|
|
4049
3518
|
),
|
|
@@ -4051,20 +3520,12 @@ var script$A = /* @__PURE__ */ defineComponent({
|
|
|
4051
3520
|
class: "icon",
|
|
4052
3521
|
src: selectBean.value ? "https://cdn.ddjf.com/static/images/appkit/select.svg" : "https://cdn.ddjf.com/static/images/appkit/not-select.svg"
|
|
4053
3522
|
}, null, 8, _hoisted_8$5)
|
|
4054
|
-
]),
|
|
4055
|
-
isCombinedPayment.value ? (openBlock(), createElementBlock(
|
|
4056
|
-
"div",
|
|
4057
|
-
_hoisted_9$4,
|
|
4058
|
-
" \u4E91\u8C46\u4F59\u989D\u4E0D\u8DB3,\u8FD8\u9700\u989D\u5916\u652F\u4ED8" + toDisplayString(unref(formatAmount)(extraPaymentAmount.value)) + "\u5143 ",
|
|
4059
|
-
1
|
|
4060
|
-
/* TEXT */
|
|
4061
|
-
)) : createCommentVNode("v-if", true)
|
|
3523
|
+
])) : createCommentVNode("v-if", true)
|
|
4062
3524
|
])) : createCommentVNode("v-if", true),
|
|
4063
|
-
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),
|
|
4064
3525
|
renderSlot(_ctx.$slots, "banner")
|
|
4065
3526
|
]),
|
|
4066
|
-
createElementVNode("view",
|
|
4067
|
-
!selectBean.value
|
|
3527
|
+
createElementVNode("view", _hoisted_9$4, [
|
|
3528
|
+
!selectBean.value ? (openBlock(), createElementBlock("view", _hoisted_10$3, [
|
|
4068
3529
|
createVNode(_component_nut_checkbox, {
|
|
4069
3530
|
modelValue: state.agreed,
|
|
4070
3531
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => state.agreed = $event)
|
|
@@ -4092,14 +3553,14 @@ var script$A = /* @__PURE__ */ defineComponent({
|
|
|
4092
3553
|
/* STABLE */
|
|
4093
3554
|
}, 8, ["modelValue"])
|
|
4094
3555
|
])) : createCommentVNode("v-if", true),
|
|
4095
|
-
createElementVNode("div",
|
|
4096
|
-
createElementVNode("div",
|
|
3556
|
+
createElementVNode("div", _hoisted_11$3, [
|
|
3557
|
+
createElementVNode("div", _hoisted_12$3, [
|
|
4097
3558
|
_cache[8] || (_cache[8] = createTextVNode(
|
|
4098
3559
|
" \u5F85\u652F\u4ED8\uFF1A ",
|
|
4099
3560
|
-1
|
|
4100
3561
|
/* CACHED */
|
|
4101
3562
|
)),
|
|
4102
|
-
createElementVNode("span",
|
|
3563
|
+
createElementVNode("span", _hoisted_13$2, [
|
|
4103
3564
|
_cache[7] || (_cache[7] = createElementVNode(
|
|
4104
3565
|
"i",
|
|
4105
3566
|
null,
|
|
@@ -4150,22 +3611,22 @@ var script$A = /* @__PURE__ */ defineComponent({
|
|
|
4150
3611
|
[
|
|
4151
3612
|
createElementVNode(
|
|
4152
3613
|
"div",
|
|
4153
|
-
|
|
4154
|
-
"
|
|
3614
|
+
_hoisted_14$2,
|
|
3615
|
+
"\u4E91\u8C46\u6263\u51CF\uFF1A" + toDisplayString(unref(formatAmount)(amounts.value[state.selected].paymentAmount || 0)),
|
|
4155
3616
|
1
|
|
4156
3617
|
/* TEXT */
|
|
4157
3618
|
),
|
|
4158
3619
|
createElementVNode(
|
|
4159
3620
|
"div",
|
|
4160
|
-
|
|
4161
|
-
"
|
|
3621
|
+
_hoisted_15$2,
|
|
3622
|
+
"\u6743\u76CA\u589E\u52A0\uFF1A" + toDisplayString(unref(formatAmount)(amounts.value[state.selected].priceRightNum || 0)) + "\u7B14",
|
|
4162
3623
|
1
|
|
4163
3624
|
/* TEXT */
|
|
4164
3625
|
),
|
|
4165
3626
|
createElementVNode(
|
|
4166
3627
|
"div",
|
|
4167
|
-
|
|
4168
|
-
"
|
|
3628
|
+
_hoisted_16$2,
|
|
3629
|
+
"\u6263\u51CF\u540E\u4E91\u8C46\u4F59\u989D\uFF1A" + toDisplayString(unref(formatAmount)(balance.value - amounts.value[state.selected].paymentAmount)),
|
|
4169
3630
|
1
|
|
4170
3631
|
/* TEXT */
|
|
4171
3632
|
)
|
|
@@ -4185,7 +3646,7 @@ var script$A = /* @__PURE__ */ defineComponent({
|
|
|
4185
3646
|
script$A.__file = "src/payment/components/TradeView.vue";
|
|
4186
3647
|
|
|
4187
3648
|
const components = {
|
|
4188
|
-
AmountPicker: script$
|
|
3649
|
+
AmountPicker: script$M,
|
|
4189
3650
|
RechargeView: script$E,
|
|
4190
3651
|
UserAgreement: script$D,
|
|
4191
3652
|
RechargeResult: script$C,
|
|
@@ -4296,7 +3757,7 @@ var script$z = /* @__PURE__ */ defineComponent({
|
|
|
4296
3757
|
])
|
|
4297
3758
|
])
|
|
4298
3759
|
]),
|
|
4299
|
-
createCommentVNode(' <div class="line"></div>\n <div class="card-row">\n <div class="card-row-left desc">\u6743\u76CA\u4F7F\u7528\u65F6\u81EA\u52A8\u6263\u51CF\u4E91\u8C46</div>\n <div class="card-row-right">\n <div class="pay" v-track-click @click="gotoRecharge">\n <div>\u5145\u503C</div>\n <img\n class="pay-icon"\n src="https://cdn.ddjf.com/static/images/bpms-workBench/bean-right.png"\n />\n </div>\n </div>\n </div> ')
|
|
3760
|
+
createCommentVNode(' <div class="line"></div>\r\n <div class="card-row">\r\n <div class="card-row-left desc">\u6743\u76CA\u4F7F\u7528\u65F6\u81EA\u52A8\u6263\u51CF\u4E91\u8C46</div>\r\n <div class="card-row-right">\r\n <div class="pay" v-track-click @click="gotoRecharge">\r\n <div>\u5145\u503C</div>\r\n <img\r\n class="pay-icon"\r\n src="https://cdn.ddjf.com/static/images/bpms-workBench/bean-right.png"\r\n />\r\n </div>\r\n </div>\r\n </div> ')
|
|
4300
3761
|
])
|
|
4301
3762
|
]);
|
|
4302
3763
|
};
|
|
@@ -5003,7 +4464,7 @@ var script$t = /* @__PURE__ */ defineComponent({
|
|
|
5003
4464
|
[
|
|
5004
4465
|
createElementVNode("div", _hoisted_1$q, [
|
|
5005
4466
|
createElementVNode("div", _hoisted_2$k, [
|
|
5006
|
-
createVNode(unref(script$
|
|
4467
|
+
createVNode(unref(script$L), {
|
|
5007
4468
|
title: unref(Taro).getEnv() !== "WEB" ? "\u6211\u7684\u8D26\u6237" : "",
|
|
5008
4469
|
class: normalizeClass({ "with-background": scrolled.value > 0 }),
|
|
5009
4470
|
onClose: onPageHeaderClose
|
|
@@ -5308,7 +4769,7 @@ var script$t = /* @__PURE__ */ defineComponent({
|
|
|
5308
4769
|
_: 1
|
|
5309
4770
|
/* STABLE */
|
|
5310
4771
|
}, 8, ["visible"]),
|
|
5311
|
-
createVNode(unref(script$
|
|
4772
|
+
createVNode(unref(script$K), {
|
|
5312
4773
|
modelValue: secondBalanceOpen.value,
|
|
5313
4774
|
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => secondBalanceOpen.value = $event),
|
|
5314
4775
|
title: "\u6536\u652F\u660E\u7EC6"
|
|
@@ -5995,7 +5456,6 @@ var script$o = /* @__PURE__ */ defineComponent({
|
|
|
5995
5456
|
showModal({
|
|
5996
5457
|
content: toastMap[type],
|
|
5997
5458
|
showCancel: false,
|
|
5998
|
-
confirmColor: "#017fff",
|
|
5999
5459
|
confirmText: "\u77E5\u9053\u4E86"
|
|
6000
5460
|
});
|
|
6001
5461
|
}
|
|
@@ -6678,10 +6138,7 @@ var script$k = /* @__PURE__ */ defineComponent({
|
|
|
6678
6138
|
), [
|
|
6679
6139
|
[vModelText, formState.name]
|
|
6680
6140
|
]),
|
|
6681
|
-
createVNode(script$
|
|
6682
|
-
"has-upload-vo": false,
|
|
6683
|
-
onComplete: onOCRInfo
|
|
6684
|
-
}, {
|
|
6141
|
+
createVNode(script$G, { onComplete: onOCRInfo }, {
|
|
6685
6142
|
icon: withCtx(() => [..._cache[9] || (_cache[9] = [
|
|
6686
6143
|
createElementVNode(
|
|
6687
6144
|
"img",
|
|
@@ -7127,7 +6584,7 @@ var script$i = /* @__PURE__ */ defineComponent({
|
|
|
7127
6584
|
emits: ["detail", "close", "view", "popup", "hasBanner"],
|
|
7128
6585
|
setup(__props, { emit: __emit }) {
|
|
7129
6586
|
const props = __props;
|
|
7130
|
-
const {
|
|
6587
|
+
const { noticeClick } = useNotice();
|
|
7131
6588
|
const bannerMessages = ref([]);
|
|
7132
6589
|
const popMessages = ref([]);
|
|
7133
6590
|
const activeKey = ref(0);
|
|
@@ -7252,7 +6709,7 @@ var script$i = /* @__PURE__ */ defineComponent({
|
|
|
7252
6709
|
Fragment,
|
|
7253
6710
|
null,
|
|
7254
6711
|
renderList(bannerMessages.value, (item, key) => {
|
|
7255
|
-
return withDirectives((openBlock(), createBlock(script$
|
|
6712
|
+
return withDirectives((openBlock(), createBlock(script$I, {
|
|
7256
6713
|
class: normalizeClass({ show: key === activeKey.value }),
|
|
7257
6714
|
key,
|
|
7258
6715
|
showClose: item.noticeType === 0,
|
|
@@ -7523,8 +6980,7 @@ function useCommonList(api, query, loading = true, method = "GET") {
|
|
|
7523
6980
|
const isLoading = ref(false);
|
|
7524
6981
|
async function fetchData(loading2) {
|
|
7525
6982
|
loading2 && showLoading({
|
|
7526
|
-
title: "\u52A0\u8F7D\u4E2D..."
|
|
7527
|
-
mask: true
|
|
6983
|
+
title: "\u52A0\u8F7D\u4E2D..."
|
|
7528
6984
|
});
|
|
7529
6985
|
isLoading.value = true;
|
|
7530
6986
|
const $http = useHttp$1();
|
|
@@ -7926,8 +7382,7 @@ var script$e = /* @__PURE__ */ defineComponent({
|
|
|
7926
7382
|
async function readAll() {
|
|
7927
7383
|
try {
|
|
7928
7384
|
showLoading({
|
|
7929
|
-
title: "\u8BF7\u7A0D\u540E..."
|
|
7930
|
-
mask: true
|
|
7385
|
+
title: "\u8BF7\u7A0D\u540E..."
|
|
7931
7386
|
});
|
|
7932
7387
|
const appkitOptions = useAppKitOptions();
|
|
7933
7388
|
const ep = endpoints["\u5168\u90E8\u5DF2\u8BFB"];
|
|
@@ -7942,7 +7397,9 @@ var script$e = /* @__PURE__ */ defineComponent({
|
|
|
7942
7397
|
});
|
|
7943
7398
|
});
|
|
7944
7399
|
} finally {
|
|
7945
|
-
|
|
7400
|
+
setTimeout(() => {
|
|
7401
|
+
getNotice();
|
|
7402
|
+
}, 300);
|
|
7946
7403
|
hideLoading();
|
|
7947
7404
|
}
|
|
7948
7405
|
}
|
|
@@ -7975,7 +7432,7 @@ var script$e = /* @__PURE__ */ defineComponent({
|
|
|
7975
7432
|
class: normalizeClass(["tabContainer", { inH5: unref(isWeb)() }])
|
|
7976
7433
|
},
|
|
7977
7434
|
[
|
|
7978
|
-
createCommentVNode(' <ns-tabs\n v-model="state.tab"\n fill="#fff"\n square\n size="xl"\n style="height: 46px"\n @change="onTabChange"\n >\n <ns-tabs-item key="\u5168\u90E8" tab="\u5168\u90E8"></ns-tabs-item>\n <ns-tabs-item key="\u4E1A\u52A1\u6D88\u606F" tab="\u4E1A\u52A1\u6D88\u606F"></ns-tabs-item>\n <ns-tabs-item key="\u7CFB\u7EDF\u516C\u544A" tab="\u7CFB\u7EDF\u516C\u544A"></ns-tabs-item>\n <ns-tabs-item key="\u672A\u8BFB" tab="\u672A\u8BFB"></ns-tabs-item>\n </ns-tabs> '),
|
|
7435
|
+
createCommentVNode(' <ns-tabs\r\n v-model="state.tab"\r\n fill="#fff"\r\n square\r\n size="xl"\r\n style="height: 46px"\r\n @change="onTabChange"\r\n >\r\n <ns-tabs-item key="\u5168\u90E8" tab="\u5168\u90E8"></ns-tabs-item>\r\n <ns-tabs-item key="\u4E1A\u52A1\u6D88\u606F" tab="\u4E1A\u52A1\u6D88\u606F"></ns-tabs-item>\r\n <ns-tabs-item key="\u7CFB\u7EDF\u516C\u544A" tab="\u7CFB\u7EDF\u516C\u544A"></ns-tabs-item>\r\n <ns-tabs-item key="\u672A\u8BFB" tab="\u672A\u8BFB"></ns-tabs-item>\r\n </ns-tabs> '),
|
|
7979
7436
|
createVNode(unref(NsTabs), {
|
|
7980
7437
|
modelValue: state.tab,
|
|
7981
7438
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => state.tab = $event),
|
|
@@ -8561,8 +8018,7 @@ var script$b = /* @__PURE__ */ defineComponent({
|
|
|
8561
8018
|
}
|
|
8562
8019
|
async function updateImage(filePath) {
|
|
8563
8020
|
showLoading({
|
|
8564
|
-
title: "\u4E0A\u4F20\u4E2D..."
|
|
8565
|
-
mask: true
|
|
8021
|
+
title: "\u4E0A\u4F20\u4E2D..."
|
|
8566
8022
|
});
|
|
8567
8023
|
const appkitOptions = useAppKitOptions();
|
|
8568
8024
|
const $http = useHttp();
|
|
@@ -8675,7 +8131,6 @@ var script$b = /* @__PURE__ */ defineComponent({
|
|
|
8675
8131
|
title: "\u63D0\u793A",
|
|
8676
8132
|
content: "\u786E\u5B9A\u8981\u9000\u51FA\u767B\u5F55\u5417\uFF1F",
|
|
8677
8133
|
confirmText: "\u786E\u5B9A",
|
|
8678
|
-
confirmColor: "#017fff",
|
|
8679
8134
|
success: async (e) => {
|
|
8680
8135
|
if (e.confirm) {
|
|
8681
8136
|
emits("logout");
|
|
@@ -10539,8 +9994,7 @@ var script$6 = /* @__PURE__ */ defineComponent({
|
|
|
10539
9994
|
const $http = useHttp();
|
|
10540
9995
|
const appkitOptions = useAppKitOptions();
|
|
10541
9996
|
showLoading({
|
|
10542
|
-
title: "\u53CD\u9988\u4E2D..."
|
|
10543
|
-
mask: true
|
|
9997
|
+
title: "\u53CD\u9988\u4E2D..."
|
|
10544
9998
|
});
|
|
10545
9999
|
const attachment = JSON.parse(
|
|
10546
10000
|
JSON.stringify(
|
|
@@ -11250,9 +10704,8 @@ var script$2 = /* @__PURE__ */ defineComponent({
|
|
|
11250
10704
|
rules: ["required"]
|
|
11251
10705
|
}, {
|
|
11252
10706
|
append: withCtx(() => [
|
|
11253
|
-
!\u5DF2\u8BA4\u8BC1.value ? (openBlock(), createBlock(unref(script$
|
|
10707
|
+
!\u5DF2\u8BA4\u8BC1.value ? (openBlock(), createBlock(unref(script$G), {
|
|
11254
10708
|
key: 0,
|
|
11255
|
-
"has-upload-vo": false,
|
|
11256
10709
|
onComplete: onOcrComplete
|
|
11257
10710
|
})) : createCommentVNode("v-if", true)
|
|
11258
10711
|
]),
|
|
@@ -11861,4 +11314,4 @@ const AppKit = {
|
|
|
11861
11314
|
}
|
|
11862
11315
|
};
|
|
11863
11316
|
|
|
11864
|
-
export { script$t as AccountView, script$
|
|
11317
|
+
export { script$t as AccountView, script$M as AmountPicker, script$K as AppDrawer, script$J as AppVerify, script$z as BalanceCard, script$s as BalanceReminder, script$r as DateRange, script$H as DeviceVersion, script$p as ListFilter, script$4 as LoginSetting, script$i as NoticeBanner, script$h as NoticeEntry, script$f as NoticeList, script$e as NoticeList2, script$F as OcrBusinessLicense, script$G as OcrIcon, script$L as PageHeader, script$o as PromoterCard, script$C as RechargeResult, script$E as RechargeView, script$k as SelfRegistration, script as SharePoster, script$A as TradeView, script$D as UserAgreement, script$2 as UserAuth, script$a as UserBinding, script$9 as UserBindingSuccess, script$d as UserEntry, script$6 as UserFeedback, script$5 as UserFeedbackEntry, script$7 as UserHeadCrop, script$b as UserInfo, script$3 as UserResourceEmpty, components, createHttp, AppKit as default, defaultCryptoConfig, generateUniqueId, getSdkConfig, initTracking, installTrackingPlugin, jssdkServices, requestPayment$2 as requestPayment, requestWxH5Pay, services$1 as services, trackingSDK, useAppKit, useCountdown, useCrypto, useEncode, useLogger, usePageTracking, useSafeArea, useTabbar, useUpload, useValidator, useWxAuth };
|