diff --git a/package.json b/package.json index 8c0d572..3f4f01c 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ }, "dependencies": { "@tinymce/tinymce-vue": "^4.0.4", - "axios": "^0.21.1", + "axios": "^0.21.4", "dayjs": "^1.10.6", "element-plus": "^1.1.0-beta.8", "hotkeys-js": "^3.8.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c76219a..9784466 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,7 +4,7 @@ specifiers: '@tinymce/tinymce-vue': ^4.0.4 '@vitejs/plugin-vue': ^1.6.0 '@vue/compiler-sfc': ^3.2.8 - axios: ^0.21.1 + axios: ^0.21.4 dayjs: ^1.10.6 element-plus: ^1.1.0-beta.8 eslint: ^7.32.0 @@ -44,7 +44,7 @@ specifiers: dependencies: '@tinymce/tinymce-vue': registry.nlark.com/@tinymce/tinymce-vue/4.0.4_vue@3.2.8 - axios: 0.21.1 + axios: registry.nlark.com/axios/0.21.4 dayjs: registry.nlark.com/dayjs/1.10.6 element-plus: registry.nlark.com/element-plus/1.1.0-beta.8_vue@3.2.8 hotkeys-js: registry.nlark.com/hotkeys-js/3.8.7 @@ -111,6 +111,8 @@ packages: postcss-syntax: 0.36.2_postcss@7.0.36 remark: registry.nlark.com/remark/13.0.0 unist-util-find-all-after: registry.nlark.com/unist-util-find-all-after/3.0.2 + transitivePeerDependencies: + - supports-color dev: true /aggregate-error/3.1.0: @@ -228,12 +230,6 @@ packages: resolution: {integrity: sha1-1h9G2DslGSUOJ4Ta9bCUeai0HFk=, tarball: aws4/download/aws4-1.11.0.tgz} dev: true - /axios/0.21.1: - resolution: {integrity: sha1-IlY0gZYvTWvemnbVFu8OXTwJsrg=, tarball: axios/download/axios-0.21.1.tgz?cache=0&sync_timestamp=1608623177223&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Faxios%2Fdownload%2Faxios-0.21.1.tgz} - dependencies: - follow-redirects: registry.nlark.com/follow-redirects/1.14.3 - dev: false - /balanced-match/1.0.2: resolution: {integrity: sha1-6D46fj8wCzTLnYf2FfoMvzV2kO4=, tarball: balanced-match/download/balanced-match-1.0.2.tgz} dev: true @@ -972,12 +968,6 @@ packages: resolution: {integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8=, tarball: fs.realpath/download/fs.realpath-1.0.0.tgz} dev: true - /fsevents/2.3.2: - resolution: {integrity: sha1-ilJveLj99GI7cJ4Ll1xSwkwC/Ro=, tarball: fsevents/download/fsevents-2.3.2.tgz?cache=0&sync_timestamp=1612537044236&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffsevents%2Fdownload%2Ffsevents-2.3.2.tgz} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - dev: true - optional: true - /function-bind/1.1.1: resolution: {integrity: sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0=, tarball: function-bind/download/function-bind-1.1.1.tgz} dev: true @@ -1087,7 +1077,7 @@ packages: source-map: 0.6.1 wordwrap: 1.0.0 optionalDependencies: - uglify-js: registry.nlark.com/uglify-js/3.14.1 + uglify-js: registry.nlark.com/uglify-js/3.14.2 dev: true /har-schema/2.0.0: @@ -1195,6 +1185,8 @@ packages: eventemitter3: 4.0.7 follow-redirects: registry.nlark.com/follow-redirects/1.14.3 requires-port: 1.0.0 + transitivePeerDependencies: + - debug dev: true /icss-replace-symbols/1.1.0: @@ -3988,6 +3980,16 @@ packages: version: 0.7.0 dev: true + registry.nlark.com/axios/0.21.4: + resolution: {integrity: sha1-xnuQ3AVo5cHPKwuFjEO6KOLtpXU=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/axios/download/axios-0.21.4.tgz?cache=0&sync_timestamp=1630942582656&other_urls=https%3A%2F%2Fregistry.nlark.com%2Faxios%2Fdownload%2Faxios-0.21.4.tgz} + name: axios + version: 0.21.4 + dependencies: + follow-redirects: registry.nlark.com/follow-redirects/1.14.3 + transitivePeerDependencies: + - debug + dev: false + registry.nlark.com/bail/1.0.5: resolution: {integrity: sha1-tvoTNASjksvB+MS/Y/WVM1Hnp3Y=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/bail/download/bail-1.0.5.tgz} name: bail @@ -4116,7 +4118,7 @@ packages: normalize-path: 3.0.0 readdirp: 3.6.0 optionalDependencies: - fsevents: 2.3.2 + fsevents: registry.nlark.com/fsevents/2.3.2 dev: true registry.nlark.com/clean-css/4.2.3: @@ -4660,6 +4662,11 @@ packages: name: follow-redirects version: 1.14.3 engines: {node: '>=4.0'} + peerDependencies: + debug: '*' + peerDependenciesMeta: + debug: + optional: true registry.nlark.com/fs-extra/10.0.0: resolution: {integrity: sha1-n/YbZV3eU/s0qC34S7IUzoAuF8E=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/fs-extra/download/fs-extra-10.0.0.tgz} @@ -4672,6 +4679,14 @@ packages: universalify: 2.0.0 dev: true + registry.nlark.com/fsevents/2.3.2: + resolution: {integrity: sha1-ilJveLj99GI7cJ4Ll1xSwkwC/Ro=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/fsevents/download/fsevents-2.3.2.tgz} + name: fsevents + version: 2.3.2 + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + dev: true + optional: true + registry.nlark.com/get-pixels/3.3.3: resolution: {integrity: sha1-ceLf1L77gQtUeKYcY1SACXbOAcc=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/get-pixels/download/get-pixels-3.3.3.tgz} name: get-pixels @@ -4879,6 +4894,8 @@ packages: secure-compare: registry.nlark.com/secure-compare/3.0.1 union: 0.5.0 url-join: 2.0.5 + transitivePeerDependencies: + - debug dev: true registry.nlark.com/http-signature/1.2.0: @@ -5113,6 +5130,8 @@ packages: micromark: registry.nlark.com/micromark/2.11.4 parse-entities: 2.0.0 unist-util-stringify-position: 2.0.3 + transitivePeerDependencies: + - supports-color dev: true registry.nlark.com/mdast-util-to-markdown/0.6.5: @@ -5167,6 +5186,8 @@ packages: dependencies: debug: registry.nlark.com/debug/4.3.2 parse-entities: 2.0.0 + transitivePeerDependencies: + - supports-color dev: true registry.nlark.com/mime-db/1.49.0: @@ -5592,6 +5613,8 @@ packages: version: 9.0.0 dependencies: mdast-util-from-markdown: registry.nlark.com/mdast-util-from-markdown/0.8.5 + transitivePeerDependencies: + - supports-color dev: true registry.nlark.com/remark-stringify/9.0.1: @@ -5610,6 +5633,8 @@ packages: remark-parse: registry.nlark.com/remark-parse/9.0.0 remark-stringify: registry.nlark.com/remark-stringify/9.0.1 unified: registry.nlark.com/unified/9.2.2 + transitivePeerDependencies: + - supports-color dev: true registry.nlark.com/resolve-dir/1.0.1: @@ -5649,7 +5674,7 @@ packages: engines: {node: '>=10.0.0'} hasBin: true optionalDependencies: - fsevents: 2.3.2 + fsevents: registry.nlark.com/fsevents/2.3.2 dev: true registry.nlark.com/rxjs/6.6.7: @@ -6084,10 +6109,10 @@ packages: version: 0.0.6 dev: true - registry.nlark.com/uglify-js/3.14.1: - resolution: {integrity: sha1-4suf4025y0z3410dJt/qKOCafQY=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/uglify-js/download/uglify-js-3.14.1.tgz} + registry.nlark.com/uglify-js/3.14.2: + resolution: {integrity: sha1-191qRspXIU9UotCkPK0PNduCrJk=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/uglify-js/download/uglify-js-3.14.2.tgz?cache=0&sync_timestamp=1631026519465&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fuglify-js%2Fdownload%2Fuglify-js-3.14.2.tgz} name: uglify-js - version: 3.14.1 + version: 3.14.2 engines: {node: '>=0.8.0'} hasBin: true dev: true @@ -6334,7 +6359,7 @@ packages: resolve: 1.20.0 rollup: registry.nlark.com/rollup/2.56.3 optionalDependencies: - fsevents: 2.3.2 + fsevents: registry.nlark.com/fsevents/2.3.2 dev: true registry.nlark.com/vue-eslint-parser/7.10.0_eslint@7.32.0: diff --git a/src/api/index.js b/src/api/index.js index 65bcbfb..292af31 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -14,7 +14,7 @@ const toLogin = () => { } const api = axios.create({ - baseURL: import.meta.env.DEV ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL, + baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL, timeout: 10000, responseType: 'json' })