web-core-tcm 0.0.24 → 0.0.26
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/favicon.ico +0 -0
- package/dist/icons/favicon-128x128.png +0 -0
- package/dist/icons/favicon-16x16.png +0 -0
- package/dist/icons/favicon-32x32.png +0 -0
- package/dist/icons/favicon-96x96.png +0 -0
- package/dist/node_modules/@alova/shared/dist/alova-shared.esm.js +134 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/boot.js +70 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.js +14 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/message.js +6 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/restore-json-names.js +10 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/create.js +136 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/descriptors.js +7 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/from-binary.js +164 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/is-message.js +6 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/proto-int64.js +75 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/error.js +8 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/guard.js +35 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/names.js +42 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/nested-types.js +17 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-check.js +156 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.js +349 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/scalar.js +39 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/unsafe.js +72 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/registry.js +551 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/to-binary.js +159 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wire/base64-encoding.js +58 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.js +350 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.js +25 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wire/text-format.js +145 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wire/varint.js +110 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/descriptor_pb.js +107 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/wrappers.js +24 -0
- package/dist/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js +556 -0
- package/dist/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js +36 -0
- package/dist/node_modules/@vue/shared/dist/shared.esm-bundler.js +26 -0
- package/dist/node_modules/alova/dist/adapter/fetch.esm.js +55 -0
- package/dist/node_modules/alova/dist/alova.esm.js +414 -0
- package/dist/node_modules/alova/dist/clienthook/index.esm.js +89 -0
- package/dist/node_modules/builder-pattern/dist/index.js +22 -0
- package/dist/node_modules/jwt-decode/build/esm/index.js +52 -0
- package/dist/node_modules/pinyin/lib/esm/pinyin.js +242260 -0
- package/dist/node_modules/punycode/punycode.es6.js +139 -0
- package/dist/node_modules/quasar/src/composables/use-quasar/use-quasar.js +8 -0
- package/dist/node_modules/quasar/src/utils/private.symbols/symbols.js +4 -0
- package/dist/src/api/algorithm/comprehensiveAlgorithm.d.ts +4 -0
- package/dist/src/api/algorithm/comprehensiveAlgorithm.js +16 -0
- package/dist/src/api/algorithm/index.d.ts +10 -0
- package/dist/src/api/algorithm/index.js +62 -0
- package/dist/src/api/algorithm/inquiriesAlgorithm.d.ts +13 -0
- package/dist/src/api/algorithm/inquiriesAlgorithm.js +9 -0
- package/dist/src/api/algorithm/inspectionsAlgorithm.d.ts +2 -0
- package/dist/src/api/algorithm/inspectionsAlgorithm.js +10 -0
- package/dist/src/api/algorithm/lisemsAlgorithm.d.ts +2 -0
- package/dist/src/api/algorithm/lisemsAlgorithm.js +15 -0
- package/dist/src/api/algorithm/pulsationsAlgorithm.d.ts +4 -0
- package/dist/src/api/algorithm/pulsationsAlgorithm.js +8 -0
- package/dist/src/api/authorization/alova/apiDefinitions.d.ts +21 -0
- package/dist/src/api/authorization/alova/apiDefinitions.js +9 -0
- package/dist/src/api/authorization/alova/createApis.d.ts +10 -0
- package/dist/src/api/authorization/alova/createApis.js +51 -0
- package/dist/src/api/authorization/alova/implement/authorization.d.ts +4 -0
- package/dist/src/api/authorization/alova/implement/authorization.js +15 -0
- package/dist/src/api/authorization/alova/implement/index.d.ts +1 -0
- package/dist/src/api/authorization/alova/index.d.ts +5 -0
- package/dist/src/api/authorization/alova/index.js +18 -0
- package/dist/src/api/authorization/authorization.d.ts +8 -0
- package/dist/src/api/authorization/authorization.js +16 -0
- package/dist/src/api/authorization/index.d.ts +2 -0
- package/dist/src/api/authorization/index.js +9 -0
- package/dist/src/api/check/alova/apiDefinitions.d.ts +28 -0
- package/dist/src/api/check/alova/apiDefinitions.js +16 -0
- package/dist/src/api/check/alova/createApis.d.ts +10 -0
- package/dist/src/api/check/alova/createApis.js +51 -0
- package/dist/src/api/check/alova/implement/check.d.ts +27 -0
- package/dist/src/api/check/alova/implement/check.js +119 -0
- package/dist/src/api/check/alova/implement/index.d.ts +1 -0
- package/dist/src/api/check/alova/index.d.ts +5 -0
- package/dist/src/api/check/alova/index.js +21 -0
- package/dist/src/api/check/check.d.ts +54 -0
- package/dist/src/api/check/check.js +131 -0
- package/dist/src/api/check/index.d.ts +2 -0
- package/dist/src/api/check/index.js +11 -0
- package/dist/src/api/config/alova/index.d.ts +5 -0
- package/dist/src/api/config/alova/index.js +55 -0
- package/dist/src/api/config/index.d.ts +23 -0
- package/dist/src/api/config/index.js +106 -0
- package/dist/src/api/device/device.d.ts +5 -0
- package/dist/src/api/device/device.js +46 -0
- package/dist/src/api/doctor/alova/apiDefinitions.d.ts +26 -0
- package/dist/src/api/doctor/alova/apiDefinitions.js +14 -0
- package/dist/src/api/doctor/alova/createApis.d.ts +10 -0
- package/dist/src/api/doctor/alova/createApis.js +51 -0
- package/dist/src/api/doctor/alova/implement/doctor.d.ts +7 -0
- package/dist/src/api/doctor/alova/implement/doctor.js +42 -0
- package/dist/src/api/doctor/alova/implement/index.d.ts +1 -0
- package/dist/src/api/doctor/alova/index.d.ts +5 -0
- package/dist/src/api/doctor/alova/index.js +20 -0
- package/dist/src/api/doctor/doctor.d.ts +22 -0
- package/dist/src/api/doctor/doctor.js +29 -0
- package/dist/src/api/doctor/index.d.ts +2 -0
- package/dist/src/api/doctor/index.js +9 -0
- package/dist/src/api/index.d.ts +12 -0
- package/dist/src/api/metric/implement/index.d.ts +1 -0
- package/dist/src/api/metric/implement/metric.d.ts +24 -0
- package/dist/src/api/metric/implement/metric.js +80 -0
- package/dist/src/api/metric/index.d.ts +2 -0
- package/dist/src/api/metric/index.js +6 -0
- package/dist/src/api/metric/metric.d.ts +28 -0
- package/dist/src/api/metric/metric.js +75 -0
- package/dist/src/api/oauth/alova/apiDefinitions.d.ts +24 -0
- package/dist/src/api/oauth/alova/apiDefinitions.js +12 -0
- package/dist/src/api/oauth/alova/createApis.d.ts +10 -0
- package/dist/src/api/oauth/alova/createApis.js +51 -0
- package/dist/src/api/oauth/alova/implement/index.d.ts +1 -0
- package/dist/src/api/oauth/alova/implement/oauth.d.ts +4 -0
- package/dist/src/api/oauth/alova/implement/oauth.js +15 -0
- package/dist/src/api/oauth/alova/index.d.ts +5 -0
- package/dist/src/api/oauth/alova/index.js +17 -0
- package/dist/src/api/oauth/index.d.ts +2 -0
- package/dist/src/api/oauth/index.js +9 -0
- package/dist/src/api/oauth/oauth.d.ts +7 -0
- package/dist/src/api/oauth/oauth.js +16 -0
- package/dist/src/api/outpatient/alova/apiDefinitions.d.ts +25 -0
- package/dist/src/api/outpatient/alova/apiDefinitions.js +13 -0
- package/dist/src/api/outpatient/alova/createApis.d.ts +10 -0
- package/dist/src/api/outpatient/alova/createApis.js +51 -0
- package/dist/src/api/outpatient/alova/implement/index.d.ts +1 -0
- package/dist/src/api/outpatient/alova/implement/outpatient.d.ts +10 -0
- package/dist/src/api/outpatient/alova/implement/outpatient.js +71 -0
- package/dist/src/api/outpatient/alova/index.d.ts +5 -0
- package/dist/src/api/outpatient/alova/index.js +21 -0
- package/dist/src/api/outpatient/index.d.ts +2 -0
- package/dist/src/api/outpatient/index.js +11 -0
- package/dist/src/api/outpatient/outpatient.d.ts +39 -0
- package/dist/src/api/outpatient/outpatient.js +45 -0
- package/dist/src/api/patient/alova/apiDefinitions.d.ts +39 -0
- package/dist/src/api/patient/alova/apiDefinitions.js +27 -0
- package/dist/src/api/patient/alova/createApis.d.ts +10 -0
- package/dist/src/api/patient/alova/createApis.js +51 -0
- package/dist/src/api/patient/alova/implement/index.d.ts +2 -0
- package/dist/src/api/patient/alova/implement/meta.d.ts +113 -0
- package/dist/src/api/patient/alova/implement/meta.js +404 -0
- package/dist/src/api/patient/alova/implement/patient.d.ts +22 -0
- package/dist/src/api/patient/alova/implement/patient.js +72 -0
- package/dist/src/api/patient/alova/index.d.ts +5 -0
- package/dist/src/api/patient/alova/index.js +22 -0
- package/dist/src/api/patient/core.d.ts +50 -0
- package/dist/src/api/patient/core.js +109 -0
- package/dist/src/api/patient/index.d.ts +4 -0
- package/dist/src/api/patient/index.js +46 -0
- package/dist/src/api/patient/meta.d.ts +238 -0
- package/dist/src/api/patient/meta.js +454 -0
- package/dist/src/api/patient/patient.d.ts +43 -0
- package/dist/src/api/patient/patient.js +42 -0
- package/dist/src/api/prescription/alova/apiDefinitions.d.ts +27 -0
- package/dist/src/api/prescription/alova/apiDefinitions.js +15 -0
- package/dist/src/api/prescription/alova/createApis.d.ts +10 -0
- package/dist/src/api/prescription/alova/createApis.js +51 -0
- package/dist/src/api/prescription/alova/implement/herbal.d.ts +15 -0
- package/dist/src/api/prescription/alova/implement/herbal.js +54 -0
- package/dist/src/api/prescription/alova/implement/index.d.ts +2 -0
- package/dist/src/api/prescription/alova/implement/prescription.d.ts +15 -0
- package/dist/src/api/prescription/alova/implement/prescription.js +49 -0
- package/dist/src/api/prescription/alova/index.d.ts +5 -0
- package/dist/src/api/prescription/alova/index.js +20 -0
- package/dist/src/api/prescription/herbal.d.ts +19 -0
- package/dist/src/api/prescription/herbal.js +34 -0
- package/dist/src/api/prescription/index.d.ts +3 -0
- package/dist/src/api/prescription/index.js +13 -0
- package/dist/src/api/prescription/prescription.d.ts +26 -0
- package/dist/src/api/prescription/prescription.js +49 -0
- package/dist/src/api/scientist/alova/apiDefinitions.d.ts +25 -0
- package/dist/src/api/scientist/alova/apiDefinitions.js +13 -0
- package/dist/src/api/scientist/alova/createApis.d.ts +10 -0
- package/dist/src/api/scientist/alova/createApis.js +51 -0
- package/dist/src/api/scientist/alova/implement/index.d.ts +1 -0
- package/dist/src/api/scientist/alova/implement/scientist.d.ts +6 -0
- package/dist/src/api/scientist/alova/implement/scientist.js +35 -0
- package/dist/src/api/scientist/alova/index.d.ts +6 -0
- package/dist/src/api/scientist/alova/index.js +21 -0
- package/dist/src/api/scientist/index.d.ts +2 -0
- package/dist/src/api/scientist/index.js +9 -0
- package/dist/src/api/scientist/scientist.d.ts +20 -0
- package/dist/src/api/scientist/scientist.js +37 -0
- package/dist/src/components/models.d.ts +7 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.js +36 -0
- package/dist/src/pages/LoginPage.vue.d.ts +2 -0
- package/dist/src/proto/index.d.ts +2 -0
- package/dist/src/proto/types/Images_pb.d.ts +34 -0
- package/dist/src/proto/types/Images_pb.js +10 -0
- package/dist/src/proto/types/WaveMap_pb.d.ts +48 -0
- package/dist/src/proto/types/WaveMap_pb.js +10 -0
- package/dist/src/router/index.d.ts +2 -0
- package/dist/src/router/routes.d.ts +3 -0
- package/dist/src/util/RichTextUtil.d.ts +1 -0
- package/dist/src/util/RichTextUtil.js +6 -0
- package/dist/src/util/datetime.d.ts +5 -0
- package/dist/src/util/export.d.ts +4 -0
- package/dist/src/util/helper.d.ts +65 -0
- package/dist/src/util/helper.js +46 -0
- package/dist/src/util/image.d.ts +2 -0
- package/dist/src/util/image.js +17 -0
- package/dist/src/util/number.d.ts +12 -0
- package/dist/src/util/s256.d.ts +2 -0
- package/dist/src/util/secret.d.ts +10 -0
- package/dist/src/util/string.d.ts +21 -0
- package/dist/src/util/string.js +10 -0
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { fileDesc as o } from "../../../node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.js";
|
|
2
|
+
import { messageDesc as e } from "../../../node_modules/@bufbuild/protobuf/dist/esm/codegenv2/message.js";
|
|
3
|
+
const m = /* @__PURE__ */ o(
|
|
4
|
+
"CgxJbWFnZXMucHJvdG8iFgoFSW1hZ2USDQoFYnl0ZXMYASABKAwiIAoGSW1hZ2VzEhYKBmltYWdlcxgBIAMoCzIGLkltYWdlYgZwcm90bzM"
|
|
5
|
+
), g = /* @__PURE__ */ e(m, 0), t = /* @__PURE__ */ e(m, 1);
|
|
6
|
+
export {
|
|
7
|
+
g as ImageSchema,
|
|
8
|
+
t as ImagesSchema,
|
|
9
|
+
m as file_Images
|
|
10
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { GenFile, GenMessage } from '@bufbuild/protobuf/codegenv2';
|
|
2
|
+
import { Message } from '@bufbuild/protobuf';
|
|
3
|
+
/**
|
|
4
|
+
* Describes the file WaveMap.proto.
|
|
5
|
+
*/
|
|
6
|
+
export declare const file_WaveMap: GenFile;
|
|
7
|
+
/**
|
|
8
|
+
* @generated from message Wave
|
|
9
|
+
*/
|
|
10
|
+
export type Wave = Message<'Wave'> & {
|
|
11
|
+
/**
|
|
12
|
+
* 单个数组(对应 number[])
|
|
13
|
+
*
|
|
14
|
+
* @generated from field: repeated double values = 1;
|
|
15
|
+
*/
|
|
16
|
+
values: number[];
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Describes the message Wave.
|
|
20
|
+
* Use `create(WaveSchema)` to create a new message.
|
|
21
|
+
*/
|
|
22
|
+
export declare const WaveSchema: GenMessage<Wave>;
|
|
23
|
+
/**
|
|
24
|
+
* @generated from message WaveMap
|
|
25
|
+
*/
|
|
26
|
+
export type WaveMap = Message<'WaveMap'> & {
|
|
27
|
+
/**
|
|
28
|
+
* 对应 origin: {[key: string]: number[]}
|
|
29
|
+
*
|
|
30
|
+
* @generated from field: map<string, Wave> origin = 1;
|
|
31
|
+
*/
|
|
32
|
+
origin: {
|
|
33
|
+
[key: string]: Wave;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* 对应 smooth: {[key: string]: number[]}
|
|
37
|
+
*
|
|
38
|
+
* @generated from field: map<string, Wave> smooth = 2;
|
|
39
|
+
*/
|
|
40
|
+
smooth: {
|
|
41
|
+
[key: string]: Wave;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Describes the message WaveMap.
|
|
46
|
+
* Use `create(WaveMapSchema)` to create a new message.
|
|
47
|
+
*/
|
|
48
|
+
export declare const WaveMapSchema: GenMessage<WaveMap>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { fileDesc as d } from "../../../node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.js";
|
|
2
|
+
import { messageDesc as A } from "../../../node_modules/@bufbuild/protobuf/dist/esm/codegenv2/message.js";
|
|
3
|
+
const o = /* @__PURE__ */ d(
|
|
4
|
+
"Cg1XYXZlTWFwLnByb3RvIhYKBFdhdmUSDgoGdmFsdWVzGAEgAygBIsEBCgdXYXZlTWFwEiQKBm9yaWdpbhgBIAMoCzIULldhdmVNYXAuT3JpZ2luRW50cnkSJAoGc21vb3RoGAIgAygLMhQuV2F2ZU1hcC5TbW9vdGhFbnRyeRo0CgtPcmlnaW5FbnRyeRILCgNrZXkYASABKAkSFAoFdmFsdWUYAiABKAsyBS5XYXZlOgI4ARo0CgtTbW9vdGhFbnRyeRILCgNrZXkYASABKAkSFAoFdmFsdWUYAiABKAsyBS5XYXZlOgI4AWIGcHJvdG8z"
|
|
5
|
+
), m = /* @__PURE__ */ A(o, 0), F = /* @__PURE__ */ A(o, 1);
|
|
6
|
+
export {
|
|
7
|
+
F as WaveMapSchema,
|
|
8
|
+
m as WaveSchema,
|
|
9
|
+
o as file_WaveMap
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function extractPlainText(text: string): string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function getStartOfDay(daysAgo?: number): number;
|
|
2
|
+
export declare function getTimestamp(value: string): string;
|
|
3
|
+
export declare function getDateTimeStr(timestamp: string): string;
|
|
4
|
+
export declare function getDateStr(timestamp: string): string;
|
|
5
|
+
export declare function getTimeStr(timestamp: string): string;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/** 平台类型 */
|
|
2
|
+
type Platform = 'electron' | 'web';
|
|
3
|
+
/** 存储操作结果接口 */
|
|
4
|
+
interface StorageResult {
|
|
5
|
+
success: boolean;
|
|
6
|
+
error?: Error;
|
|
7
|
+
}
|
|
8
|
+
/** Token 操作助手对象 */
|
|
9
|
+
export declare const tokenHelper: {
|
|
10
|
+
/** 设置 token */
|
|
11
|
+
set: (val: string) => StorageResult;
|
|
12
|
+
/** 获取 token */
|
|
13
|
+
get: () => string | null;
|
|
14
|
+
/** 移除 token */
|
|
15
|
+
remove: () => StorageResult;
|
|
16
|
+
/** 检查是否存在 token */
|
|
17
|
+
exists: () => boolean;
|
|
18
|
+
};
|
|
19
|
+
/** 通用存储操作助手对象 */
|
|
20
|
+
export declare const storageHelper: {
|
|
21
|
+
/** 设置存储项 */
|
|
22
|
+
setItem: (key: string, val: string) => StorageResult;
|
|
23
|
+
/** 获取存储项 */
|
|
24
|
+
getItem: (key: string) => string | null;
|
|
25
|
+
/** 移除存储项 */
|
|
26
|
+
removeItem: (key: string) => StorageResult;
|
|
27
|
+
/** 清空所有存储 */
|
|
28
|
+
clear: () => StorageResult;
|
|
29
|
+
};
|
|
30
|
+
/** 获取当前平台类型 */
|
|
31
|
+
export declare const getPlatform: () => Platform;
|
|
32
|
+
declare global {
|
|
33
|
+
interface Window {
|
|
34
|
+
electronAPI?: {
|
|
35
|
+
available: () => boolean;
|
|
36
|
+
setStoreItem: (key: string, value: string) => void;
|
|
37
|
+
getStoreItem: (key: string) => string | null;
|
|
38
|
+
removeStoreItem: (key: string) => void;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
declare const _default: {
|
|
43
|
+
tokenHelper: {
|
|
44
|
+
/** 设置 token */
|
|
45
|
+
set: (val: string) => StorageResult;
|
|
46
|
+
/** 获取 token */
|
|
47
|
+
get: () => string | null;
|
|
48
|
+
/** 移除 token */
|
|
49
|
+
remove: () => StorageResult;
|
|
50
|
+
/** 检查是否存在 token */
|
|
51
|
+
exists: () => boolean;
|
|
52
|
+
};
|
|
53
|
+
storageHelper: {
|
|
54
|
+
/** 设置存储项 */
|
|
55
|
+
setItem: (key: string, val: string) => StorageResult;
|
|
56
|
+
/** 获取存储项 */
|
|
57
|
+
getItem: (key: string) => string | null;
|
|
58
|
+
/** 移除存储项 */
|
|
59
|
+
removeItem: (key: string) => StorageResult;
|
|
60
|
+
/** 清空所有存储 */
|
|
61
|
+
clear: () => StorageResult;
|
|
62
|
+
};
|
|
63
|
+
getPlatform: () => Platform;
|
|
64
|
+
};
|
|
65
|
+
export default _default;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const c = {
|
|
2
|
+
/** 设置存储项 */
|
|
3
|
+
setItem: (e, r) => {
|
|
4
|
+
try {
|
|
5
|
+
return t() === "electron" ? window.electronAPI.setStoreItem(e, r) : window.localStorage.setItem(e, r), { success: !0 };
|
|
6
|
+
} catch (o) {
|
|
7
|
+
return console.error(`设置存储项 ${e} 失败:`, o), { success: !1, error: o };
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
/** 获取存储项 */
|
|
11
|
+
getItem: (e) => {
|
|
12
|
+
try {
|
|
13
|
+
return t() === "electron" ? window.electronAPI.getStoreItem(e) : window.localStorage.getItem(e);
|
|
14
|
+
} catch (r) {
|
|
15
|
+
return console.error(`获取存储项 ${e} 失败:`, r), null;
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
/** 移除存储项 */
|
|
19
|
+
removeItem: (e) => {
|
|
20
|
+
try {
|
|
21
|
+
return t() === "electron" ? window.electronAPI.removeStoreItem(e) : window.localStorage.removeItem(e), { success: !0 };
|
|
22
|
+
} catch (r) {
|
|
23
|
+
return console.error(`移除存储项 ${e} 失败:`, r), { success: !1, error: r };
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
/** 清空所有存储 */
|
|
27
|
+
clear: () => {
|
|
28
|
+
try {
|
|
29
|
+
return t(), window.localStorage.clear(), { success: !0 };
|
|
30
|
+
} catch (e) {
|
|
31
|
+
return console.error("清空存储失败:", e), { success: !1, error: e };
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}, t = () => {
|
|
35
|
+
if (typeof window < "u" && window.electronAPI?.available)
|
|
36
|
+
try {
|
|
37
|
+
if (window.electronAPI.available())
|
|
38
|
+
return "electron";
|
|
39
|
+
} catch {
|
|
40
|
+
}
|
|
41
|
+
return "web";
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
t as getPlatform,
|
|
45
|
+
c as storageHelper
|
|
46
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
function i(r) {
|
|
2
|
+
let t = "";
|
|
3
|
+
const n = r.byteLength;
|
|
4
|
+
for (let e = 0; e < n; e++)
|
|
5
|
+
t += String.fromCharCode(r[e]);
|
|
6
|
+
return "data:image/png;base64," + window.btoa(t);
|
|
7
|
+
}
|
|
8
|
+
function s(r) {
|
|
9
|
+
const t = r.replace(/^data:\w+\/\w+;base64,/, ""), n = window.atob(t), e = n.length, o = new ArrayBuffer(e), f = new Uint8Array(o);
|
|
10
|
+
for (let a = 0; a < e; a++)
|
|
11
|
+
f[a] = n.charCodeAt(a);
|
|
12
|
+
return o;
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
i as arrayBufferToImageBase64,
|
|
16
|
+
s as base64ToArrayBuffer
|
|
17
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare function buf2hex(buffer: ArrayBuffer): any;
|
|
2
|
+
declare function hex2int(hex: string): any;
|
|
3
|
+
/**
|
|
4
|
+
* 将数组分割成指定长度的数组
|
|
5
|
+
* @param arr 数组
|
|
6
|
+
* @param size 分割长度
|
|
7
|
+
* @returns 分割后的数组
|
|
8
|
+
*/
|
|
9
|
+
declare function chunk(arr: number[], size: number): any[];
|
|
10
|
+
declare function stringToBytes(str: string): ArrayBuffer;
|
|
11
|
+
declare function numberToChinese(num: number | null): string;
|
|
12
|
+
export { buf2hex, hex2int, chunk, stringToBytes, numberToChinese };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 生成OAuth PKCE所需的code_verifier和code_challenge
|
|
3
|
+
* @param method code_challenge_method,目前只支持S256
|
|
4
|
+
* @returns 包含code_verifier和code_challenge的对象
|
|
5
|
+
*/
|
|
6
|
+
export declare function generatePKCECodes(method?: string): Promise<{
|
|
7
|
+
code_verifier: string;
|
|
8
|
+
code_challenge: string;
|
|
9
|
+
code_challenge_method: "S256";
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare function getName(name: string): string;
|
|
2
|
+
/**
|
|
3
|
+
* 通用拼音筛选函数
|
|
4
|
+
* @param val 搜索关键词
|
|
5
|
+
* @param options 选项数组
|
|
6
|
+
* @returns 筛选后的选项数组
|
|
7
|
+
*/
|
|
8
|
+
export declare function pinyinFilter(val: string, options: string[]): string[];
|
|
9
|
+
/**
|
|
10
|
+
* 通用拼音筛选函数(返回匹配项的索引)
|
|
11
|
+
* @param val 搜索关键词
|
|
12
|
+
* @param options 选项数组
|
|
13
|
+
* @returns 匹配项的索引数组
|
|
14
|
+
*/
|
|
15
|
+
export declare function pinyinFilterIndex(val: string, options: string[]): number[];
|
|
16
|
+
export declare function parseIdNumber(idNumber: string): {
|
|
17
|
+
birthDate: string;
|
|
18
|
+
gender: string;
|
|
19
|
+
age: number;
|
|
20
|
+
};
|
|
21
|
+
export declare function isNumber(value: string): boolean;
|