component-sanzhizhou 1.0.0
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/LICENSE +21 -0
- package/README.md +7 -0
- package/dist/Ad/index.d.ts +11 -0
- package/dist/Ad/index.js +143 -0
- package/dist/Ad/index.less +12 -0
- package/dist/Auth/index.d.ts +16 -0
- package/dist/Auth/index.js +374 -0
- package/dist/AuthClient/index.js +30 -0
- package/dist/AuthClient/login-reg.css.js +6 -0
- package/dist/AuthClient/login-reg.js +78 -0
- package/dist/AuthClient/login.css.js +6 -0
- package/dist/AuthClient/login.d.ts +14 -0
- package/dist/AuthClient/login.js +198 -0
- package/dist/AuthClient/qr/h5-we-public-login.d.ts +2 -0
- package/dist/AuthClient/qr/h5-we-public-login.js +22 -0
- package/dist/AuthClient/qr/index.css.js +9 -0
- package/dist/AuthClient/qr/index.d.ts +15 -0
- package/dist/AuthClient/qr/index.js +348 -0
- package/dist/AuthClient/qr/typings.d.ts +22 -0
- package/dist/AuthClient/qr/ws.js +253 -0
- package/dist/AuthClient/reg.js +185 -0
- package/dist/AuthClient/user-offline.js +41 -0
- package/dist/Buy/index.css.js +6 -0
- package/dist/Buy/index.d.ts +14 -0
- package/dist/Buy/index.js +121 -0
- package/dist/Buy/qr.css.js +6 -0
- package/dist/Buy/qr.d.ts +11 -0
- package/dist/Buy/qr.js +354 -0
- package/dist/Buy/trial-member.css.js +6 -0
- package/dist/Buy/trial-member.d.ts +8 -0
- package/dist/Buy/trial-member.js +45 -0
- package/dist/Client/ClientUpdate/index.js +92 -0
- package/dist/Client/ClientUpdate/index.less +23 -0
- package/dist/Login/index.js +5 -0
- package/dist/Notice/index.js +36 -0
- package/dist/PhonePublish/account-manage/home.d.ts +11 -0
- package/dist/PhonePublish/account-manage/home.js +242 -0
- package/dist/PhonePublish/account-manage/home.less +28 -0
- package/dist/PhonePublish/account-manage/index.d.ts +3 -0
- package/dist/PhonePublish/account-manage/index.js +56 -0
- package/dist/PhonePublish/account-manage/index.less +59 -0
- package/dist/PhonePublish/account-manage/list.d.ts +17 -0
- package/dist/PhonePublish/account-manage/list.js +443 -0
- package/dist/PhonePublish/account-manage/list.less +95 -0
- package/dist/PhonePublish/account-manage/setting/index.d.ts +6 -0
- package/dist/PhonePublish/account-manage/setting/index.js +199 -0
- package/dist/PhonePublish/account-manage/setting/index.less +11 -0
- package/dist/PhonePublish/create-task/base/index.d.ts +10 -0
- package/dist/PhonePublish/create-task/base/index.js +386 -0
- package/dist/PhonePublish/create-task/base/index.less +64 -0
- package/dist/PhonePublish/create-task/getVideoGoodsUrl.d.ts +2 -0
- package/dist/PhonePublish/create-task/getVideoGoodsUrl.js +136 -0
- package/dist/PhonePublish/create-task/hour-enabled.js +42 -0
- package/dist/PhonePublish/create-task/hour-enabled.less +24 -0
- package/dist/PhonePublish/create-task/index.d.ts +11 -0
- package/dist/PhonePublish/create-task/index.js +449 -0
- package/dist/PhonePublish/create-task/index.less +75 -0
- package/dist/PhonePublish/create-task/select-list.css.js +6 -0
- package/dist/PhonePublish/create-task/select-list.d.ts +8 -0
- package/dist/PhonePublish/create-task/select-list.js +304 -0
- package/dist/PhonePublish/create-task/task-list.css.js +6 -0
- package/dist/PhonePublish/create-task/task-list.d.ts +9 -0
- package/dist/PhonePublish/create-task/task-list.js +323 -0
- package/dist/PhonePublish/index.css.js +35 -0
- package/dist/PhonePublish/index.d.ts +15 -0
- package/dist/PhonePublish/index.js +192 -0
- package/dist/PhonePublish/index.less +55 -0
- package/dist/PhonePublish/lib/chrome-quit.js +20 -0
- package/dist/PhonePublish/log/index.d.ts +8 -0
- package/dist/PhonePublish/log/index.js +186 -0
- package/dist/PhonePublish/log/index.less +81 -0
- package/dist/PhonePublish/publish-task-plan/index.d.ts +9 -0
- package/dist/PhonePublish/publish-task-plan/index.js +32 -0
- package/dist/PhonePublish/publish-task-plan/index.less +4 -0
- package/dist/PhonePublish/publish-task-plan/tool-bak.txt +219 -0
- package/dist/PhonePublish/publish-task-plan/tool.d.ts +29 -0
- package/dist/PhonePublish/publish-task-plan/tool.js +720 -0
- package/dist/PhonePublish/task-list/index.d.ts +8 -0
- package/dist/PhonePublish/task-list/index.js +224 -0
- package/dist/PhonePublish/task-list/index.less +8 -0
- package/dist/PhonePublish/task-list/plan/list.d.ts +12 -0
- package/dist/PhonePublish/task-list/plan/list.js +290 -0
- package/dist/PhonePublish/task-list/plan/list.less +87 -0
- package/dist/PhonePublish/task-list/plan/operate.d.ts +8 -0
- package/dist/PhonePublish/task-list/plan/operate.js +145 -0
- package/dist/PhonePublish/task-list/plan/query.d.ts +8 -0
- package/dist/PhonePublish/task-list/plan/query.js +89 -0
- package/dist/PhonePublish/task-list/plan/query.less +9 -0
- package/dist/PhonePublish/task-list/plan/status.js +53 -0
- package/dist/PhonePublish/task-list/query.js +76 -0
- package/dist/PhonePublish/task-list/query.less +19 -0
- package/dist/PhonePublish/task-list/who-can-view.js +37 -0
- package/dist/PhonePublish/video-account/ban/index.d.ts +10 -0
- package/dist/PhonePublish/video-account/ban/index.js +94 -0
- package/dist/PhonePublish/video-account/ban/index.less +4 -0
- package/dist/PhonePublish/video-account/base-info.d.ts +13 -0
- package/dist/PhonePublish/video-account/base-info.js +75 -0
- package/dist/PhonePublish/video-account/base-info.less +92 -0
- package/dist/PhonePublish/video-account/create.d.ts +8 -0
- package/dist/PhonePublish/video-account/create.js +174 -0
- package/dist/PhonePublish/video-account/group.d.ts +9 -0
- package/dist/PhonePublish/video-account/group.js +255 -0
- package/dist/PhonePublish/video-account/group.less +10 -0
- package/dist/PhonePublish/video-account/index.d.ts +8 -0
- package/dist/PhonePublish/video-account/index.js +403 -0
- package/dist/PhonePublish/video-account/index.less +92 -0
- package/dist/PhonePublish/video-account/query.d.ts +8 -0
- package/dist/PhonePublish/video-account/query.js +115 -0
- package/dist/PhonePublish/video-account/query.less +18 -0
- package/dist/PhonePublish/video-publish-statistic/account-trend/index.d.ts +8 -0
- package/dist/PhonePublish/video-publish-statistic/account-trend/index.js +173 -0
- package/dist/PhonePublish/video-publish-statistic/account-trend/index.less +3 -0
- package/dist/PhonePublish/video-publish-statistic/account-trend/kind-list.js +22 -0
- package/dist/PhonePublish/video-publish-statistic/account-trend/query.js +54 -0
- package/dist/PhonePublish/video-publish-statistic/account-trend/query.less +3 -0
- package/dist/PhonePublish/video-publish-statistic/index.d.ts +2 -0
- package/dist/PhonePublish/video-publish-statistic/index.js +37 -0
- package/dist/PhonePublish/video-publish-statistic/kind.js +57 -0
- package/dist/PhonePublish/video-publish-statistic/operation/list.d.ts +7 -0
- package/dist/PhonePublish/video-publish-statistic/operation/list.js +242 -0
- package/dist/PhonePublish/video-publish-statistic/operation/list.less +10 -0
- package/dist/PhonePublish/video-publish-statistic/operation/query.js +56 -0
- package/dist/PhonePublish/video-publish-statistic/operation/query.less +3 -0
- package/dist/PhonePublish/video-publish-statistic/publish-plan/list.d.ts +8 -0
- package/dist/PhonePublish/video-publish-statistic/publish-plan/list.js +257 -0
- package/dist/PhonePublish/video-publish-statistic/publish-plan/list.less +105 -0
- package/dist/PhonePublish/video-publish-statistic/publish-plan/query.js +79 -0
- package/dist/PhonePublish/video-publish-statistic/publish-plan/query.less +3 -0
- package/dist/Product/dict.d.ts +16 -0
- package/dist/Product/dict.js +93 -0
- package/dist/Product/index.js +36 -0
- package/dist/UI/DialogDrawer.css.js +6 -0
- package/dist/UI/DialogDrawer.js +74 -0
- package/dist/UI/DialogDrawerFooter.css.js +6 -0
- package/dist/UI/DialogDrawerFooter.js +22 -0
- package/dist/UI/FileSize.css.js +6 -0
- package/dist/UI/FileSize.js +63 -0
- package/dist/UI/LayoutContent.js +73 -0
- package/dist/UI/LayoutContent.less +64 -0
- package/dist/UI/LoadError.css.js +6 -0
- package/dist/UI/LoadError.js +36 -0
- package/dist/UI/Money/index.css.js +6 -0
- package/dist/UI/Money/index.js +40 -0
- package/dist/UI/PageContentWarp.js +80 -0
- package/dist/UI/PageContentWarp.less +56 -0
- package/dist/UI/PageLoading.js +11 -0
- package/dist/UI/PageLoading.less +7 -0
- package/dist/UI/Time.js +21 -0
- package/dist/UI/duration.css.js +6 -0
- package/dist/UI/duration.js +49 -0
- package/dist/UI/enabled.js +28 -0
- package/dist/UI/text-input.js +110 -0
- package/dist/UI/text-input.less +22 -0
- package/dist/VideoPublish/account-manage/home.d.ts +11 -0
- package/dist/VideoPublish/account-manage/home.js +232 -0
- package/dist/VideoPublish/account-manage/home.less +58 -0
- package/dist/VideoPublish/account-manage/index.d.ts +3 -0
- package/dist/VideoPublish/account-manage/index.js +56 -0
- package/dist/VideoPublish/account-manage/index.less +59 -0
- package/dist/VideoPublish/account-manage/list.d.ts +17 -0
- package/dist/VideoPublish/account-manage/list.js +501 -0
- package/dist/VideoPublish/account-manage/list.less +95 -0
- package/dist/VideoPublish/account-manage/setting/index.d.ts +6 -0
- package/dist/VideoPublish/account-manage/setting/index.js +199 -0
- package/dist/VideoPublish/account-manage/setting/index.less +11 -0
- package/dist/VideoPublish/create-task/base/index.d.ts +10 -0
- package/dist/VideoPublish/create-task/base/index.js +386 -0
- package/dist/VideoPublish/create-task/base/index.less +64 -0
- package/dist/VideoPublish/create-task/getVideoGoodsUrl.d.ts +2 -0
- package/dist/VideoPublish/create-task/getVideoGoodsUrl.js +136 -0
- package/dist/VideoPublish/create-task/hour-enabled.js +42 -0
- package/dist/VideoPublish/create-task/hour-enabled.less +24 -0
- package/dist/VideoPublish/create-task/index.d.ts +11 -0
- package/dist/VideoPublish/create-task/index.js +449 -0
- package/dist/VideoPublish/create-task/index.less +75 -0
- package/dist/VideoPublish/create-task/select-list.css.js +6 -0
- package/dist/VideoPublish/create-task/select-list.d.ts +8 -0
- package/dist/VideoPublish/create-task/select-list.js +304 -0
- package/dist/VideoPublish/create-task/task-list.css.js +6 -0
- package/dist/VideoPublish/create-task/task-list.d.ts +9 -0
- package/dist/VideoPublish/create-task/task-list.js +323 -0
- package/dist/VideoPublish/index.css.js +35 -0
- package/dist/VideoPublish/index.d.ts +15 -0
- package/dist/VideoPublish/index.js +235 -0
- package/dist/VideoPublish/index.less +55 -0
- package/dist/VideoPublish/lib/chrome-quit.js +20 -0
- package/dist/VideoPublish/log/index.d.ts +8 -0
- package/dist/VideoPublish/log/index.js +186 -0
- package/dist/VideoPublish/log/index.less +81 -0
- package/dist/VideoPublish/proxy/create.d.ts +8 -0
- package/dist/VideoPublish/proxy/create.js +176 -0
- package/dist/VideoPublish/proxy/list.d.ts +9 -0
- package/dist/VideoPublish/proxy/list.js +276 -0
- package/dist/VideoPublish/proxy/list.less +10 -0
- package/dist/VideoPublish/proxy/query.d.ts +9 -0
- package/dist/VideoPublish/proxy/query.js +75 -0
- package/dist/VideoPublish/proxy/query.less +10 -0
- package/dist/VideoPublish/proxy/select.d.ts +10 -0
- package/dist/VideoPublish/proxy/select.js +110 -0
- package/dist/VideoPublish/proxy/select.less +17 -0
- package/dist/VideoPublish/publish-task-plan/index.d.ts +9 -0
- package/dist/VideoPublish/publish-task-plan/index.js +32 -0
- package/dist/VideoPublish/publish-task-plan/index.less +4 -0
- package/dist/VideoPublish/publish-task-plan/tool-bak.txt +219 -0
- package/dist/VideoPublish/publish-task-plan/tool.d.ts +29 -0
- package/dist/VideoPublish/publish-task-plan/tool.js +720 -0
- package/dist/VideoPublish/task-list/index.d.ts +8 -0
- package/dist/VideoPublish/task-list/index.js +224 -0
- package/dist/VideoPublish/task-list/index.less +8 -0
- package/dist/VideoPublish/task-list/plan/list.d.ts +12 -0
- package/dist/VideoPublish/task-list/plan/list.js +290 -0
- package/dist/VideoPublish/task-list/plan/list.less +87 -0
- package/dist/VideoPublish/task-list/plan/operate.d.ts +8 -0
- package/dist/VideoPublish/task-list/plan/operate.js +145 -0
- package/dist/VideoPublish/task-list/plan/query.d.ts +8 -0
- package/dist/VideoPublish/task-list/plan/query.js +89 -0
- package/dist/VideoPublish/task-list/plan/query.less +9 -0
- package/dist/VideoPublish/task-list/plan/status.js +53 -0
- package/dist/VideoPublish/task-list/query.js +76 -0
- package/dist/VideoPublish/task-list/query.less +19 -0
- package/dist/VideoPublish/task-list/who-can-view.js +37 -0
- package/dist/VideoPublish/video-account/ban/index.d.ts +10 -0
- package/dist/VideoPublish/video-account/ban/index.js +94 -0
- package/dist/VideoPublish/video-account/ban/index.less +4 -0
- package/dist/VideoPublish/video-account/base-info.d.ts +13 -0
- package/dist/VideoPublish/video-account/base-info.js +75 -0
- package/dist/VideoPublish/video-account/base-info.less +92 -0
- package/dist/VideoPublish/video-account/create.d.ts +8 -0
- package/dist/VideoPublish/video-account/create.js +174 -0
- package/dist/VideoPublish/video-account/group.d.ts +9 -0
- package/dist/VideoPublish/video-account/group.js +255 -0
- package/dist/VideoPublish/video-account/group.less +10 -0
- package/dist/VideoPublish/video-account/index.d.ts +8 -0
- package/dist/VideoPublish/video-account/index.js +403 -0
- package/dist/VideoPublish/video-account/index.less +92 -0
- package/dist/VideoPublish/video-account/query.d.ts +8 -0
- package/dist/VideoPublish/video-account/query.js +115 -0
- package/dist/VideoPublish/video-account/query.less +18 -0
- package/dist/VideoPublish/video-publish-statistic/account-trend/index.d.ts +8 -0
- package/dist/VideoPublish/video-publish-statistic/account-trend/index.js +173 -0
- package/dist/VideoPublish/video-publish-statistic/account-trend/index.less +3 -0
- package/dist/VideoPublish/video-publish-statistic/account-trend/kind-list.js +22 -0
- package/dist/VideoPublish/video-publish-statistic/account-trend/query.js +54 -0
- package/dist/VideoPublish/video-publish-statistic/account-trend/query.less +3 -0
- package/dist/VideoPublish/video-publish-statistic/index.d.ts +2 -0
- package/dist/VideoPublish/video-publish-statistic/index.js +37 -0
- package/dist/VideoPublish/video-publish-statistic/kind.js +57 -0
- package/dist/VideoPublish/video-publish-statistic/operation/list.d.ts +7 -0
- package/dist/VideoPublish/video-publish-statistic/operation/list.js +242 -0
- package/dist/VideoPublish/video-publish-statistic/operation/list.less +10 -0
- package/dist/VideoPublish/video-publish-statistic/operation/query.js +56 -0
- package/dist/VideoPublish/video-publish-statistic/operation/query.less +3 -0
- package/dist/VideoPublish/video-publish-statistic/publish-plan/list.d.ts +8 -0
- package/dist/VideoPublish/video-publish-statistic/publish-plan/list.js +257 -0
- package/dist/VideoPublish/video-publish-statistic/publish-plan/list.less +105 -0
- package/dist/VideoPublish/video-publish-statistic/publish-plan/query.js +79 -0
- package/dist/VideoPublish/video-publish-statistic/publish-plan/query.less +3 -0
- package/dist/VideoPublish/video-topic/add.d.ts +9 -0
- package/dist/VideoPublish/video-topic/add.js +89 -0
- package/dist/VideoPublish/video-topic/add.less +3 -0
- package/dist/VideoPublish/video-topic/index.d.ts +8 -0
- package/dist/VideoPublish/video-topic/index.js +301 -0
- package/dist/VideoPublish/video-topic/index.less +37 -0
- package/dist/VideoPublish/video-topic/select.d.ts +11 -0
- package/dist/VideoPublish/video-topic/select.js +172 -0
- package/dist/VideoPublish/video-topic/select.less +3 -0
- package/dist/VipCompare/commend.css.js +6 -0
- package/dist/VipCompare/commend.js +28 -0
- package/dist/VipCompare/index.css.js +6 -0
- package/dist/VipCompare/index.d.ts +8 -0
- package/dist/VipCompare/index.js +325 -0
- package/dist/VipList/index.css.js +6 -0
- package/dist/VipList/index.d.ts +15 -0
- package/dist/VipList/index.js +397 -0
- package/dist/active-code/index.d.ts +7 -0
- package/dist/active-code/index.js +78 -0
- package/dist/active-code/user-vip.d.ts +3 -0
- package/dist/active-code/user-vip.js +84 -0
- package/dist/active-code/user-vip.less +3 -0
- package/dist/asset/image/platform/bilibili.png +0 -0
- package/dist/asset/image/platform/buyin.png +0 -0
- package/dist/asset/image/platform/douyin.png +0 -0
- package/dist/asset/image/platform/douyu.png +0 -0
- package/dist/asset/image/platform/huya.png +0 -0
- package/dist/asset/image/platform/kuaishou.png +0 -0
- package/dist/asset/image/platform/tiktok.png +0 -0
- package/dist/asset/image/platform/youtube.png +0 -0
- package/dist/base/DealerUrlDict.js +7 -0
- package/dist/base/fileList.d.ts +2 -0
- package/dist/base/fileList.js +61 -0
- package/dist/base/fileListContent.d.ts +2 -0
- package/dist/base/fileListContent.js +61 -0
- package/dist/base/fileSelect.d.ts +2 -0
- package/dist/base/fileSelect.js +54 -0
- package/dist/base/folderCreate.d.ts +2 -0
- package/dist/base/folderCreate.js +56 -0
- package/dist/base/folderOpen.d.ts +2 -0
- package/dist/base/folderOpen.js +54 -0
- package/dist/base/folderSelect.d.ts +2 -0
- package/dist/base/folderSelect.js +54 -0
- package/dist/base/index.js +57 -0
- package/dist/base/openInFolder.d.ts +2 -0
- package/dist/base/openInFolder.js +54 -0
- package/dist/base/soundInfo.d.ts +8 -0
- package/dist/base/soundInfo.js +55 -0
- package/dist/component/AccountBan/index.js +10 -0
- package/dist/component/AccountBan/index.less +12 -0
- package/dist/component/file-select.d.ts +18 -0
- package/dist/component/file-select.js +163 -0
- package/dist/component/file-select.less +24 -0
- package/dist/component/folder-select.d.ts +19 -0
- package/dist/component/folder-select.js +224 -0
- package/dist/component/folder-select.less +22 -0
- package/dist/component/is-installed-chrome.d.ts +2 -0
- package/dist/component/is-installed-chrome.js +7 -0
- package/dist/component/isFileExist.js +50 -0
- package/dist/component/markdown/github-markdown-light.less +1102 -0
- package/dist/component/markdown/index.d.ts +8 -0
- package/dist/component/markdown/index.js +69 -0
- package/dist/component/markdown/index.less +55 -0
- package/dist/component/media-kind.js +24 -0
- package/dist/component/media-show/index.js +59 -0
- package/dist/component/media-show/index.less +0 -0
- package/dist/component/media-show/render.js +112 -0
- package/dist/component/media-show/render.less +54 -0
- package/dist/component/param.js +9 -0
- package/dist/component/product-dict.js +11 -0
- package/dist/component/product-type.js +20 -0
- package/dist/component/sse.js +66 -0
- package/dist/component/video-platform/logo.js +61 -0
- package/dist/component/video-platform/logo.less +49 -0
- package/dist/component/videoKindTag/index.js +44 -0
- package/dist/component/websocket/index.js +139 -0
- package/dist/config/apiUrls.js +25 -0
- package/dist/global.less +34 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +35 -0
- package/dist/lib/Tool.js +1175 -0
- package/dist/lib/accountManageSettingConfig.js +24 -0
- package/dist/lib/allow-mine-type.js +19 -0
- package/dist/lib/call-mini-url.js +8 -0
- package/dist/lib/component/getImageUrl.js +9 -0
- package/dist/lib/component/getSoundUrl.js +9 -0
- package/dist/lib/component/getVideoUrl.js +9 -0
- package/dist/lib/event.js +59 -0
- package/dist/lib/file-type.js +156 -0
- package/dist/lib/fs.d.ts +14 -0
- package/dist/lib/fs.js +480 -0
- package/dist/lib/getApiUrl.js +80 -0
- package/dist/lib/getFileExt.js +6 -0
- package/dist/lib/getLocalUserInfo.js +19 -0
- package/dist/lib/getPublishExtensionDir.d.ts +2 -0
- package/dist/lib/getPublishExtensionDir.js +55 -0
- package/dist/lib/getWorkServerUploadToken.d.ts +8 -0
- package/dist/lib/getWorkServerUploadToken.js +12 -0
- package/dist/lib/goAuth.js +28 -0
- package/dist/lib/isInClient.js +5 -0
- package/dist/lib/js-error.js +30 -0
- package/dist/lib/math.js +146 -0
- package/dist/lib/moneySimple.js +27 -0
- package/dist/lib/notification.js +43 -0
- package/dist/lib/openChrome.d.ts +2 -0
- package/dist/lib/openChrome.js +257 -0
- package/dist/lib/platform.js +57 -0
- package/dist/lib/postMessage.js +8 -0
- package/dist/lib/request.js +145 -0
- package/dist/lib/save-path.d.ts +17 -0
- package/dist/lib/save-path.js +177 -0
- package/dist/lib/save-path.less +21 -0
- package/dist/lib/saveSid.d.ts +2 -0
- package/dist/lib/saveSid.js +64 -0
- package/dist/lib/sleep.js +23 -0
- package/dist/lib/store.js +36 -0
- package/dist/lib/toast.js +8 -0
- package/dist/lib/toastError.js +8 -0
- package/dist/lib/updateUserInfo.js +40 -0
- package/dist/lib/user-agent.d.ts +2 -0
- package/dist/lib/user-agent.js +10 -0
- package/dist/lib/video-api/open-chrome.js +51 -0
- package/dist/lib/video-api/quit-chrome.d.ts +2 -0
- package/dist/lib/video-api/quit-chrome.js +51 -0
- package/dist/renewal-vip/index.d.ts +2 -0
- package/dist/renewal-vip/index.js +77 -0
- package/dist/service/api/ActiveAccountModeSettingController.d.ts +2 -0
- package/dist/service/api/ActiveAccountModeSettingController.js +53 -0
- package/dist/service/api/AdController.d.ts +6 -0
- package/dist/service/api/AdController.js +27 -0
- package/dist/service/api/AuthController.js +77 -0
- package/dist/service/api/ClientVersionController.js +27 -0
- package/dist/service/api/JsErrorController.js +27 -0
- package/dist/service/api/ProductController.js +77 -0
- package/dist/service/api/PublishTaskPlanStatisticController.d.ts +1 -0
- package/dist/service/api/PublishTaskPlanStatisticController.js +28 -0
- package/dist/service/api/SubClientController.d.ts +7 -0
- package/dist/service/api/SubClientController.js +48 -0
- package/dist/service/api/TradeController.js +52 -0
- package/dist/service/api/UserController.js +52 -0
- package/dist/service/api/UserVipController.js +27 -0
- package/dist/service/api/VideoPublishController.js +110 -0
- package/dist/service/api/VideoPublishCrawlerTaskController.d.ts +2 -0
- package/dist/service/api/VideoPublishCrawlerTaskController.js +51 -0
- package/dist/service/api/VideoPublishStatisticOperationController.d.ts +12 -0
- package/dist/service/api/VideoPublishStatisticOperationController.js +51 -0
- package/dist/service/api/VideoPublishStatisticPublishController.js +28 -0
- package/dist/service/api/VideoPublishTaskController.js +29 -0
- package/dist/service/api/VideoPublishTaskPlanController.d.ts +13 -0
- package/dist/service/api/VideoPublishTaskPlanController.js +74 -0
- package/dist/service/api/VideoPublishVideoAccountController.d.ts +17 -0
- package/dist/service/api/VideoPublishVideoAccountController.js +237 -0
- package/dist/service/api/VideoPublishVideoAccountGroupController.d.ts +8 -0
- package/dist/service/api/VideoPublishVideoAccountGroupController.js +105 -0
- package/dist/service/api/VideoPublishVideoAccountProxyController.d.ts +11 -0
- package/dist/service/api/VideoPublishVideoAccountProxyController.js +105 -0
- package/dist/service/api/VideoPublishVideoTopicController.d.ts +5 -0
- package/dist/service/api/VideoPublishVideoTopicController.js +80 -0
- package/dist/service/api/VideoPublishVideoTopicGroupController.d.ts +5 -0
- package/dist/service/api/VideoPublishVideoTopicGroupController.js +80 -0
- package/dist/service/api/VideoStudyController.d.ts +1 -0
- package/dist/service/api/VideoStudyController.js +29 -0
- package/dist/service/api/VipCardController.js +115 -0
- package/dist/service/api/VipController.js +50 -0
- package/dist/service/api/VipPowerController.js +27 -0
- package/dist/service/api/WechatController.js +50 -0
- package/dist/service/api/WorkServerController.js +27 -0
- package/dist/service/local/FileController.d.ts +35 -0
- package/dist/service/local/FileController.js +249 -0
- package/dist/service/local/LocalServerController.d.ts +1 -0
- package/dist/service/local/LocalServerController.js +32 -0
- package/dist/service/local/VideoPublishTaskController.d.ts +1 -0
- package/dist/service/local/VideoPublishTaskController.js +32 -0
- package/dist/service/typing.d.ts +14 -0
- package/dist/service/video-api/BaseController.js +27 -0
- package/dist/service/video-api/FileController.js +50 -0
- package/dist/service/video-api/SidController.js +27 -0
- package/dist/service/video-api/VideoApiOpenChromeController.js +50 -0
- package/dist/types/ApiLocal.js +0 -0
- package/dist/types/AutoMakeTaskSetting.js +0 -0
- package/dist/types/ChromeOperate.js +0 -0
- package/dist/types/ClientUpdate.js +0 -0
- package/dist/types/ClientVersion.js +0 -0
- package/dist/types/File.js +0 -0
- package/dist/types/LocalServer.js +0 -0
- package/dist/types/PublishNpm.js +0 -0
- package/dist/types/PublishTaskPlan.js +0 -0
- package/dist/types/PublishTaskPlanStatistic.js +0 -0
- package/dist/types/PublishVideo.js +0 -0
- package/dist/types/Site.js +0 -0
- package/dist/types/User.d.ts +84 -0
- package/dist/types/VideoPublish.js +0 -0
- package/dist/types/VideoPublishLog.js +0 -0
- package/dist/types/VideoPublishStatistic.js +0 -0
- package/dist/types/VideoPublishStatisticOperation.js +0 -0
- package/dist/types/VideoPublishTaskPlan.js +0 -0
- package/dist/types/VideoPublishVideoAccount.js +0 -0
- package/dist/types/VideoPublishVideoAccountGroup.js +0 -0
- package/dist/types/VideoPublishVideoAccountProxy.js +0 -0
- package/dist/types/VideoPublishVideoTopic.js +0 -0
- package/dist/types/VideoPublishVideoTopicGroup.js +0 -0
- package/dist/types/VideoStudy.js +0 -0
- package/dist/types/VidepApiBase.js +0 -0
- package/dist/types/VipCard.js +0 -0
- package/dist/types/VipList.js +0 -0
- package/dist/types/VipPower.js +0 -0
- package/dist/types/WorkServer.js +0 -0
- package/dist/typings/Ad.js +0 -0
- package/dist/typings/LocalFile.js +0 -0
- package/dist/typings/Product.js +0 -0
- package/dist/typings/SubClient.js +0 -0
- package/dist/typings/Trade.js +0 -0
- package/dist/typings/User.js +0 -0
- package/dist/typings/VideoPublishAccountManageSetting.js +0 -0
- package/dist/typings/VideoPublishVideoAccount.js +0 -0
- package/dist/typings/Vip.js +0 -0
- package/dist/typings/Wechat.js +0 -0
- package/dist/typings.d.ts +86 -0
- package/dist/video-study/index.d.ts +11 -0
- package/dist/video-study/index.js +71 -0
- package/dist/video-study/index.less +16 -0
- package/dist/window.d.ts +33 -0
- package/package.json +92 -0
package/dist/lib/fs.js
ADDED
|
@@ -0,0 +1,480 @@
|
|
|
1
|
+
import _createForOfIteratorHelper from "@babel/runtime/helpers/esm/createForOfIteratorHelper";
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
3
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
4
|
+
import { VideoMineType } from "./allow-mine-type";
|
|
5
|
+
import getFileExt from "./getFileExt";
|
|
6
|
+
export var fs = function fs() {
|
|
7
|
+
var _window$getBridge;
|
|
8
|
+
return (_window$getBridge = window.getBridge()) === null || _window$getBridge === void 0 ? void 0 : _window$getBridge.fs;
|
|
9
|
+
};
|
|
10
|
+
var path = function path() {
|
|
11
|
+
return window.getBridge().path;
|
|
12
|
+
};
|
|
13
|
+
function fsDirWalk(dir) {
|
|
14
|
+
var _fs, _fs$readdirSync;
|
|
15
|
+
var size = 0;
|
|
16
|
+
(_fs = fs()) === null || _fs === void 0 || (_fs$readdirSync = _fs.readdirSync) === null || _fs$readdirSync === void 0 || _fs$readdirSync.call(_fs, dir).forEach(function (file) {
|
|
17
|
+
var filePath = path().join(dir, file);
|
|
18
|
+
var stat = fs().statSync(filePath);
|
|
19
|
+
if (stat.isDirectory()) {
|
|
20
|
+
size += fsDirWalk(filePath);
|
|
21
|
+
} else {
|
|
22
|
+
size += stat.size;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
return size;
|
|
26
|
+
}
|
|
27
|
+
export function fsDirVideoList(dir) {
|
|
28
|
+
var _fs2, _fs2$readdirSync;
|
|
29
|
+
var list = [];
|
|
30
|
+
console.log('fsDirVideoList:', dir);
|
|
31
|
+
(_fs2 = fs()) === null || _fs2 === void 0 || (_fs2$readdirSync = _fs2.readdirSync) === null || _fs2$readdirSync === void 0 || _fs2$readdirSync.call(_fs2, dir).forEach(function (file) {
|
|
32
|
+
var filePath = path().join(dir, file);
|
|
33
|
+
var extName = getFileExt(file);
|
|
34
|
+
if ((VideoMineType === null || VideoMineType === void 0 ? void 0 : VideoMineType.indexOf(extName)) === -1) {
|
|
35
|
+
console.log('fsDirVideoList not video :', file, extName);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
list.push(filePath);
|
|
39
|
+
//
|
|
40
|
+
// console.log('fsDirVideoList:', file, extName );
|
|
41
|
+
//
|
|
42
|
+
//
|
|
43
|
+
// const stat = fs().statSync(filePath);
|
|
44
|
+
//
|
|
45
|
+
// console.log('fsDirVideoList stat.isDirectory():', stat.isDirectory() , stat.isFile() );
|
|
46
|
+
//
|
|
47
|
+
// if ( ! stat.isDirectory()) {
|
|
48
|
+
// list.push( filePath );
|
|
49
|
+
// }
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
return list;
|
|
53
|
+
}
|
|
54
|
+
export function getDirSize(dirPath) {
|
|
55
|
+
console.log('getDirSize:', dirPath);
|
|
56
|
+
return fsDirWalk(dirPath);
|
|
57
|
+
}
|
|
58
|
+
export function isFileExist(_x) {
|
|
59
|
+
return _isFileExist.apply(this, arguments);
|
|
60
|
+
}
|
|
61
|
+
function _isFileExist() {
|
|
62
|
+
_isFileExist = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(filePath) {
|
|
63
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
64
|
+
while (1) switch (_context.prev = _context.next) {
|
|
65
|
+
case 0:
|
|
66
|
+
return _context.abrupt("return", new Promise(function (resolve, reject) {
|
|
67
|
+
try {
|
|
68
|
+
fs().stat(filePath, function (err) {
|
|
69
|
+
if (err) {
|
|
70
|
+
console.log('isFileExist fs:', err);
|
|
71
|
+
reject(err);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
resolve(true);
|
|
75
|
+
});
|
|
76
|
+
} catch (e) {
|
|
77
|
+
reject(e);
|
|
78
|
+
}
|
|
79
|
+
}));
|
|
80
|
+
case 1:
|
|
81
|
+
case "end":
|
|
82
|
+
return _context.stop();
|
|
83
|
+
}
|
|
84
|
+
}, _callee);
|
|
85
|
+
}));
|
|
86
|
+
return _isFileExist.apply(this, arguments);
|
|
87
|
+
}
|
|
88
|
+
export function isDirExist(_x2) {
|
|
89
|
+
return _isDirExist.apply(this, arguments);
|
|
90
|
+
}
|
|
91
|
+
function _isDirExist() {
|
|
92
|
+
_isDirExist = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(dirPath) {
|
|
93
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
94
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
95
|
+
case 0:
|
|
96
|
+
return _context2.abrupt("return", new Promise(function (resolve, reject) {
|
|
97
|
+
try {
|
|
98
|
+
fs().stat(dirPath, function (err, stats) {
|
|
99
|
+
if (err) {
|
|
100
|
+
console.log('isFileExist fs:', err);
|
|
101
|
+
reject(err);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
if (stats.isDirectory()) {
|
|
105
|
+
return resolve(true);
|
|
106
|
+
}
|
|
107
|
+
var error = new Error('文件夹不存在,但存在同名文件');
|
|
108
|
+
error.name = 'not-dir-but-file';
|
|
109
|
+
reject(error);
|
|
110
|
+
});
|
|
111
|
+
} catch (e) {
|
|
112
|
+
reject(e);
|
|
113
|
+
}
|
|
114
|
+
}));
|
|
115
|
+
case 1:
|
|
116
|
+
case "end":
|
|
117
|
+
return _context2.stop();
|
|
118
|
+
}
|
|
119
|
+
}, _callee2);
|
|
120
|
+
}));
|
|
121
|
+
return _isDirExist.apply(this, arguments);
|
|
122
|
+
}
|
|
123
|
+
export function writeFileText(_x3, _x4) {
|
|
124
|
+
return _writeFileText.apply(this, arguments);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// 获取文本内容
|
|
128
|
+
function _writeFileText() {
|
|
129
|
+
_writeFileText = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(filePath, content) {
|
|
130
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
131
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
132
|
+
case 0:
|
|
133
|
+
return _context3.abrupt("return", new Promise(function (resolve, reject) {
|
|
134
|
+
var text = typeof content === 'string' ? content : JSON.stringify(content !== null && content !== void 0 ? content : '');
|
|
135
|
+
fs().writeFile(filePath, text, function (err) {
|
|
136
|
+
if (err) {
|
|
137
|
+
console.warn(err);
|
|
138
|
+
reject(err);
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
console.log('内容已成功写入文件');
|
|
142
|
+
resolve(true);
|
|
143
|
+
});
|
|
144
|
+
}));
|
|
145
|
+
case 1:
|
|
146
|
+
case "end":
|
|
147
|
+
return _context3.stop();
|
|
148
|
+
}
|
|
149
|
+
}, _callee3);
|
|
150
|
+
}));
|
|
151
|
+
return _writeFileText.apply(this, arguments);
|
|
152
|
+
}
|
|
153
|
+
export function getFileText(_x5) {
|
|
154
|
+
return _getFileText.apply(this, arguments);
|
|
155
|
+
}
|
|
156
|
+
function _getFileText() {
|
|
157
|
+
_getFileText = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(filePath) {
|
|
158
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
159
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
160
|
+
case 0:
|
|
161
|
+
return _context4.abrupt("return", new Promise(function (resolve, reject) {
|
|
162
|
+
fs().readFile(filePath, 'utf8', function (err, data) {
|
|
163
|
+
if (err) {
|
|
164
|
+
console.error('getFileText:', err);
|
|
165
|
+
reject(err);
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
console.log(data);
|
|
169
|
+
resolve(data);
|
|
170
|
+
});
|
|
171
|
+
}));
|
|
172
|
+
case 1:
|
|
173
|
+
case "end":
|
|
174
|
+
return _context4.stop();
|
|
175
|
+
}
|
|
176
|
+
}, _callee4);
|
|
177
|
+
}));
|
|
178
|
+
return _getFileText.apply(this, arguments);
|
|
179
|
+
}
|
|
180
|
+
export function fileRename(_x6, _x7) {
|
|
181
|
+
return _fileRename.apply(this, arguments);
|
|
182
|
+
}
|
|
183
|
+
function _fileRename() {
|
|
184
|
+
_fileRename = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(oldFilePath, newFilePath) {
|
|
185
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
186
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
187
|
+
case 0:
|
|
188
|
+
return _context5.abrupt("return", new Promise(function (resolve, reject) {
|
|
189
|
+
fs().rename(oldFilePath, newFilePath, function (err) {
|
|
190
|
+
if (err) {
|
|
191
|
+
console.log('fileRename err:', err);
|
|
192
|
+
reject(err);
|
|
193
|
+
console.log('re name fail:', err);
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
resolve(true);
|
|
197
|
+
});
|
|
198
|
+
}));
|
|
199
|
+
case 1:
|
|
200
|
+
case "end":
|
|
201
|
+
return _context5.stop();
|
|
202
|
+
}
|
|
203
|
+
}, _callee5);
|
|
204
|
+
}));
|
|
205
|
+
return _fileRename.apply(this, arguments);
|
|
206
|
+
}
|
|
207
|
+
export function fileIno(_x8) {
|
|
208
|
+
return _fileIno.apply(this, arguments);
|
|
209
|
+
}
|
|
210
|
+
function _fileIno() {
|
|
211
|
+
_fileIno = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(filePath) {
|
|
212
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
213
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
214
|
+
case 0:
|
|
215
|
+
return _context6.abrupt("return", new Promise(function (resolve, reject) {
|
|
216
|
+
fs().stat(filePath, function (err, stats) {
|
|
217
|
+
if (err) {
|
|
218
|
+
console.log('fileIno 2:', err);
|
|
219
|
+
reject(err);
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
resolve(stats.size);
|
|
223
|
+
});
|
|
224
|
+
}));
|
|
225
|
+
case 1:
|
|
226
|
+
case "end":
|
|
227
|
+
return _context6.stop();
|
|
228
|
+
}
|
|
229
|
+
}, _callee6);
|
|
230
|
+
}));
|
|
231
|
+
return _fileIno.apply(this, arguments);
|
|
232
|
+
}
|
|
233
|
+
export function getFileSize(_x9) {
|
|
234
|
+
return _getFileSize.apply(this, arguments);
|
|
235
|
+
}
|
|
236
|
+
function _getFileSize() {
|
|
237
|
+
_getFileSize = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(filePath) {
|
|
238
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
239
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
240
|
+
case 0:
|
|
241
|
+
return _context7.abrupt("return", fileIno(filePath));
|
|
242
|
+
case 1:
|
|
243
|
+
case "end":
|
|
244
|
+
return _context7.stop();
|
|
245
|
+
}
|
|
246
|
+
}, _callee7);
|
|
247
|
+
}));
|
|
248
|
+
return _getFileSize.apply(this, arguments);
|
|
249
|
+
}
|
|
250
|
+
export function delFile(_x10) {
|
|
251
|
+
return _delFile.apply(this, arguments);
|
|
252
|
+
}
|
|
253
|
+
function _delFile() {
|
|
254
|
+
_delFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(filePath) {
|
|
255
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
256
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
257
|
+
case 0:
|
|
258
|
+
return _context8.abrupt("return", new Promise(function (resolve, reject) {
|
|
259
|
+
fs().unlink(filePath, function (err) {
|
|
260
|
+
if (err) {
|
|
261
|
+
console.error('delFile:', filePath, err);
|
|
262
|
+
reject(err);
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
resolve(true);
|
|
266
|
+
});
|
|
267
|
+
}));
|
|
268
|
+
case 1:
|
|
269
|
+
case "end":
|
|
270
|
+
return _context8.stop();
|
|
271
|
+
}
|
|
272
|
+
}, _callee8);
|
|
273
|
+
}));
|
|
274
|
+
return _delFile.apply(this, arguments);
|
|
275
|
+
}
|
|
276
|
+
export function delDirFiles(_x11) {
|
|
277
|
+
return _delDirFiles.apply(this, arguments);
|
|
278
|
+
}
|
|
279
|
+
function _delDirFiles() {
|
|
280
|
+
_delDirFiles = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(dirPath) {
|
|
281
|
+
var oldTime,
|
|
282
|
+
_args11 = arguments;
|
|
283
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context11) {
|
|
284
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
285
|
+
case 0:
|
|
286
|
+
oldTime = _args11.length > 1 && _args11[1] !== undefined ? _args11[1] : 6 * 3600 * 1000;
|
|
287
|
+
console.log('delDirFiles:', dirPath, oldTime);
|
|
288
|
+
return _context11.abrupt("return", new Promise( /*#__PURE__*/function () {
|
|
289
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(resolve, reject) {
|
|
290
|
+
var _fs3, _fs3$readdirSync;
|
|
291
|
+
var fileList, _iterator, _step, _loop;
|
|
292
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context10) {
|
|
293
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
294
|
+
case 0:
|
|
295
|
+
fileList = ((_fs3 = fs()) === null || _fs3 === void 0 || (_fs3$readdirSync = _fs3.readdirSync) === null || _fs3$readdirSync === void 0 ? void 0 : _fs3$readdirSync.call(_fs3, dirPath)) || [];
|
|
296
|
+
console.log('delDirFiles 1:', fileList);
|
|
297
|
+
_iterator = _createForOfIteratorHelper(fileList);
|
|
298
|
+
_context10.prev = 3;
|
|
299
|
+
_loop = /*#__PURE__*/_regeneratorRuntime().mark(function _loop() {
|
|
300
|
+
var filePath, fileFullPath;
|
|
301
|
+
return _regeneratorRuntime().wrap(function _loop$(_context9) {
|
|
302
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
303
|
+
case 0:
|
|
304
|
+
filePath = _step.value;
|
|
305
|
+
fileFullPath = path().join(dirPath, filePath);
|
|
306
|
+
if (!(oldTime <= 0)) {
|
|
307
|
+
_context9.next = 6;
|
|
308
|
+
break;
|
|
309
|
+
}
|
|
310
|
+
_context9.next = 5;
|
|
311
|
+
return new Promise(function (resolve, reject) {
|
|
312
|
+
fs().rm(fileFullPath, {
|
|
313
|
+
force: true
|
|
314
|
+
}, function (err) {
|
|
315
|
+
resolve(true);
|
|
316
|
+
});
|
|
317
|
+
});
|
|
318
|
+
case 5:
|
|
319
|
+
return _context9.abrupt("return", 1);
|
|
320
|
+
case 6:
|
|
321
|
+
_context9.next = 8;
|
|
322
|
+
return new Promise(function (resolve, reject) {
|
|
323
|
+
fs().stat(fileFullPath, function (err, stats) {
|
|
324
|
+
if (err) {
|
|
325
|
+
console.log('delDirFiles 2:', err);
|
|
326
|
+
reject(err);
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
// console.log('fileList stats:', stats );
|
|
330
|
+
if (stats.birthtimeMs + oldTime < Date.now()) {
|
|
331
|
+
fs().rm(fileFullPath, {
|
|
332
|
+
force: true
|
|
333
|
+
}, function (err) {
|
|
334
|
+
if (err) {
|
|
335
|
+
console.log('delDirFiles 3:', err);
|
|
336
|
+
return reject(err);
|
|
337
|
+
}
|
|
338
|
+
resolve(true);
|
|
339
|
+
});
|
|
340
|
+
} else {
|
|
341
|
+
resolve(true);
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
}).catch(function (err) {
|
|
345
|
+
console.log("del err:", err);
|
|
346
|
+
});
|
|
347
|
+
case 8:
|
|
348
|
+
case "end":
|
|
349
|
+
return _context9.stop();
|
|
350
|
+
}
|
|
351
|
+
}, _loop);
|
|
352
|
+
});
|
|
353
|
+
_iterator.s();
|
|
354
|
+
case 6:
|
|
355
|
+
if ((_step = _iterator.n()).done) {
|
|
356
|
+
_context10.next = 12;
|
|
357
|
+
break;
|
|
358
|
+
}
|
|
359
|
+
return _context10.delegateYield(_loop(), "t0", 8);
|
|
360
|
+
case 8:
|
|
361
|
+
if (!_context10.t0) {
|
|
362
|
+
_context10.next = 10;
|
|
363
|
+
break;
|
|
364
|
+
}
|
|
365
|
+
return _context10.abrupt("continue", 10);
|
|
366
|
+
case 10:
|
|
367
|
+
_context10.next = 6;
|
|
368
|
+
break;
|
|
369
|
+
case 12:
|
|
370
|
+
_context10.next = 17;
|
|
371
|
+
break;
|
|
372
|
+
case 14:
|
|
373
|
+
_context10.prev = 14;
|
|
374
|
+
_context10.t1 = _context10["catch"](3);
|
|
375
|
+
_iterator.e(_context10.t1);
|
|
376
|
+
case 17:
|
|
377
|
+
_context10.prev = 17;
|
|
378
|
+
_iterator.f();
|
|
379
|
+
return _context10.finish(17);
|
|
380
|
+
case 20:
|
|
381
|
+
resolve(true);
|
|
382
|
+
case 21:
|
|
383
|
+
case "end":
|
|
384
|
+
return _context10.stop();
|
|
385
|
+
}
|
|
386
|
+
}, _callee9, null, [[3, 14, 17, 20]]);
|
|
387
|
+
}));
|
|
388
|
+
return function (_x14, _x15) {
|
|
389
|
+
return _ref.apply(this, arguments);
|
|
390
|
+
};
|
|
391
|
+
}()));
|
|
392
|
+
case 3:
|
|
393
|
+
case "end":
|
|
394
|
+
return _context11.stop();
|
|
395
|
+
}
|
|
396
|
+
}, _callee10);
|
|
397
|
+
}));
|
|
398
|
+
return _delDirFiles.apply(this, arguments);
|
|
399
|
+
}
|
|
400
|
+
export function mkdir(_x12) {
|
|
401
|
+
return _mkdir.apply(this, arguments);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
// 检查存在,并创建
|
|
405
|
+
function _mkdir() {
|
|
406
|
+
_mkdir = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(directory) {
|
|
407
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context12) {
|
|
408
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
409
|
+
case 0:
|
|
410
|
+
return _context12.abrupt("return", new Promise(function (resolve, reject) {
|
|
411
|
+
fs().mkdir(directory, {
|
|
412
|
+
recursive: true
|
|
413
|
+
}, function (err) {
|
|
414
|
+
if (err) {
|
|
415
|
+
console.error(err);
|
|
416
|
+
return reject(err);
|
|
417
|
+
}
|
|
418
|
+
console.log('Directory created successfully');
|
|
419
|
+
resolve(true);
|
|
420
|
+
});
|
|
421
|
+
}));
|
|
422
|
+
case 1:
|
|
423
|
+
case "end":
|
|
424
|
+
return _context12.stop();
|
|
425
|
+
}
|
|
426
|
+
}, _callee11);
|
|
427
|
+
}));
|
|
428
|
+
return _mkdir.apply(this, arguments);
|
|
429
|
+
}
|
|
430
|
+
export function isDirExistCreate(_x13) {
|
|
431
|
+
return _isDirExistCreate.apply(this, arguments);
|
|
432
|
+
}
|
|
433
|
+
function _isDirExistCreate() {
|
|
434
|
+
_isDirExistCreate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(directory) {
|
|
435
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context14) {
|
|
436
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
437
|
+
case 0:
|
|
438
|
+
return _context14.abrupt("return", new Promise( /*#__PURE__*/function () {
|
|
439
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(resolve, reject) {
|
|
440
|
+
var isExist, createDir;
|
|
441
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context13) {
|
|
442
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
443
|
+
case 0:
|
|
444
|
+
_context13.next = 2;
|
|
445
|
+
return isDirExist(directory).catch(function (err) {});
|
|
446
|
+
case 2:
|
|
447
|
+
isExist = _context13.sent;
|
|
448
|
+
if (!isExist) {
|
|
449
|
+
_context13.next = 5;
|
|
450
|
+
break;
|
|
451
|
+
}
|
|
452
|
+
return _context13.abrupt("return", resolve(true));
|
|
453
|
+
case 5:
|
|
454
|
+
_context13.next = 7;
|
|
455
|
+
return mkdir(directory).catch(function (err) {
|
|
456
|
+
reject(err);
|
|
457
|
+
});
|
|
458
|
+
case 7:
|
|
459
|
+
createDir = _context13.sent;
|
|
460
|
+
if (createDir) {
|
|
461
|
+
resolve(true);
|
|
462
|
+
}
|
|
463
|
+
case 9:
|
|
464
|
+
case "end":
|
|
465
|
+
return _context13.stop();
|
|
466
|
+
}
|
|
467
|
+
}, _callee12);
|
|
468
|
+
}));
|
|
469
|
+
return function (_x16, _x17) {
|
|
470
|
+
return _ref2.apply(this, arguments);
|
|
471
|
+
};
|
|
472
|
+
}()));
|
|
473
|
+
case 1:
|
|
474
|
+
case "end":
|
|
475
|
+
return _context14.stop();
|
|
476
|
+
}
|
|
477
|
+
}, _callee13);
|
|
478
|
+
}));
|
|
479
|
+
return _isDirExistCreate.apply(this, arguments);
|
|
480
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import ApiUrlsInfo, { currentEnv } from "../config/apiUrls";
|
|
2
|
+
var ApiUrls = function ApiUrls() {
|
|
3
|
+
var _window, _window2;
|
|
4
|
+
return ((_window = window) === null || _window === void 0 || (_window = _window.WebBaseConfig) === null || _window === void 0 || (_window = _window[(_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.WebBaseConfig) === null || _window2 === void 0 ? void 0 : _window2.webKind]) === null || _window === void 0 ? void 0 : _window.apiUrls) || ApiUrlsInfo;
|
|
5
|
+
};
|
|
6
|
+
var envData = function envData() {
|
|
7
|
+
var _window3;
|
|
8
|
+
return ((_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.WebBaseConfig) === null || _window3 === void 0 ? void 0 : _window3.currentEnv) || currentEnv;
|
|
9
|
+
};
|
|
10
|
+
export var getMainPort = function getMainPort() {
|
|
11
|
+
return window.__ShipinlvMainPort || 61800;
|
|
12
|
+
};
|
|
13
|
+
export var getLocalServerPort = function getLocalServerPort() {
|
|
14
|
+
return window.__ShipinlvLocalServerPort || 61806;
|
|
15
|
+
};
|
|
16
|
+
var getApiUrl = function getApiUrl() {
|
|
17
|
+
var _domain;
|
|
18
|
+
var apiName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
19
|
+
var apiEnv = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
20
|
+
// 允许 http
|
|
21
|
+
if (/^https?:\/\//i.test(apiName)) {
|
|
22
|
+
return apiName;
|
|
23
|
+
}
|
|
24
|
+
var mainPort = getMainPort();
|
|
25
|
+
var localServerPort = getLocalServerPort();
|
|
26
|
+
|
|
27
|
+
// 主客户端
|
|
28
|
+
if (/^_main\//i.test(apiName)) {
|
|
29
|
+
return "http://127.0.0.1:".concat(mainPort, "/").concat(apiName.replace(/^_main\//i, ''));
|
|
30
|
+
}
|
|
31
|
+
if (/^_video-api\//i.test(apiName)) {
|
|
32
|
+
apiName = apiName.toLocaleLowerCase();
|
|
33
|
+
return "http://127.0.0.1:".concat(localServerPort, "/").concat(apiName.replace(/^_video-api\//i, ''));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// 替换第一个 /
|
|
37
|
+
apiName = apiName.replace(/^\//, '');
|
|
38
|
+
var env = getApiEnv(apiEnv || envData());
|
|
39
|
+
var ApiUrlsItem = ApiUrls();
|
|
40
|
+
var itemData = ApiUrlsItem[env] || ApiUrlsItem.prod;
|
|
41
|
+
// 高优先级;
|
|
42
|
+
var domain = (itemData === null || itemData === void 0 ? void 0 : itemData.authApi) || (itemData === null || itemData === void 0 ? void 0 : itemData.api);
|
|
43
|
+
|
|
44
|
+
// 删除最后一个 /
|
|
45
|
+
domain = ((_domain = domain) === null || _domain === void 0 ? void 0 : _domain.replace(/\/$/, '')) || '';
|
|
46
|
+
|
|
47
|
+
// 改为小写
|
|
48
|
+
// 把 api 变小写,但不变参数
|
|
49
|
+
var apiNameInfo = apiName.split('?');
|
|
50
|
+
apiName = "".concat(apiNameInfo[0].toLowerCase()).concat(apiName.indexOf('?') > -1 ? '?' : '').concat(apiNameInfo[1] || '');
|
|
51
|
+
|
|
52
|
+
// 可能有
|
|
53
|
+
var url = "".concat(domain).concat(/\/$/.test(domain) ? '' : '/').concat(apiName);
|
|
54
|
+
return url;
|
|
55
|
+
};
|
|
56
|
+
//
|
|
57
|
+
export var getApiEnv = function getApiEnv(apiEnv) {
|
|
58
|
+
var env = apiEnv || envData();
|
|
59
|
+
// 开发者只允许使用 .local 后缀域名;
|
|
60
|
+
if (!/\.local$/i.test(document.location.hostname) && !/\.?localhost$/i.test(document.location.hostname)) {
|
|
61
|
+
env = 'prod';
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// 预发环境::锁定
|
|
65
|
+
if (/^pre\./i.test(document.location.hostname)) {
|
|
66
|
+
env = 'pre';
|
|
67
|
+
}
|
|
68
|
+
return env || 'prod';
|
|
69
|
+
};
|
|
70
|
+
export var getEnv = function getEnv() {
|
|
71
|
+
var env = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
72
|
+
return getApiEnv(env);
|
|
73
|
+
};
|
|
74
|
+
export var getWsUrl = function getWsUrl() {
|
|
75
|
+
var _ref;
|
|
76
|
+
var env = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
77
|
+
env = getEnv(env);
|
|
78
|
+
return (_ref = ApiUrls()[env] || ApiUrls().prod) === null || _ref === void 0 ? void 0 : _ref.ws;
|
|
79
|
+
};
|
|
80
|
+
export default getApiUrl;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
var getFileExt = function getFileExt(fileUrl) {
|
|
2
|
+
var _split, _ref;
|
|
3
|
+
var url = ((_split = (fileUrl || '').split(/[#?/]/g)) === null || _split === void 0 ? void 0 : _split[0].match(/\.([a-z0-9]+)$/i)) || [];
|
|
4
|
+
return ((_ref = url[1] || '') === null || _ref === void 0 ? void 0 : _ref.toLocaleLowerCase()) || '';
|
|
5
|
+
};
|
|
6
|
+
export default getFileExt;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import store from "./store";
|
|
3
|
+
var getLocalUserInfo = function getLocalUserInfo() {
|
|
4
|
+
var storageUserInfo = store.get('user-info') || {
|
|
5
|
+
nickname: '',
|
|
6
|
+
id: 0,
|
|
7
|
+
isLogin: false,
|
|
8
|
+
avatarUrl: '',
|
|
9
|
+
sid: '',
|
|
10
|
+
userVip: {},
|
|
11
|
+
gender: 2,
|
|
12
|
+
accountName: '',
|
|
13
|
+
role: '',
|
|
14
|
+
isVerified: false
|
|
15
|
+
};
|
|
16
|
+
var userInfo = _objectSpread({}, storageUserInfo);
|
|
17
|
+
return userInfo;
|
|
18
|
+
};
|
|
19
|
+
export default getLocalUserInfo;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
|
+
import { getLocalVideoServerDir } from "../service/video-api/BaseController";
|
|
4
|
+
var getPublishExtensionDir = /*#__PURE__*/function () {
|
|
5
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(env) {
|
|
6
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
7
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
8
|
+
case 0:
|
|
9
|
+
return _context2.abrupt("return", new Promise( /*#__PURE__*/function () {
|
|
10
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(resolve, reject) {
|
|
11
|
+
var result, dir;
|
|
12
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
13
|
+
while (1) switch (_context.prev = _context.next) {
|
|
14
|
+
case 0:
|
|
15
|
+
_context.next = 2;
|
|
16
|
+
return getLocalVideoServerDir().catch(function (err) {
|
|
17
|
+
reject(err);
|
|
18
|
+
});
|
|
19
|
+
case 2:
|
|
20
|
+
result = _context.sent;
|
|
21
|
+
if (result) {
|
|
22
|
+
_context.next = 5;
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
return _context.abrupt("return");
|
|
26
|
+
case 5:
|
|
27
|
+
if (!(env === 'local')) {
|
|
28
|
+
_context.next = 7;
|
|
29
|
+
break;
|
|
30
|
+
}
|
|
31
|
+
return _context.abrupt("return", resolve('/Volumes/Data/Web/shipinlv/chrome-shipinlv-video-publish/public'));
|
|
32
|
+
case 7:
|
|
33
|
+
dir = result.dirPath + '/../../../chrome-publish-plugin';
|
|
34
|
+
resolve(dir);
|
|
35
|
+
case 9:
|
|
36
|
+
case "end":
|
|
37
|
+
return _context.stop();
|
|
38
|
+
}
|
|
39
|
+
}, _callee);
|
|
40
|
+
}));
|
|
41
|
+
return function (_x2, _x3) {
|
|
42
|
+
return _ref2.apply(this, arguments);
|
|
43
|
+
};
|
|
44
|
+
}()));
|
|
45
|
+
case 1:
|
|
46
|
+
case "end":
|
|
47
|
+
return _context2.stop();
|
|
48
|
+
}
|
|
49
|
+
}, _callee2);
|
|
50
|
+
}));
|
|
51
|
+
return function getPublishExtensionDir(_x) {
|
|
52
|
+
return _ref.apply(this, arguments);
|
|
53
|
+
};
|
|
54
|
+
}();
|
|
55
|
+
export default getPublishExtensionDir;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as WorkServerController from "../service/api/WorkServerController";
|
|
2
|
+
var getWorkServerUploadToken = function getWorkServerUploadToken(query) {
|
|
3
|
+
// 先到 服务器
|
|
4
|
+
return WorkServerController.getUploadToken({
|
|
5
|
+
productType: query.productType,
|
|
6
|
+
workType: query.workType,
|
|
7
|
+
fileList: query.fileList
|
|
8
|
+
}, {
|
|
9
|
+
env: query.env
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
export default getWorkServerUploadToken;
|