@zw-team/react-lib 1.0.1
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/README.md +207 -0
- package/dist/components/AccessReport/index.d.ts +29 -0
- package/dist/components/AccessReport/index.js +129 -0
- package/dist/components/Avatar/Avatar.d.ts +3 -0
- package/dist/components/Avatar/Avatar.js +58 -0
- package/dist/components/Avatar/index.d.ts +2 -0
- package/dist/components/Avatar/index.js +2 -0
- package/dist/components/Avatar/types.d.ts +9 -0
- package/dist/components/Avatar/types.js +0 -0
- package/dist/components/Block/Block.css +8 -0
- package/dist/components/Block/Block.d.ts +4 -0
- package/dist/components/Block/Block.js +11 -0
- package/dist/components/Block/index.d.ts +2 -0
- package/dist/components/Block/index.js +2 -0
- package/dist/components/Block/types.d.ts +3 -0
- package/dist/components/Block/types.js +0 -0
- package/dist/components/ConfigProvider/ConfigContext.d.ts +4 -0
- package/dist/components/ConfigProvider/ConfigContext.js +19 -0
- package/dist/components/ConfigProvider/ConfigProvider.d.ts +4 -0
- package/dist/components/ConfigProvider/ConfigProvider.js +57 -0
- package/dist/components/ConfigProvider/index.d.ts +2 -0
- package/dist/components/ConfigProvider/index.js +2 -0
- package/dist/components/ConfigProvider/types.d.ts +19 -0
- package/dist/components/ConfigProvider/types.js +0 -0
- package/dist/components/CustomColumn/CustomColumn.d.ts +4 -0
- package/dist/components/CustomColumn/CustomColumn.js +388 -0
- package/dist/components/CustomColumn/CustomColumn.scss +135 -0
- package/dist/components/CustomColumn/index.d.ts +2 -0
- package/dist/components/CustomColumn/index.js +2 -0
- package/dist/components/CustomColumn/types.d.ts +19 -0
- package/dist/components/CustomColumn/types.js +0 -0
- package/dist/components/DatePicker/DatePicker.d.ts +4 -0
- package/dist/components/DatePicker/DatePicker.js +89 -0
- package/dist/components/DatePicker/datePickerOption.d.ts +14 -0
- package/dist/components/DatePicker/datePickerOption.js +149 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/DatePicker/index.js +2 -0
- package/dist/components/DatePicker/types.d.ts +12 -0
- package/dist/components/DatePicker/types.js +0 -0
- package/dist/components/DatePickerPanel/DatePickerPanel.d.ts +6 -0
- package/dist/components/DatePickerPanel/DatePickerPanel.js +397 -0
- package/dist/components/DatePickerPanel/datePickerPanel.scss +362 -0
- package/dist/components/DatePickerPanel/index.d.ts +2 -0
- package/dist/components/DatePickerPanel/index.js +2 -0
- package/dist/components/DatePickerPanel/type.d.ts +23 -0
- package/dist/components/DatePickerPanel/type.js +0 -0
- package/dist/components/DownloadCenter/DownloadCenter.d.ts +5 -0
- package/dist/components/DownloadCenter/DownloadCenter.js +367 -0
- package/dist/components/DownloadCenter/index.css +54 -0
- package/dist/components/DownloadCenter/index.d.ts +2 -0
- package/dist/components/DownloadCenter/index.js +2 -0
- package/dist/components/DownloadCenter/types.d.ts +27 -0
- package/dist/components/DownloadCenter/types.js +0 -0
- package/dist/components/Fireworks/Fireworks.d.ts +11 -0
- package/dist/components/Fireworks/Fireworks.js +415 -0
- package/dist/components/Fireworks/imgs/birthday-cake.svg +180 -0
- package/dist/components/Fireworks/imgs/hb.png +0 -0
- package/dist/components/Fireworks/imgs/sd.png +0 -0
- package/dist/components/Fireworks/imgs/xc.png +0 -0
- package/dist/components/Fireworks/imgs/yd.png +0 -0
- package/dist/components/Fireworks/index.d.ts +2 -0
- package/dist/components/Fireworks/index.js +2 -0
- package/dist/components/Fireworks/index.scss +9 -0
- package/dist/components/Fireworks/types.d.ts +6 -0
- package/dist/components/Fireworks/types.js +0 -0
- package/dist/components/Form/Form.css +4 -0
- package/dist/components/Form/Form.d.ts +9 -0
- package/dist/components/Form/Form.js +18 -0
- package/dist/components/Form/index.d.ts +1 -0
- package/dist/components/Form/index.js +2 -0
- package/dist/components/FormItem/FormItem.css +38 -0
- package/dist/components/FormItem/FormItem.d.ts +9 -0
- package/dist/components/FormItem/FormItem.js +25 -0
- package/dist/components/FormItem/index.d.ts +1 -0
- package/dist/components/FormItem/index.js +2 -0
- package/dist/components/HomeData/HomeData.d.ts +6 -0
- package/dist/components/HomeData/HomeData.js +364 -0
- package/dist/components/HomeData/HomeData.scss +161 -0
- package/dist/components/HomeData/index.d.ts +1 -0
- package/dist/components/HomeData/index.js +2 -0
- package/dist/components/Icon/Icon.d.ts +4 -0
- package/dist/components/Icon/Icon.js +34 -0
- package/dist/components/Icon/index.d.ts +2 -0
- package/dist/components/Icon/index.js +2 -0
- package/dist/components/Icon/types.d.ts +8 -0
- package/dist/components/Icon/types.js +0 -0
- package/dist/components/Log/index.d.ts +2 -0
- package/dist/components/Log/index.js +2 -0
- package/dist/components/Log/src/Detail.d.ts +7 -0
- package/dist/components/Log/src/Detail.js +71 -0
- package/dist/components/Log/src/Detail.scss +27 -0
- package/dist/components/Log/src/Log.d.ts +5 -0
- package/dist/components/Log/src/Log.js +335 -0
- package/dist/components/Log/src/Log.scss +50 -0
- package/dist/components/Log/src/useLogTableColumns.d.ts +2 -0
- package/dist/components/Log/src/useLogTableColumns.js +141 -0
- package/dist/components/Log/types.d.ts +5 -0
- package/dist/components/Log/types.js +0 -0
- package/dist/components/LogButton/LogButton.d.ts +4 -0
- package/dist/components/LogButton/LogButton.js +30 -0
- package/dist/components/LogButton/index.d.ts +2 -0
- package/dist/components/LogButton/index.js +2 -0
- package/dist/components/LogButton/logbutton.css +15 -0
- package/dist/components/LogButton/types.d.ts +10 -0
- package/dist/components/LogButton/types.js +0 -0
- package/dist/components/LogDialog/BiLogManager.d.ts +29 -0
- package/dist/components/LogDialog/BiLogManager.js +78 -0
- package/dist/components/LogDialog/LogDialog.d.ts +8 -0
- package/dist/components/LogDialog/LogDialog.js +106 -0
- package/dist/components/LogDialog/LogDialog.scss +29 -0
- package/dist/components/LogDialog/index.d.ts +3 -0
- package/dist/components/LogDialog/index.js +3 -0
- package/dist/components/LogDialog/types.d.ts +8 -0
- package/dist/components/LogDialog/types.js +0 -0
- package/dist/components/MediaPreview/MediaPreview.d.ts +5 -0
- package/dist/components/MediaPreview/MediaPreview.js +124 -0
- package/dist/components/MediaPreview/hook.d.ts +26 -0
- package/dist/components/MediaPreview/hook.js +174 -0
- package/dist/components/MediaPreview/index.css +202 -0
- package/dist/components/MediaPreview/index.d.ts +2 -0
- package/dist/components/MediaPreview/index.js +2 -0
- package/dist/components/MediaPreview/types.d.ts +24 -0
- package/dist/components/MediaPreview/types.js +0 -0
- package/dist/components/Modal/Modal.d.ts +3 -0
- package/dist/components/Modal/Modal.js +31 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/Modal/index.js +2 -0
- package/dist/components/Modal/types.d.ts +8 -0
- package/dist/components/Modal/types.js +0 -0
- package/dist/components/ModalStore/ModalProvider.d.ts +11 -0
- package/dist/components/ModalStore/ModalProvider.js +15 -0
- package/dist/components/ModalStore/ModalStore.d.ts +78 -0
- package/dist/components/ModalStore/ModalStore.js +188 -0
- package/dist/components/ModalStore/index.d.ts +3 -0
- package/dist/components/ModalStore/index.js +4 -0
- package/dist/components/ModalStore/types.d.ts +73 -0
- package/dist/components/ModalStore/types.js +0 -0
- package/dist/components/MoreButton/MoreButton.d.ts +3 -0
- package/dist/components/MoreButton/MoreButton.js +50 -0
- package/dist/components/MoreButton/index.d.ts +2 -0
- package/dist/components/MoreButton/index.js +2 -0
- package/dist/components/MoreButton/types.d.ts +15 -0
- package/dist/components/MoreButton/types.js +0 -0
- package/dist/components/NavbarTool/NavbarTool.d.ts +5 -0
- package/dist/components/NavbarTool/NavbarTool.js +143 -0
- package/dist/components/NavbarTool/components/index.css +49 -0
- package/dist/components/NavbarTool/components/index.d.ts +5 -0
- package/dist/components/NavbarTool/components/index.js +98 -0
- package/dist/components/NavbarTool/index.css +14 -0
- package/dist/components/NavbarTool/index.d.ts +2 -0
- package/dist/components/NavbarTool/index.js +2 -0
- package/dist/components/NavbarTool/types.d.ts +40 -0
- package/dist/components/NavbarTool/types.js +0 -0
- package/dist/components/NoticeCenter/NoticeCenter.d.ts +4 -0
- package/dist/components/NoticeCenter/NoticeCenter.js +334 -0
- package/dist/components/NoticeCenter/assets/notice.png +0 -0
- package/dist/components/NoticeCenter/assets/tongzhi.png +0 -0
- package/dist/components/NoticeCenter/index.d.ts +2 -0
- package/dist/components/NoticeCenter/index.js +2 -0
- package/dist/components/NoticeCenter/noticeCenter.scss +232 -0
- package/dist/components/NoticeCenter/types.d.ts +6 -0
- package/dist/components/NoticeCenter/types.js +0 -0
- package/dist/components/Pagination/BiPagination.css +152 -0
- package/dist/components/Pagination/Pagination.d.ts +5 -0
- package/dist/components/Pagination/Pagination.js +67 -0
- package/dist/components/Pagination/index.d.ts +2 -0
- package/dist/components/Pagination/index.js +2 -0
- package/dist/components/Pagination/types.d.ts +14 -0
- package/dist/components/Pagination/types.js +0 -0
- package/dist/components/ResponseInterceptor/index.d.ts +17 -0
- package/dist/components/ResponseInterceptor/index.js +43 -0
- package/dist/components/SuperDate/SuperDate.d.ts +6 -0
- package/dist/components/SuperDate/SuperDate.js +113 -0
- package/dist/components/SuperDate/SuperDate.scss +42 -0
- package/dist/components/SuperDate/components/CustomRangPanel/CustomRangPanel.d.ts +5 -0
- package/dist/components/SuperDate/components/CustomRangPanel/CustomRangPanel.js +87 -0
- package/dist/components/SuperDate/components/CustomRangPanel/CustomRangPanel.scss +52 -0
- package/dist/components/SuperDate/components/DynamicTimeCom/DynamicTimeCom.d.ts +6 -0
- package/dist/components/SuperDate/components/DynamicTimeCom/DynamicTimeCom.js +129 -0
- package/dist/components/SuperDate/components/DynamicTimeCom/dynamicTimeCom.scss +70 -0
- package/dist/components/SuperDate/constant.d.ts +35 -0
- package/dist/components/SuperDate/constant.js +27 -0
- package/dist/components/SuperDate/index.d.ts +2 -0
- package/dist/components/SuperDate/index.js +2 -0
- package/dist/components/SuperDate/store.d.ts +68 -0
- package/dist/components/SuperDate/store.js +254 -0
- package/dist/components/SuperDate/types.d.ts +34 -0
- package/dist/components/SuperDate/types.js +0 -0
- package/dist/components/SuperDate/utils.d.ts +18 -0
- package/dist/components/SuperDate/utils.js +14 -0
- package/dist/components/SystemLink/SystemLink.d.ts +4 -0
- package/dist/components/SystemLink/SystemLink.js +85 -0
- package/dist/components/SystemLink/index.d.ts +1 -0
- package/dist/components/SystemLink/index.js +2 -0
- package/dist/components/SystemLink/index.scss +142 -0
- package/dist/components/Table/ResizableTitle.d.ts +3 -0
- package/dist/components/Table/ResizableTitle.js +43 -0
- package/dist/components/Table/Table.d.ts +9 -0
- package/dist/components/Table/Table.js +189 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/Table/index.js +2 -0
- package/dist/components/Table/index.scss +42 -0
- package/dist/components/Table/types.d.ts +24 -0
- package/dist/components/Table/types.js +0 -0
- package/dist/components/Table/useHeaderPopper.d.ts +8 -0
- package/dist/components/Table/useHeaderPopper.js +95 -0
- package/dist/components/TableHeaderPopper/EditBox.d.ts +6 -0
- package/dist/components/TableHeaderPopper/EditBox.js +208 -0
- package/dist/components/TableHeaderPopper/Popover.d.ts +6 -0
- package/dist/components/TableHeaderPopper/Popover.js +85 -0
- package/dist/components/TableHeaderPopper/index.d.ts +3 -0
- package/dist/components/TableHeaderPopper/index.js +3 -0
- package/dist/components/TableHeaderPopper/index.scss +96 -0
- package/dist/components/TaskCenter/TaskCenter.d.ts +4 -0
- package/dist/components/TaskCenter/TaskCenter.js +257 -0
- package/dist/components/TaskCenter/TaskCenter.scss +44 -0
- package/dist/components/TaskCenter/api.d.ts +13 -0
- package/dist/components/TaskCenter/api.js +13 -0
- package/dist/components/TaskCenter/index.d.ts +2 -0
- package/dist/components/TaskCenter/index.js +2 -0
- package/dist/components/TaskCenter/types.d.ts +29 -0
- package/dist/components/TaskCenter/types.js +0 -0
- package/dist/components/TooltipIcon/TooltipIcon.d.ts +3 -0
- package/dist/components/TooltipIcon/TooltipIcon.js +43 -0
- package/dist/components/TooltipIcon/index.d.ts +2 -0
- package/dist/components/TooltipIcon/index.js +2 -0
- package/dist/components/TooltipIcon/types.d.ts +14 -0
- package/dist/components/TooltipIcon/types.js +0 -0
- package/dist/components/Verification/content.d.ts +11 -0
- package/dist/components/Verification/content.js +223 -0
- package/dist/components/Verification/index.css +43 -0
- package/dist/components/Verification/index.d.ts +1 -0
- package/dist/components/Verification/index.js +37 -0
- package/dist/components/index.d.ts +32 -0
- package/dist/components/index.js +29 -0
- package/dist/config/index.d.ts +83 -0
- package/dist/config/index.js +115 -0
- package/dist/config/theme/index.d.ts +368 -0
- package/dist/config/theme/index.js +369 -0
- package/dist/hooks/createAlive.d.ts +11 -0
- package/dist/hooks/createAlive.js +22 -0
- package/dist/hooks/createGlobalState.d.ts +7 -0
- package/dist/hooks/createGlobalState.js +28 -0
- package/dist/hooks/index.d.ts +26 -0
- package/dist/hooks/index.js +25 -0
- package/dist/hooks/useAsync.d.ts +27 -0
- package/dist/hooks/useAsync.js +76 -0
- package/dist/hooks/useClickOther.d.ts +10 -0
- package/dist/hooks/useClickOther.js +30 -0
- package/dist/hooks/useCopyToClipboard.d.ts +7 -0
- package/dist/hooks/useCopyToClipboard.js +32 -0
- package/dist/hooks/useCreate.d.ts +7 -0
- package/dist/hooks/useCreate.js +21 -0
- package/dist/hooks/useEventListener.d.ts +22 -0
- package/dist/hooks/useEventListener.js +33 -0
- package/dist/hooks/useHistoryStore.d.ts +16 -0
- package/dist/hooks/useHistoryStore.js +106 -0
- package/dist/hooks/useIntersectionObserver.d.ts +8 -0
- package/dist/hooks/useIntersectionObserver.js +23 -0
- package/dist/hooks/useInterval.d.ts +8 -0
- package/dist/hooks/useInterval.js +19 -0
- package/dist/hooks/useLatest.d.ts +2 -0
- package/dist/hooks/useLatest.js +12 -0
- package/dist/hooks/useLockAsyncFn.d.ts +7 -0
- package/dist/hooks/useLockAsyncFn.js +24 -0
- package/dist/hooks/useLockFn.d.ts +7 -0
- package/dist/hooks/useLockFn.js +17 -0
- package/dist/hooks/useMergedState.d.ts +10 -0
- package/dist/hooks/useMergedState.js +30 -0
- package/dist/hooks/useMountedState.d.ts +4 -0
- package/dist/hooks/useMountedState.js +13 -0
- package/dist/hooks/usePermission.d.ts +8 -0
- package/dist/hooks/usePermission.js +21 -0
- package/dist/hooks/usePersistFn.d.ts +8 -0
- package/dist/hooks/usePersistFn.js +13 -0
- package/dist/hooks/useReactive.d.ts +7 -0
- package/dist/hooks/useReactive.js +34 -0
- package/dist/hooks/useRefresh.d.ts +5 -0
- package/dist/hooks/useRefresh.js +8 -0
- package/dist/hooks/useToggle.d.ts +16 -0
- package/dist/hooks/useToggle.js +20 -0
- package/dist/hooks/useUnmount.d.ts +6 -0
- package/dist/hooks/useUnmount.js +10 -0
- package/dist/hooks/useUpdateEffect.d.ts +9 -0
- package/dist/hooks/useUpdateEffect.js +10 -0
- package/dist/hooks/useWindowSize.d.ts +6 -0
- package/dist/hooks/useWindowSize.js +15 -0
- package/dist/hooks/util.d.ts +9 -0
- package/dist/hooks/util.js +6 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +2 -0
- package/dist/utils/array.d.ts +12 -0
- package/dist/utils/array.js +15 -0
- package/dist/utils/classNames.d.ts +4 -0
- package/dist/utils/classNames.js +19 -0
- package/dist/utils/date.d.ts +98 -0
- package/dist/utils/date.js +101 -0
- package/dist/utils/debounce.d.ts +8 -0
- package/dist/utils/debounce.js +38 -0
- package/dist/utils/deepClone.d.ts +6 -0
- package/dist/utils/deepClone.js +10 -0
- package/dist/utils/empty.d.ts +16 -0
- package/dist/utils/empty.js +24 -0
- package/dist/utils/formatPrice.d.ts +2 -0
- package/dist/utils/formatPrice.js +15 -0
- package/dist/utils/getUUID.d.ts +1 -0
- package/dist/utils/getUUID.js +17 -0
- package/dist/utils/getUrlParams.d.ts +11 -0
- package/dist/utils/getUrlParams.js +10 -0
- package/dist/utils/index.d.ts +20 -0
- package/dist/utils/index.js +19 -0
- package/dist/utils/listToTree.d.ts +12 -0
- package/dist/utils/listToTree.js +14 -0
- package/dist/utils/object.d.ts +6 -0
- package/dist/utils/object.js +5 -0
- package/dist/utils/ossUpload.d.ts +45 -0
- package/dist/utils/ossUpload.js +88 -0
- package/dist/utils/parseTo.d.ts +6 -0
- package/dist/utils/parseTo.js +9 -0
- package/dist/utils/request/accessReport.d.ts +2 -0
- package/dist/utils/request/accessReport.js +27 -0
- package/dist/utils/request/defaultRequest.d.ts +9 -0
- package/dist/utils/request/defaultRequest.js +33 -0
- package/dist/utils/request/exportDownload.d.ts +2 -0
- package/dist/utils/request/exportDownload.js +28 -0
- package/dist/utils/request/index.d.ts +29 -0
- package/dist/utils/request/index.js +40 -0
- package/dist/utils/request/noticeCenter.d.ts +2 -0
- package/dist/utils/request/noticeCenter.js +28 -0
- package/dist/utils/svgIcon/index.d.ts +47 -0
- package/dist/utils/svgIcon/index.js +76 -0
- package/dist/utils/throttle.d.ts +10 -0
- package/dist/utils/throttle.js +21 -0
- package/dist/utils/time/index.d.ts +7 -0
- package/dist/utils/time/index.js +12 -0
- package/dist/utils/tools.d.ts +43 -0
- package/dist/utils/tools.js +57 -0
- package/package.json +116 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
.task-detail {
|
|
2
|
+
p {
|
|
3
|
+
margin: 0;
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
.task-center {
|
|
7
|
+
// background-color: #eeeff5;
|
|
8
|
+
.query_translation {
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
line-clamp: 5;
|
|
12
|
+
-webkit-line-clamp: 5;
|
|
13
|
+
display: -webkit-box;
|
|
14
|
+
/* autoprefixer: ignore next */
|
|
15
|
+
width: 100%;
|
|
16
|
+
-webkit-box-orient: vertical;
|
|
17
|
+
text-overflow: ellipsis;
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
.content-box {
|
|
23
|
+
background-color: #ffffff;
|
|
24
|
+
padding: 20px;
|
|
25
|
+
}
|
|
26
|
+
.task-center .content-body {
|
|
27
|
+
.content-box + .content-box {
|
|
28
|
+
// margin-top: 10px;
|
|
29
|
+
// padding-top: 20px;
|
|
30
|
+
padding-top: 0;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.el-form-item {
|
|
35
|
+
// margin-bottom: 0;
|
|
36
|
+
margin-bottom: 10px;
|
|
37
|
+
}
|
|
38
|
+
.agency-form {
|
|
39
|
+
padding: 20px;
|
|
40
|
+
}
|
|
41
|
+
.agency-header {
|
|
42
|
+
margin-bottom: 20px;
|
|
43
|
+
float: right;
|
|
44
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 获取任务选项配置
|
|
3
|
+
* @param env 环境类型,默认为'production'
|
|
4
|
+
* @returns Promise<any> 任务选项配置数据
|
|
5
|
+
*/
|
|
6
|
+
export declare const taskOption: (env?: string) => Promise<any>;
|
|
7
|
+
/**
|
|
8
|
+
* 获取任务列表数据
|
|
9
|
+
* @param env 环境类型
|
|
10
|
+
* @param data 查询参数
|
|
11
|
+
* @returns Promise<any> 任务列表数据
|
|
12
|
+
*/
|
|
13
|
+
export declare const taskList: (env: string, data: Record<string, any>) => Promise<any>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import request from "../../utils/request/index.js";
|
|
2
|
+
const taskOption = (env = 'production')=>request({
|
|
3
|
+
env,
|
|
4
|
+
system: 'service_center',
|
|
5
|
+
api: '/api/admin/task/option'
|
|
6
|
+
});
|
|
7
|
+
const taskList = (env, data)=>request({
|
|
8
|
+
env,
|
|
9
|
+
system: 'service_center',
|
|
10
|
+
api: '/api/admin/task/taskMessages',
|
|
11
|
+
data
|
|
12
|
+
});
|
|
13
|
+
export { taskList, taskOption };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface TaskCenterProps {
|
|
2
|
+
userId: string | number;
|
|
3
|
+
}
|
|
4
|
+
export interface DataType {
|
|
5
|
+
oid: string;
|
|
6
|
+
page_name: string;
|
|
7
|
+
task_status: string;
|
|
8
|
+
type_text: string;
|
|
9
|
+
query_translation: string;
|
|
10
|
+
create_time: string;
|
|
11
|
+
finish_time: string;
|
|
12
|
+
task_no: string;
|
|
13
|
+
create_time_text: string;
|
|
14
|
+
finish_time_text: string;
|
|
15
|
+
task_status_text: string;
|
|
16
|
+
remark: string;
|
|
17
|
+
conditions: {
|
|
18
|
+
field: string;
|
|
19
|
+
value: string;
|
|
20
|
+
}[];
|
|
21
|
+
}
|
|
22
|
+
export interface TaskItem {
|
|
23
|
+
name: string;
|
|
24
|
+
value: string;
|
|
25
|
+
}
|
|
26
|
+
export interface ShowInfo {
|
|
27
|
+
field: string;
|
|
28
|
+
value: string;
|
|
29
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { TooltipIconProps } from './types';
|
|
2
|
+
declare const TooltipIcon: ({ label, content, icon, placement, className, style, labelRender, contentRender, iconRender, ...restTooltipProps }: TooltipIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default TooltipIcon;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { WarningOutlined } from "@ant-design/icons";
|
|
3
|
+
import { Tooltip } from "antd";
|
|
4
|
+
const TooltipIcon = ({ label = '头部标题', content = '提示内容', icon, placement = 'bottom', className, style, labelRender, contentRender, iconRender, ...restTooltipProps })=>{
|
|
5
|
+
const renderLabel = ()=>{
|
|
6
|
+
if (labelRender) return labelRender();
|
|
7
|
+
return /*#__PURE__*/ jsx("span", {
|
|
8
|
+
children: label
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
const renderContent = ()=>{
|
|
12
|
+
if (contentRender) return contentRender();
|
|
13
|
+
return /*#__PURE__*/ jsx("div", {
|
|
14
|
+
dangerouslySetInnerHTML: {
|
|
15
|
+
__html: content
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
const renderIcon = ()=>{
|
|
20
|
+
if (iconRender) return iconRender();
|
|
21
|
+
return /*#__PURE__*/ jsx("span", {
|
|
22
|
+
style: {
|
|
23
|
+
marginLeft: '5px'
|
|
24
|
+
},
|
|
25
|
+
children: icon || /*#__PURE__*/ jsx(WarningOutlined, {})
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
return /*#__PURE__*/ jsxs("span", {
|
|
29
|
+
className: className,
|
|
30
|
+
style: style,
|
|
31
|
+
children: [
|
|
32
|
+
renderLabel(),
|
|
33
|
+
/*#__PURE__*/ jsx(Tooltip, {
|
|
34
|
+
...restTooltipProps,
|
|
35
|
+
title: renderContent(),
|
|
36
|
+
placement: placement,
|
|
37
|
+
children: renderIcon()
|
|
38
|
+
})
|
|
39
|
+
]
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
const TooltipIcon_TooltipIcon = TooltipIcon;
|
|
43
|
+
export { TooltipIcon_TooltipIcon as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { TooltipProps } from 'antd';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export interface TooltipIconOwnProps {
|
|
4
|
+
label?: string;
|
|
5
|
+
content?: string;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
placement?: TooltipProps['placement'];
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
labelRender?: () => ReactNode;
|
|
11
|
+
contentRender?: () => ReactNode;
|
|
12
|
+
iconRender?: () => ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export type TooltipIconProps = TooltipIconOwnProps & Omit<TooltipProps, 'title' | keyof TooltipIconOwnProps>;
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import './index.css';
|
|
3
|
+
interface VerificationConfig {
|
|
4
|
+
closable?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const VerificationModal: React.FC<VerificationConfig>;
|
|
7
|
+
export declare const createVerificationModal: () => {
|
|
8
|
+
show(config: VerificationConfig): void;
|
|
9
|
+
destroy(): void;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button, Input, Modal, Tabs, message } from "antd";
|
|
3
|
+
import { useEffect, useMemo, useState } from "react";
|
|
4
|
+
import { createRoot } from "react-dom/client";
|
|
5
|
+
import { BiIcon } from "../index.js";
|
|
6
|
+
import "./index.css";
|
|
7
|
+
import useLatest from "../../hooks/useLatest.js";
|
|
8
|
+
import request from "../../utils/request/index.js";
|
|
9
|
+
import { getComponentsKeys } from "../../utils/tools.js";
|
|
10
|
+
const getMaskPhone = (env)=>request({
|
|
11
|
+
env: env,
|
|
12
|
+
system: 'zq',
|
|
13
|
+
api: '/api/admin/getMaskPhone'
|
|
14
|
+
});
|
|
15
|
+
const getSmsCodeRequest = (env)=>request({
|
|
16
|
+
env: env,
|
|
17
|
+
system: 'zq',
|
|
18
|
+
api: '/api/admin/sendSms'
|
|
19
|
+
});
|
|
20
|
+
const checkSmsCode = (env, code)=>request({
|
|
21
|
+
env: env,
|
|
22
|
+
system: 'zq',
|
|
23
|
+
api: '/api/admin/verifySms',
|
|
24
|
+
data: {
|
|
25
|
+
sms_code: code
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const DingDing = ({ env, componentsKeys })=>{
|
|
29
|
+
const dingtalkUrl = useMemo(()=>{
|
|
30
|
+
let url = '';
|
|
31
|
+
url = 'production' !== env ? `https://zq.zwwlkj03.top/verification?componentsKeys=${componentsKeys}&origin=${window.location.origin}` : `https://zq.wozhangwan.com/verification?componentsKeys=${componentsKeys}&origin=${window.location.origin}`;
|
|
32
|
+
return url;
|
|
33
|
+
}, [
|
|
34
|
+
env,
|
|
35
|
+
componentsKeys
|
|
36
|
+
]);
|
|
37
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
38
|
+
className: "dingtalk_container",
|
|
39
|
+
children: [
|
|
40
|
+
dingtalkUrl && /*#__PURE__*/ jsx("iframe", {
|
|
41
|
+
title: '钉钉扫码',
|
|
42
|
+
src: dingtalkUrl,
|
|
43
|
+
width: "210px",
|
|
44
|
+
height: "210px",
|
|
45
|
+
className: "iframe"
|
|
46
|
+
}),
|
|
47
|
+
/*#__PURE__*/ jsxs("div", {
|
|
48
|
+
className: "dingtalk_text",
|
|
49
|
+
children: [
|
|
50
|
+
"使用",
|
|
51
|
+
/*#__PURE__*/ jsx("span", {
|
|
52
|
+
children: " 钉钉APP "
|
|
53
|
+
}),
|
|
54
|
+
"扫描二维码验证"
|
|
55
|
+
]
|
|
56
|
+
})
|
|
57
|
+
]
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
const PhoneVerification = ({ env, componentsKeys })=>{
|
|
61
|
+
const [form, setForm] = useState({
|
|
62
|
+
phone: '',
|
|
63
|
+
sms_code: ''
|
|
64
|
+
});
|
|
65
|
+
const [smsTimer, setSmsTimer] = useState(0);
|
|
66
|
+
const smsTimerRef = useLatest(smsTimer);
|
|
67
|
+
const getSmsCode = ()=>{
|
|
68
|
+
if (0 === smsTimer) {
|
|
69
|
+
setSmsTimer(60);
|
|
70
|
+
console.log('获取验证码', smsTimerRef.current);
|
|
71
|
+
getSmsCodeRequest(env).then((res)=>{
|
|
72
|
+
if (1 === res.status_code) message.success(res.msg);
|
|
73
|
+
else message.error(res.msg);
|
|
74
|
+
}).finally(()=>{
|
|
75
|
+
smsTimerFn();
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
const smsTimerFn = ()=>{
|
|
80
|
+
if (smsTimerRef.current > 0) setTimeout(()=>{
|
|
81
|
+
setSmsTimer((prevTimer)=>prevTimer - 1);
|
|
82
|
+
setTimeout(()=>{
|
|
83
|
+
smsTimerFn();
|
|
84
|
+
});
|
|
85
|
+
}, 1000);
|
|
86
|
+
};
|
|
87
|
+
const confirm = ()=>{
|
|
88
|
+
checkSmsCode(env, form.sms_code).then((res)=>{
|
|
89
|
+
if (1 === res.status_code) window.postMessage({
|
|
90
|
+
componentsKeys: componentsKeys,
|
|
91
|
+
type: 'verification'
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
useEffect(()=>{
|
|
96
|
+
getMaskPhone(env).then((res)=>{
|
|
97
|
+
setForm({
|
|
98
|
+
...form,
|
|
99
|
+
phone: res.data.phone
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
}, [
|
|
103
|
+
env
|
|
104
|
+
]);
|
|
105
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
106
|
+
className: "phone_container",
|
|
107
|
+
children: [
|
|
108
|
+
/*#__PURE__*/ jsx("div", {
|
|
109
|
+
className: "phone_text",
|
|
110
|
+
children: /*#__PURE__*/ jsxs("p", {
|
|
111
|
+
children: [
|
|
112
|
+
"手机号: ",
|
|
113
|
+
form.phone
|
|
114
|
+
]
|
|
115
|
+
})
|
|
116
|
+
}),
|
|
117
|
+
/*#__PURE__*/ jsxs("div", {
|
|
118
|
+
className: "phone_code",
|
|
119
|
+
children: [
|
|
120
|
+
/*#__PURE__*/ jsx(Input, {
|
|
121
|
+
maxLength: 6,
|
|
122
|
+
placeholder: "请输入验证码",
|
|
123
|
+
value: form.sms_code,
|
|
124
|
+
onChange: (e)=>setForm({
|
|
125
|
+
...form,
|
|
126
|
+
sms_code: e.target.value
|
|
127
|
+
})
|
|
128
|
+
}),
|
|
129
|
+
/*#__PURE__*/ jsx(Button, {
|
|
130
|
+
style: {
|
|
131
|
+
marginLeft: 8
|
|
132
|
+
},
|
|
133
|
+
type: "primary",
|
|
134
|
+
disabled: smsTimer > 0,
|
|
135
|
+
onClick: getSmsCode,
|
|
136
|
+
children: 0 === smsTimer ? '获取验证码' : smsTimer + 's后重新获取'
|
|
137
|
+
})
|
|
138
|
+
]
|
|
139
|
+
}),
|
|
140
|
+
/*#__PURE__*/ jsx("div", {
|
|
141
|
+
children: /*#__PURE__*/ jsx(Button, {
|
|
142
|
+
type: "primary",
|
|
143
|
+
disabled: 6 !== form.sms_code.length,
|
|
144
|
+
onClick: confirm,
|
|
145
|
+
children: "确认"
|
|
146
|
+
})
|
|
147
|
+
})
|
|
148
|
+
]
|
|
149
|
+
});
|
|
150
|
+
};
|
|
151
|
+
const VerificationModal = ({ closable = false })=>{
|
|
152
|
+
const [isOpen, setIsOpen] = useState(true);
|
|
153
|
+
const [env, setEnv] = useState('');
|
|
154
|
+
const componentsKeys = getComponentsKeys();
|
|
155
|
+
const items = [
|
|
156
|
+
{
|
|
157
|
+
key: '1',
|
|
158
|
+
label: '钉钉扫码',
|
|
159
|
+
children: /*#__PURE__*/ jsx(DingDing, {
|
|
160
|
+
env: env,
|
|
161
|
+
componentsKeys: componentsKeys
|
|
162
|
+
})
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
key: '2',
|
|
166
|
+
label: '手机验证码',
|
|
167
|
+
children: /*#__PURE__*/ jsx(PhoneVerification, {
|
|
168
|
+
env: env,
|
|
169
|
+
componentsKeys: componentsKeys
|
|
170
|
+
})
|
|
171
|
+
}
|
|
172
|
+
];
|
|
173
|
+
useEffect(()=>{
|
|
174
|
+
const $BI = window.$BI;
|
|
175
|
+
setEnv($BI?.env || 'production');
|
|
176
|
+
}, []);
|
|
177
|
+
return /*#__PURE__*/ jsxs(Modal, {
|
|
178
|
+
open: isOpen,
|
|
179
|
+
footer: null,
|
|
180
|
+
title: "安全验证",
|
|
181
|
+
closable: closable,
|
|
182
|
+
onCancel: ()=>setIsOpen(false),
|
|
183
|
+
children: [
|
|
184
|
+
/*#__PURE__*/ jsxs("div", {
|
|
185
|
+
className: "verification_alert",
|
|
186
|
+
children: [
|
|
187
|
+
/*#__PURE__*/ jsx(BiIcon, {
|
|
188
|
+
name: "ExclamationCircleTwoTone",
|
|
189
|
+
twoToneColor: "#ff7d00",
|
|
190
|
+
style: {
|
|
191
|
+
marginRight: 10
|
|
192
|
+
}
|
|
193
|
+
}),
|
|
194
|
+
/*#__PURE__*/ jsx("span", {
|
|
195
|
+
children: "检测到异常操作,需要进行验证以确认您的身份"
|
|
196
|
+
})
|
|
197
|
+
]
|
|
198
|
+
}),
|
|
199
|
+
/*#__PURE__*/ jsx(Tabs, {
|
|
200
|
+
defaultActiveKey: "1",
|
|
201
|
+
items: items,
|
|
202
|
+
onChange: ()=>{}
|
|
203
|
+
})
|
|
204
|
+
]
|
|
205
|
+
});
|
|
206
|
+
};
|
|
207
|
+
const createVerificationModal = ()=>{
|
|
208
|
+
const container = document.createElement('div');
|
|
209
|
+
document.body.appendChild(container);
|
|
210
|
+
const root = createRoot(container);
|
|
211
|
+
return {
|
|
212
|
+
show (config) {
|
|
213
|
+
root.render(/*#__PURE__*/ jsx(VerificationModal, {
|
|
214
|
+
...config
|
|
215
|
+
}));
|
|
216
|
+
},
|
|
217
|
+
destroy () {
|
|
218
|
+
root.unmount();
|
|
219
|
+
if (container.parentNode) container.parentNode.removeChild(container);
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
export { VerificationModal, createVerificationModal };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
.verification_alert {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: flex-start;
|
|
5
|
+
font-weight: 400;
|
|
6
|
+
font-size: 14px;
|
|
7
|
+
color: #323335;
|
|
8
|
+
margin-bottom: 16px;
|
|
9
|
+
}
|
|
10
|
+
.dingtalk_container {
|
|
11
|
+
display: flex;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
align-items: center;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
}
|
|
16
|
+
.dingtalk_container .iframe {
|
|
17
|
+
border: none;
|
|
18
|
+
width: 100%;
|
|
19
|
+
height: 244px;
|
|
20
|
+
}
|
|
21
|
+
.dingtalk_text {
|
|
22
|
+
font-weight: 400;
|
|
23
|
+
line-height: 20px;
|
|
24
|
+
font-size: 12px;
|
|
25
|
+
color: #86909c;
|
|
26
|
+
margin-top: 12px;
|
|
27
|
+
}
|
|
28
|
+
.dingtalk_text span {
|
|
29
|
+
color: #00bf8a;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.phone_text {
|
|
33
|
+
font-weight: 400;
|
|
34
|
+
font-size: 14px;
|
|
35
|
+
color: #323335;
|
|
36
|
+
}
|
|
37
|
+
.phone_code {
|
|
38
|
+
margin-bottom: 12px;
|
|
39
|
+
margin-top: 12px;
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
justify-content: space-between;
|
|
43
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const doubleCheckVerification: (successCallback?: () => void) => void;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { message } from "antd";
|
|
2
|
+
import { getComponentsKeys } from "../../utils/tools.js";
|
|
3
|
+
import { createVerificationModal } from "./content.js";
|
|
4
|
+
const componentsKeys = getComponentsKeys();
|
|
5
|
+
let verificationInstance;
|
|
6
|
+
const handleMessage = (event)=>{
|
|
7
|
+
if (event?.data?.componentsKeys === componentsKeys) {
|
|
8
|
+
if ('verification' === event.data.type) {
|
|
9
|
+
message.success('验证成功');
|
|
10
|
+
verificationInstance?.destroy();
|
|
11
|
+
removeEventListener();
|
|
12
|
+
verificationInstance = null;
|
|
13
|
+
if (window._verificationSuccessCallback && 'function' == typeof window._verificationSuccessCallback) {
|
|
14
|
+
window._verificationSuccessCallback();
|
|
15
|
+
window._verificationSuccessCallback = null;
|
|
16
|
+
}
|
|
17
|
+
const BiNavbarTool = document.querySelector('.bi-navbar-tool');
|
|
18
|
+
BiNavbarTool || setTimeout(()=>{
|
|
19
|
+
window.location.reload();
|
|
20
|
+
}, 1000);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
const removeEventListener = ()=>{
|
|
25
|
+
window.removeEventListener('message', handleMessage);
|
|
26
|
+
};
|
|
27
|
+
const doubleCheckVerification = (successCallback)=>{
|
|
28
|
+
if (verificationInstance) return;
|
|
29
|
+
verificationInstance = createVerificationModal();
|
|
30
|
+
verificationInstance.show({
|
|
31
|
+
closable: true
|
|
32
|
+
});
|
|
33
|
+
console.log('verificationInstance');
|
|
34
|
+
window._verificationSuccessCallback = successCallback;
|
|
35
|
+
window.addEventListener('message', handleMessage);
|
|
36
|
+
};
|
|
37
|
+
export { doubleCheckVerification };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type ResponseData } from './ResponseInterceptor';
|
|
2
|
+
export * from './Avatar';
|
|
3
|
+
export * from './Block';
|
|
4
|
+
export * from './ConfigProvider';
|
|
5
|
+
export * from './CustomColumn';
|
|
6
|
+
export * from './DatePicker';
|
|
7
|
+
export * from './DatePickerPanel';
|
|
8
|
+
export * from './DownloadCenter';
|
|
9
|
+
export * from './Fireworks';
|
|
10
|
+
export * from './Form';
|
|
11
|
+
export * from './FormItem';
|
|
12
|
+
export * from './Icon';
|
|
13
|
+
export * from './Log';
|
|
14
|
+
export * from './Log';
|
|
15
|
+
export * from './LogButton';
|
|
16
|
+
export * from './LogDialog';
|
|
17
|
+
export * from './MediaPreview';
|
|
18
|
+
export * from './Modal';
|
|
19
|
+
export * from './ModalStore';
|
|
20
|
+
export * from './MoreButton';
|
|
21
|
+
export * from './NavbarTool';
|
|
22
|
+
export * from './NoticeCenter';
|
|
23
|
+
export * from './Pagination';
|
|
24
|
+
export { default as ResponseInterceptor } from './ResponseInterceptor';
|
|
25
|
+
export * from './SuperDate';
|
|
26
|
+
export * from './SystemLink';
|
|
27
|
+
export * from './Table';
|
|
28
|
+
export * from './Table';
|
|
29
|
+
export * from './Table';
|
|
30
|
+
export * from './TaskCenter';
|
|
31
|
+
export * from './TooltipIcon';
|
|
32
|
+
export declare const handleResponse: (res: ResponseData, customCallbacks?: Record<number | string, () => void>) => void;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import ResponseInterceptor from "./ResponseInterceptor/index.js";
|
|
2
|
+
export * from "./Avatar/index.js";
|
|
3
|
+
export * from "./Block/index.js";
|
|
4
|
+
export * from "./ConfigProvider/index.js";
|
|
5
|
+
export * from "./CustomColumn/index.js";
|
|
6
|
+
export * from "./DatePicker/index.js";
|
|
7
|
+
export * from "./DatePickerPanel/index.js";
|
|
8
|
+
export * from "./DownloadCenter/index.js";
|
|
9
|
+
export * from "./Fireworks/index.js";
|
|
10
|
+
export * from "./Form/index.js";
|
|
11
|
+
export * from "./FormItem/index.js";
|
|
12
|
+
export * from "./Icon/index.js";
|
|
13
|
+
export * from "./Log/index.js";
|
|
14
|
+
export * from "./LogButton/index.js";
|
|
15
|
+
export * from "./LogDialog/index.js";
|
|
16
|
+
export * from "./MediaPreview/index.js";
|
|
17
|
+
export * from "./Modal/index.js";
|
|
18
|
+
export * from "./ModalStore/index.js";
|
|
19
|
+
export * from "./MoreButton/index.js";
|
|
20
|
+
export * from "./NavbarTool/index.js";
|
|
21
|
+
export * from "./NoticeCenter/index.js";
|
|
22
|
+
export * from "./Pagination/index.js";
|
|
23
|
+
export * from "./SuperDate/index.js";
|
|
24
|
+
export * from "./SystemLink/index.js";
|
|
25
|
+
export * from "./Table/index.js";
|
|
26
|
+
export * from "./TaskCenter/index.js";
|
|
27
|
+
export * from "./TooltipIcon/index.js";
|
|
28
|
+
const handleResponse = ResponseInterceptor.handleResponse.bind(ResponseInterceptor);
|
|
29
|
+
export { ResponseInterceptor, handleResponse };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 环境配置管理
|
|
3
|
+
* 支持的环境: development, dev, staging, stage, production, prod, release
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* 环境类型枚举
|
|
7
|
+
*/
|
|
8
|
+
export declare enum EnvType {
|
|
9
|
+
DEVELOPMENT = "development",
|
|
10
|
+
STAGING = "staging",
|
|
11
|
+
PRODUCTION = "production",
|
|
12
|
+
RELEASE = "release"
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 基础URL配置接口
|
|
16
|
+
*/
|
|
17
|
+
interface BaseUrlConfig {
|
|
18
|
+
baseUrl: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Zhangquan服务URL配置接口
|
|
22
|
+
*/
|
|
23
|
+
interface ZhangquanUrlConfig {
|
|
24
|
+
baseUrl: string;
|
|
25
|
+
wozhangwanBaseUrl: string;
|
|
26
|
+
zwnetBaseUrl: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* 环境URL配置接口
|
|
30
|
+
*/
|
|
31
|
+
interface EnvUrlConfig {
|
|
32
|
+
noticeCenterWebsocket: BaseUrlConfig;
|
|
33
|
+
noticeCenter: BaseUrlConfig;
|
|
34
|
+
downloadCenter: BaseUrlConfig;
|
|
35
|
+
zhangquan: ZhangquanUrlConfig;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* 完整URL配置接口
|
|
39
|
+
*/
|
|
40
|
+
interface UrlConfigMap {
|
|
41
|
+
[key: string]: EnvUrlConfig;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* BaseUrl类型
|
|
45
|
+
*/
|
|
46
|
+
type BaseUrlType = 'baseUrl' | 'wozhangwanBaseUrl' | 'zwnetBaseUrl';
|
|
47
|
+
/**
|
|
48
|
+
* 服务名称类型
|
|
49
|
+
*/
|
|
50
|
+
type ServiceName = 'noticeCenter' | 'downloadCenter' | 'zhangquan' | 'noticeCenterWebsocket';
|
|
51
|
+
/**
|
|
52
|
+
* 获取标准化的环境名称
|
|
53
|
+
* @param env 原始环境名称
|
|
54
|
+
* @returns 标准化后的环境名称
|
|
55
|
+
*/
|
|
56
|
+
export declare const normalizeEnv: (env?: string) => EnvType;
|
|
57
|
+
/**
|
|
58
|
+
* 获取当前环境的URL配置
|
|
59
|
+
* @param env 环境名称 (development/dev, staging/stage, production/prod, release)
|
|
60
|
+
* @returns 对应环境的URL配置对象
|
|
61
|
+
*/
|
|
62
|
+
export declare const getCurrentEnvURL: (env?: string) => EnvUrlConfig;
|
|
63
|
+
/**
|
|
64
|
+
* 获取当前域名
|
|
65
|
+
* @returns 当前域名
|
|
66
|
+
*/
|
|
67
|
+
export declare const getCurrentDomain: () => string;
|
|
68
|
+
/**
|
|
69
|
+
* 根据域名获取对应的 baseUrl 类型
|
|
70
|
+
* @param domain 域名
|
|
71
|
+
* @returns baseUrl 类型
|
|
72
|
+
*/
|
|
73
|
+
export declare const getBaseUrlTypeByDomain: (domain: string) => BaseUrlType;
|
|
74
|
+
/**
|
|
75
|
+
* 获取特定服务的URL
|
|
76
|
+
* @param service 服务名称
|
|
77
|
+
* @param env 环境名称
|
|
78
|
+
* @returns 服务的baseUrl
|
|
79
|
+
*/
|
|
80
|
+
export declare const getServiceURL: (service?: ServiceName, env?: string) => string;
|
|
81
|
+
export declare const URLConfig: UrlConfigMap;
|
|
82
|
+
export declare const ENV_TYPES: typeof EnvType;
|
|
83
|
+
export {};
|