perf: 移除 js-cookie

This commit is contained in:
xingyu4j 2022-12-01 16:39:22 +08:00
parent 3ff8d51335
commit edcde037a9
5 changed files with 120 additions and 104 deletions

View File

@ -38,7 +38,6 @@
"echarts-wordcloud": "^2.1.0", "echarts-wordcloud": "^2.1.0",
"element-plus": "2.2.25", "element-plus": "2.2.25",
"intro.js": "^6.0.0", "intro.js": "^6.0.0",
"js-cookie": "^3.0.1",
"jsencrypt": "^3.3.1", "jsencrypt": "^3.3.1",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
"mitt": "^3.0.0", "mitt": "^3.0.0",

View File

@ -4,12 +4,12 @@ specifiers:
'@commitlint/cli': ^17.3.0 '@commitlint/cli': ^17.3.0
'@commitlint/config-conventional': ^17.3.0 '@commitlint/config-conventional': ^17.3.0
'@iconify/iconify': ^3.0.1 '@iconify/iconify': ^3.0.1
'@iconify/json': ^2.1.145 '@iconify/json': ^2.1.146
'@intlify/vite-plugin-vue-i18n': ^6.0.3 '@intlify/vite-plugin-vue-i18n': ^6.0.3
'@purge-icons/generated': ^0.9.0 '@purge-icons/generated': ^0.9.0
'@types/intro.js': ^5.1.0 '@types/intro.js': ^5.1.0
'@types/lodash-es': ^4.17.6 '@types/lodash-es': ^4.17.6
'@types/node': ^18.11.9 '@types/node': ^18.11.10
'@types/nprogress': ^0.2.0 '@types/nprogress': ^0.2.0
'@types/qrcode': ^1.5.0 '@types/qrcode': ^1.5.0
'@types/qs': ^6.9.7 '@types/qs': ^6.9.7
@ -35,7 +35,6 @@ specifiers:
eslint-plugin-prettier: ^4.2.1 eslint-plugin-prettier: ^4.2.1
eslint-plugin-vue: ^9.8.0 eslint-plugin-vue: ^9.8.0
intro.js: ^6.0.0 intro.js: ^6.0.0
js-cookie: ^3.0.1
jsencrypt: ^3.3.1 jsencrypt: ^3.3.1
lint-staged: ^13.0.4 lint-staged: ^13.0.4
lodash-es: ^4.17.21 lodash-es: ^4.17.21
@ -95,7 +94,6 @@ dependencies:
echarts-wordcloud: 2.1.0_echarts@5.4.0 echarts-wordcloud: 2.1.0_echarts@5.4.0
element-plus: 2.2.25_vue@3.2.45 element-plus: 2.2.25_vue@3.2.45
intro.js: 6.0.0 intro.js: 6.0.0
js-cookie: 3.0.1
jsencrypt: 3.3.1 jsencrypt: 3.3.1
lodash-es: 4.17.21 lodash-es: 4.17.21
mitt: 3.0.0 mitt: 3.0.0
@ -116,12 +114,12 @@ dependencies:
devDependencies: devDependencies:
'@commitlint/cli': 17.3.0 '@commitlint/cli': 17.3.0
'@commitlint/config-conventional': 17.3.0 '@commitlint/config-conventional': 17.3.0
'@iconify/json': 2.1.145 '@iconify/json': registry.npmmirror.com/@iconify/json/2.1.146
'@intlify/vite-plugin-vue-i18n': 6.0.3_vite@3.2.4+vue-i18n@9.2.2 '@intlify/vite-plugin-vue-i18n': 6.0.3_vite@3.2.4+vue-i18n@9.2.2
'@purge-icons/generated': 0.9.0 '@purge-icons/generated': 0.9.0
'@types/intro.js': 5.1.0 '@types/intro.js': 5.1.0
'@types/lodash-es': 4.17.6 '@types/lodash-es': 4.17.6
'@types/node': 18.11.9 '@types/node': registry.npmmirror.com/@types/node/18.11.10
'@types/nprogress': 0.2.0 '@types/nprogress': 0.2.0
'@types/qrcode': 1.5.0 '@types/qrcode': 1.5.0
'@types/qs': 6.9.7 '@types/qs': 6.9.7
@ -151,7 +149,7 @@ devDependencies:
stylelint-config-standard: 29.0.0_stylelint@14.15.0 stylelint-config-standard: 29.0.0_stylelint@14.15.0
stylelint-order: 5.0.0_stylelint@14.15.0 stylelint-order: 5.0.0_stylelint@14.15.0
typescript: 4.9.3 typescript: 4.9.3
vite: 3.2.4_ajklay5k626t46b6fyghkbup3i vite: 3.2.4_clvymlzunojxjbv3h6i2warera
vite-plugin-compression: 0.5.1_vite@3.2.4 vite-plugin-compression: 0.5.1_vite@3.2.4
vite-plugin-eslint: 1.8.1_eslint@8.28.0+vite@3.2.4 vite-plugin-eslint: 1.8.1_eslint@8.28.0+vite@3.2.4
vite-plugin-html: 3.2.0_vite@3.2.4 vite-plugin-html: 3.2.0_vite@3.2.4
@ -544,7 +542,7 @@ packages:
'@commitlint/execute-rule': 17.0.0 '@commitlint/execute-rule': 17.0.0
'@commitlint/resolve-extends': 17.3.0 '@commitlint/resolve-extends': 17.3.0
'@commitlint/types': 17.0.0 '@commitlint/types': 17.0.0
'@types/node': 14.18.33 '@types/node': registry.npmmirror.com/@types/node/14.18.33
chalk: 4.1.2 chalk: 4.1.2
cosmiconfig: 7.1.0 cosmiconfig: 7.1.0
cosmiconfig-typescript-loader: 4.2.0_qoh33be55smklb2oyrgdyddh4a cosmiconfig-typescript-loader: 4.2.0_qoh33be55smklb2oyrgdyddh4a
@ -717,13 +715,6 @@ packages:
dependencies: dependencies:
'@iconify/types': 2.0.0 '@iconify/types': 2.0.0
/@iconify/json/2.1.145:
resolution: {integrity: sha512-cYU5F2lOPTaUtq9Uulrv66Wrh4XQxWj50xk6d9LeMQZY8IMm2DqICONHVlhOeoYBbCwa0kOt9/W6pMWYB9BomQ==}
dependencies:
'@iconify/types': 2.0.0
pathe: 0.3.9
dev: true
/@iconify/types/2.0.0: /@iconify/types/2.0.0:
resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==}
@ -794,7 +785,7 @@ packages:
debug: 4.3.4 debug: 4.3.4
fast-glob: 3.2.12 fast-glob: 3.2.12
source-map: 0.6.1 source-map: 0.6.1
vite: 3.2.4_ajklay5k626t46b6fyghkbup3i vite: 3.2.4_clvymlzunojxjbv3h6i2warera
vue-i18n: 9.2.2_vue@3.2.45 vue-i18n: 9.2.2_vue@3.2.45
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
@ -969,7 +960,7 @@ packages:
resolution: {integrity: sha512-Ny/PJkO6nxWAQnaet8q/oWz15lrfwvdvBpuY4treB0CSsBO1CG0fVuNLngR3m3bepQLd+E4c3Y3DlC2okpUvPw==} resolution: {integrity: sha512-Ny/PJkO6nxWAQnaet8q/oWz15lrfwvdvBpuY4treB0CSsBO1CG0fVuNLngR3m3bepQLd+E4c3Y3DlC2okpUvPw==}
dependencies: dependencies:
'@types/fined': 1.1.3 '@types/fined': 1.1.3
'@types/node': 18.11.9 '@types/node': registry.npmmirror.com/@types/node/18.11.10
dev: true dev: true
/@types/lodash-es/4.17.6: /@types/lodash-es/4.17.6:
@ -984,18 +975,6 @@ packages:
resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==} resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==}
dev: true dev: true
/@types/node/10.17.60:
resolution: {integrity: sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==}
dev: true
/@types/node/14.18.33:
resolution: {integrity: sha512-qelS/Ra6sacc4loe/3MSjXNL1dNQ/GjxNHVzuChwMfmk7HuycRLVQN2qNY3XahK+fZc5E2szqQSKUyAF0E+2bg==}
dev: true
/@types/node/18.11.9:
resolution: {integrity: sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==}
dev: true
/@types/normalize-package-data/2.4.1: /@types/normalize-package-data/2.4.1:
resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==}
dev: true dev: true
@ -1011,7 +990,7 @@ packages:
/@types/qrcode/1.5.0: /@types/qrcode/1.5.0:
resolution: {integrity: sha512-x5ilHXRxUPIMfjtM+1vf/GPTRWZ81nqscursm5gMznJeK9M0YnZ1c3bEvRLQ0zSSgedLx1J6MGL231ObQGGhaA==} resolution: {integrity: sha512-x5ilHXRxUPIMfjtM+1vf/GPTRWZ81nqscursm5gMznJeK9M0YnZ1c3bEvRLQ0zSSgedLx1J6MGL231ObQGGhaA==}
dependencies: dependencies:
'@types/node': 18.11.9 '@types/node': registry.npmmirror.com/@types/node/18.11.10
dev: true dev: true
/@types/qs/6.9.7: /@types/qs/6.9.7:
@ -1025,13 +1004,13 @@ packages:
/@types/svgo/2.6.4: /@types/svgo/2.6.4:
resolution: {integrity: sha512-l4cmyPEckf8moNYHdJ+4wkHvFxjyW6ulm9l4YGaOxeyBWPhBOT0gvni1InpFPdzx1dKf/2s62qGITwxNWnPQng==} resolution: {integrity: sha512-l4cmyPEckf8moNYHdJ+4wkHvFxjyW6ulm9l4YGaOxeyBWPhBOT0gvni1InpFPdzx1dKf/2s62qGITwxNWnPQng==}
dependencies: dependencies:
'@types/node': 18.11.9 '@types/node': registry.npmmirror.com/@types/node/18.11.10
dev: true dev: true
/@types/through/0.0.30: /@types/through/0.0.30:
resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==}
dependencies: dependencies:
'@types/node': 18.11.9 '@types/node': registry.npmmirror.com/@types/node/18.11.10
dev: true dev: true
/@types/web-bluetooth/0.0.16: /@types/web-bluetooth/0.0.16:
@ -1218,7 +1197,7 @@ packages:
'@babel/core': 7.20.2 '@babel/core': 7.20.2
'@babel/plugin-transform-typescript': 7.20.2_@babel+core@7.20.2 '@babel/plugin-transform-typescript': 7.20.2_@babel+core@7.20.2
'@vue/babel-plugin-jsx': 1.1.1_@babel+core@7.20.2 '@vue/babel-plugin-jsx': 1.1.1_@babel+core@7.20.2
vite: 3.2.4_ajklay5k626t46b6fyghkbup3i vite: 3.2.4_clvymlzunojxjbv3h6i2warera
vue: 3.2.45 vue: 3.2.45
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
@ -1231,7 +1210,7 @@ packages:
vite: ^3.0.0 vite: ^3.0.0
vue: ^3.2.25 vue: ^3.2.25
dependencies: dependencies:
vite: 3.2.4_ajklay5k626t46b6fyghkbup3i vite: 3.2.4_clvymlzunojxjbv3h6i2warera
vue: 3.2.45 vue: 3.2.45
dev: true dev: true
@ -2297,7 +2276,7 @@ packages:
ts-node: '>=10' ts-node: '>=10'
typescript: '>=3' typescript: '>=3'
dependencies: dependencies:
'@types/node': 14.18.33 '@types/node': registry.npmmirror.com/@types/node/14.18.33
cosmiconfig: 7.1.0 cosmiconfig: 7.1.0
ts-node: 10.9.1_kluoused5zacjtflizwvdqgpom ts-node: 10.9.1_kluoused5zacjtflizwvdqgpom
typescript: 4.9.3 typescript: 4.9.3
@ -3968,11 +3947,6 @@ packages:
resolution: {integrity: sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==} resolution: {integrity: sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==}
dev: true dev: true
/js-cookie/3.0.1:
resolution: {integrity: sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw==}
engines: {node: '>=12'}
dev: false
/js-sdsl/4.1.5: /js-sdsl/4.1.5:
resolution: {integrity: sha512-08bOAKweV2NUC1wqTtf3qZlnpOX/R2DU9ikpjOHs0H+ibQv3zpncVQg6um4uYtRtrwIX8M4Nh3ytK4HGlYAq7Q==} resolution: {integrity: sha512-08bOAKweV2NUC1wqTtf3qZlnpOX/R2DU9ikpjOHs0H+ibQv3zpncVQg6um4uYtRtrwIX8M4Nh3ytK4HGlYAq7Q==}
dev: true dev: true
@ -4934,10 +4908,6 @@ packages:
resolution: {integrity: sha512-sTitTPYnn23esFR3RlqYBWn4c45WGeLcsKzQiUpXJAyfcWkolvlYpV8FLo7JishK946oQwMFUCHXQ9AjGPKExw==} resolution: {integrity: sha512-sTitTPYnn23esFR3RlqYBWn4c45WGeLcsKzQiUpXJAyfcWkolvlYpV8FLo7JishK946oQwMFUCHXQ9AjGPKExw==}
dev: true dev: true
/pathe/0.3.9:
resolution: {integrity: sha512-6Y6s0vT112P3jD8dGfuS6r+lpa0qqNrLyHPOwvXMnyNTQaYiwgau2DP3aNDsR13xqtGj7rrPo+jFUATpU6/s+g==}
dev: true
/picocolors/1.0.0: /picocolors/1.0.0:
resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==}
@ -5206,7 +5176,7 @@ packages:
/rd/2.0.1: /rd/2.0.1:
resolution: {integrity: sha512-/XdKU4UazUZTXFmI0dpABt8jSXPWcEyaGdk340KdHnsEOdkTctlX23aAK7ChQDn39YGNlAJr1M5uvaKt4QnpNw==} resolution: {integrity: sha512-/XdKU4UazUZTXFmI0dpABt8jSXPWcEyaGdk340KdHnsEOdkTctlX23aAK7ChQDn39YGNlAJr1M5uvaKt4QnpNw==}
dependencies: dependencies:
'@types/node': 10.17.60 '@types/node': registry.npmmirror.com/@types/node/10.17.60
dev: true dev: true
/read-pkg-up/7.0.1: /read-pkg-up/7.0.1:
@ -6082,7 +6052,7 @@ packages:
'@tsconfig/node12': 1.0.11 '@tsconfig/node12': 1.0.11
'@tsconfig/node14': 1.0.3 '@tsconfig/node14': 1.0.3
'@tsconfig/node16': 1.0.3 '@tsconfig/node16': 1.0.3
'@types/node': 14.18.33 '@types/node': registry.npmmirror.com/@types/node/14.18.33
acorn: 8.8.1 acorn: 8.8.1
acorn-walk: 8.2.0 acorn-walk: 8.2.0
arg: 4.1.3 arg: 4.1.3
@ -6272,7 +6242,7 @@ packages:
chalk: 4.1.2 chalk: 4.1.2
debug: 4.3.4 debug: 4.3.4
fs-extra: 10.1.0 fs-extra: 10.1.0
vite: 3.2.4_ajklay5k626t46b6fyghkbup3i vite: 3.2.4_clvymlzunojxjbv3h6i2warera
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
dev: true dev: true
@ -6287,7 +6257,7 @@ packages:
'@types/eslint': 8.4.10 '@types/eslint': 8.4.10
eslint: 8.28.0 eslint: 8.28.0
rollup: 2.79.1 rollup: 2.79.1
vite: 3.2.4_ajklay5k626t46b6fyghkbup3i vite: 3.2.4_clvymlzunojxjbv3h6i2warera
dev: true dev: true
/vite-plugin-html/3.2.0_vite@3.2.4: /vite-plugin-html/3.2.0_vite@3.2.4:
@ -6307,7 +6277,7 @@ packages:
html-minifier-terser: 6.1.0 html-minifier-terser: 6.1.0
node-html-parser: 5.4.2 node-html-parser: 5.4.2
pathe: 0.2.0 pathe: 0.2.0
vite: 3.2.4_ajklay5k626t46b6fyghkbup3i vite: 3.2.4_clvymlzunojxjbv3h6i2warera
dev: true dev: true
/vite-plugin-progress/0.0.6_vite@3.2.4: /vite-plugin-progress/0.0.6_vite@3.2.4:
@ -6319,7 +6289,7 @@ packages:
picocolors: 1.0.0 picocolors: 1.0.0
progress: 2.0.3 progress: 2.0.3
rd: 2.0.1 rd: 2.0.1
vite: 3.2.4_ajklay5k626t46b6fyghkbup3i vite: 3.2.4_clvymlzunojxjbv3h6i2warera
dev: true dev: true
/vite-plugin-purge-icons/0.9.1_vite@3.2.4: /vite-plugin-purge-icons/0.9.1_vite@3.2.4:
@ -6331,7 +6301,7 @@ packages:
'@purge-icons/core': 0.9.1 '@purge-icons/core': 0.9.1
'@purge-icons/generated': 0.9.0 '@purge-icons/generated': 0.9.0
rollup-plugin-purge-icons: 0.9.1 rollup-plugin-purge-icons: 0.9.1
vite: 3.2.4_ajklay5k626t46b6fyghkbup3i vite: 3.2.4_clvymlzunojxjbv3h6i2warera
transitivePeerDependencies: transitivePeerDependencies:
- encoding - encoding
- supports-color - supports-color
@ -6349,7 +6319,7 @@ packages:
fs-extra: 10.1.0 fs-extra: 10.1.0
magic-string: 0.25.9 magic-string: 0.25.9
pathe: 0.2.0 pathe: 0.2.0
vite: 3.2.4_ajklay5k626t46b6fyghkbup3i vite: 3.2.4_clvymlzunojxjbv3h6i2warera
dev: true dev: true
/vite-plugin-svg-icons/2.0.1_vite@3.2.4: /vite-plugin-svg-icons/2.0.1_vite@3.2.4:
@ -6365,7 +6335,7 @@ packages:
pathe: 0.2.0 pathe: 0.2.0
svg-baker: 1.7.0 svg-baker: 1.7.0
svgo: 2.8.0 svgo: 2.8.0
vite: 3.2.4_ajklay5k626t46b6fyghkbup3i vite: 3.2.4_clvymlzunojxjbv3h6i2warera
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
dev: true dev: true
@ -6377,7 +6347,7 @@ packages:
dependencies: dependencies:
'@vue/compiler-sfc': 3.2.45 '@vue/compiler-sfc': 3.2.45
magic-string: 0.25.9 magic-string: 0.25.9
vite: 3.2.4_ajklay5k626t46b6fyghkbup3i vite: 3.2.4_clvymlzunojxjbv3h6i2warera
dev: true dev: true
/vite-plugin-windicss/1.8.8_vite@3.2.4: /vite-plugin-windicss/1.8.8_vite@3.2.4:
@ -6388,13 +6358,13 @@ packages:
'@windicss/plugin-utils': 1.8.8 '@windicss/plugin-utils': 1.8.8
debug: 4.3.4 debug: 4.3.4
kolorist: 1.6.0 kolorist: 1.6.0
vite: 3.2.4_ajklay5k626t46b6fyghkbup3i vite: 3.2.4_clvymlzunojxjbv3h6i2warera
windicss: 3.5.6 windicss: 3.5.6
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
dev: true dev: true
/vite/3.2.4_ajklay5k626t46b6fyghkbup3i: /vite/3.2.4_clvymlzunojxjbv3h6i2warera:
resolution: {integrity: sha512-Z2X6SRAffOUYTa+sLy3NQ7nlHFU100xwanq1WDwqaiFiCe+25zdxP1TfCS5ojPV2oDDcXudHIoPnI1Z/66B7Yw==} resolution: {integrity: sha512-Z2X6SRAffOUYTa+sLy3NQ7nlHFU100xwanq1WDwqaiFiCe+25zdxP1TfCS5ojPV2oDDcXudHIoPnI1Z/66B7Yw==}
engines: {node: ^14.18.0 || >=16.0.0} engines: {node: ^14.18.0 || >=16.0.0}
hasBin: true hasBin: true
@ -6419,7 +6389,7 @@ packages:
terser: terser:
optional: true optional: true
dependencies: dependencies:
'@types/node': 18.11.9 '@types/node': registry.npmmirror.com/@types/node/18.11.10
esbuild: 0.15.14 esbuild: 0.15.14
postcss: 8.4.19 postcss: 8.4.19
resolve: 1.22.1 resolve: 1.22.1
@ -6764,6 +6734,21 @@ packages:
dev: true dev: true
optional: true optional: true
registry.npmmirror.com/@iconify/json/2.1.146:
resolution: {integrity: sha512-wIGCtWvxNjWbHPOuJK1e7VaRn0EVrcpzTyC1TaSDRJFsBoGki9Z2NEPEPOS4VaEukh8MLHzLor1IMGgiLhfohg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@iconify/json/-/json-2.1.146.tgz}
name: '@iconify/json'
version: 2.1.146
dependencies:
'@iconify/types': registry.npmmirror.com/@iconify/types/2.0.0
pathe: registry.npmmirror.com/pathe/0.3.9
dev: true
registry.npmmirror.com/@iconify/types/2.0.0:
resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@iconify/types/-/types-2.0.0.tgz}
name: '@iconify/types'
version: 2.0.0
dev: true
registry.npmmirror.com/@intlify/message-compiler/9.3.0-beta.10: registry.npmmirror.com/@intlify/message-compiler/9.3.0-beta.10:
resolution: {integrity: sha512-RoOC6yceOykLRhN0NlbkNOBUx1el6iphx3W8NfOx3jHVNtfT1FYokx14/5sU3F1F0uxeG4sp6q+ppKvaF8o+ww==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@intlify/message-compiler/-/message-compiler-9.3.0-beta.10.tgz} resolution: {integrity: sha512-RoOC6yceOykLRhN0NlbkNOBUx1el6iphx3W8NfOx3jHVNtfT1FYokx14/5sU3F1F0uxeG4sp6q+ppKvaF8o+ww==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@intlify/message-compiler/-/message-compiler-9.3.0-beta.10.tgz}
name: '@intlify/message-compiler' name: '@intlify/message-compiler'
@ -6793,6 +6778,24 @@ packages:
version: 2.11.7 version: 2.11.7
dev: false dev: false
registry.npmmirror.com/@types/node/10.17.60:
resolution: {integrity: sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/node/-/node-10.17.60.tgz}
name: '@types/node'
version: 10.17.60
dev: true
registry.npmmirror.com/@types/node/14.18.33:
resolution: {integrity: sha512-qelS/Ra6sacc4loe/3MSjXNL1dNQ/GjxNHVzuChwMfmk7HuycRLVQN2qNY3XahK+fZc5E2szqQSKUyAF0E+2bg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/node/-/node-14.18.33.tgz}
name: '@types/node'
version: 14.18.33
dev: true
registry.npmmirror.com/@types/node/18.11.10:
resolution: {integrity: sha512-juG3RWMBOqcOuXC643OAdSA525V44cVgGV6dUDuiFtss+8Fk5x1hI93Rsld43VeJVIeqlP9I7Fn9/qaVqoEAuQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/node/-/node-18.11.10.tgz}
name: '@types/node'
version: 18.11.10
dev: true
registry.npmmirror.com/@volar/language-core/1.0.10: registry.npmmirror.com/@volar/language-core/1.0.10:
resolution: {integrity: sha512-7WNzjvdUXjggEZvYu9EInABl4mvXtyiiaJDOJM+plHJT7xW5voLja0BrYYji6TUn8Q4HakLvTPpQddPLq134mg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@volar/language-core/-/language-core-1.0.10.tgz} resolution: {integrity: sha512-7WNzjvdUXjggEZvYu9EInABl4mvXtyiiaJDOJM+plHJT7xW5voLja0BrYYji6TUn8Q4HakLvTPpQddPLq134mg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@volar/language-core/-/language-core-1.0.10.tgz}
name: '@volar/language-core' name: '@volar/language-core'
@ -7227,6 +7230,12 @@ packages:
hasBin: true hasBin: true
dev: true dev: true
registry.npmmirror.com/pathe/0.3.9:
resolution: {integrity: sha512-6Y6s0vT112P3jD8dGfuS6r+lpa0qqNrLyHPOwvXMnyNTQaYiwgau2DP3aNDsR13xqtGj7rrPo+jFUATpU6/s+g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/pathe/-/pathe-0.3.9.tgz}
name: pathe
version: 0.3.9
dev: true
registry.npmmirror.com/picocolors/1.0.0: registry.npmmirror.com/picocolors/1.0.0:
resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/picocolors/-/picocolors-1.0.0.tgz} resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/picocolors/-/picocolors-1.0.0.tgz}
name: picocolors name: picocolors

View File

@ -1,31 +1,33 @@
import Cookies from 'js-cookie' import { useCache } from '@/hooks/web/useCache'
import { TokenType } from '@/api/login/types' import { TokenType } from '@/api/login/types'
import { decrypt, encrypt } from '@/utils/jsencrypt' import { decrypt, encrypt } from '@/utils/jsencrypt'
const { wsCache } = useCache()
const AccessTokenKey = 'ACCESS_TOKEN' const AccessTokenKey = 'ACCESS_TOKEN'
const RefreshTokenKey = 'REFRESH_TOKEN' const RefreshTokenKey = 'REFRESH_TOKEN'
// 获取token // 获取token
export const getAccessToken = () => { export const getAccessToken = () => {
// 此处与TokenKey相同此写法解决初始化时Cookies中不存在TokenKey报错 // 此处与TokenKey相同此写法解决初始化时Cookies中不存在TokenKey报错
return Cookies.get(AccessTokenKey) ? Cookies.get(AccessTokenKey) : Cookies.get('ACCESS_TOKEN') return wsCache.get(AccessTokenKey) ? wsCache.get(AccessTokenKey) : wsCache.get('ACCESS_TOKEN')
} }
// 刷新token // 刷新token
export const getRefreshToken = () => { export const getRefreshToken = () => {
return Cookies.get(RefreshTokenKey) return wsCache.get(RefreshTokenKey)
} }
// 设置token // 设置token
export const setToken = (token: TokenType) => { export const setToken = (token: TokenType) => {
Cookies.set(RefreshTokenKey, token.refreshToken, token.expiresTime) wsCache.set(RefreshTokenKey, token.refreshToken, { exp: token.expiresTime })
Cookies.set(AccessTokenKey, token.accessToken) wsCache.set(AccessTokenKey, token.accessToken)
} }
// 删除token // 删除token
export const removeToken = () => { export const removeToken = () => {
Cookies.remove(AccessTokenKey) wsCache.delete(AccessTokenKey)
Cookies.remove(RefreshTokenKey) wsCache.delete(RefreshTokenKey)
} }
/** 格式化tokenjwt格式 */ /** 格式化tokenjwt格式 */
@ -39,40 +41,40 @@ const PasswordKey = 'PASSWORD'
const RememberMeKey = 'REMEMBER_ME' const RememberMeKey = 'REMEMBER_ME'
export const getUsername = () => { export const getUsername = () => {
return Cookies.get(UsernameKey) return wsCache.get(UsernameKey)
} }
export const setUsername = (username: string) => { export const setUsername = (username: string) => {
Cookies.set(UsernameKey, username) wsCache.set(UsernameKey, username)
} }
export const removeUsername = () => { export const removeUsername = () => {
Cookies.remove(UsernameKey) wsCache.delete(UsernameKey)
} }
export const getPassword = () => { export const getPassword = () => {
const password = Cookies.get(PasswordKey) const password = wsCache.get(PasswordKey)
return password ? decrypt(password) : undefined return password ? decrypt(password) : undefined
} }
export const setPassword = (password: string) => { export const setPassword = (password: string) => {
Cookies.set(PasswordKey, encrypt(password)) wsCache.set(PasswordKey, encrypt(password))
} }
export const removePassword = () => { export const removePassword = () => {
Cookies.remove(PasswordKey) wsCache.delete(PasswordKey)
} }
export const getRememberMe = () => { export const getRememberMe = () => {
return Cookies.get(RememberMeKey) === 'true' return wsCache.get(RememberMeKey) === 'true'
} }
export const setRememberMe = (rememberMe: string) => { export const setRememberMe = (rememberMe: string) => {
Cookies.set(RememberMeKey, rememberMe) wsCache.set(RememberMeKey, rememberMe)
} }
export const removeRememberMe = () => { export const removeRememberMe = () => {
Cookies.remove(RememberMeKey) wsCache.delete(RememberMeKey)
} }
// ========== 租户相关 ========== // ========== 租户相关 ==========
@ -81,25 +83,25 @@ const TenantIdKey = 'TENANT_ID'
const TenantNameKey = 'TENANT_NAME' const TenantNameKey = 'TENANT_NAME'
export const getTenantName = () => { export const getTenantName = () => {
return Cookies.get(TenantNameKey) return wsCache.get(TenantNameKey)
} }
export const setTenantName = (username: string) => { export const setTenantName = (username: string) => {
Cookies.set(TenantNameKey, username) wsCache.set(TenantNameKey, username)
} }
export const removeTenantName = () => { export const removeTenantName = () => {
Cookies.remove(TenantNameKey) wsCache.delete(TenantNameKey)
} }
export const getTenantId = () => { export const getTenantId = () => {
return Cookies.get(TenantIdKey) return wsCache.get(TenantIdKey)
} }
export const setTenantId = (username: string) => { export const setTenantId = (username: string) => {
Cookies.set(TenantIdKey, username) wsCache.set(TenantIdKey, username)
} }
export const removeTenantId = () => { export const removeTenantId = () => {
Cookies.remove(TenantIdKey) wsCache.delete(TenantIdKey)
} }

View File

@ -150,11 +150,11 @@ import {
ElDivider, ElDivider,
ElLoading ElLoading
} from 'element-plus' } from 'element-plus'
import Cookies from 'js-cookie'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import type { RouteLocationNormalizedLoaded } from 'vue-router' import type { RouteLocationNormalizedLoaded } from 'vue-router'
import { useI18n } from '@/hooks/web/useI18n' import { useI18n } from '@/hooks/web/useI18n'
import { useIcon } from '@/hooks/web/useIcon' import { useIcon } from '@/hooks/web/useIcon'
import { useCache } from '@/hooks/web/useCache'
import { required } from '@/utils/formRules' import { required } from '@/utils/formRules'
import { setToken, setTenantId } from '@/utils/auth' import { setToken, setTenantId } from '@/utils/auth'
import { decrypt, encrypt } from '@/utils/jsencrypt' import { decrypt, encrypt } from '@/utils/jsencrypt'
@ -166,6 +166,7 @@ import { LoginStateEnum, useLoginState, useFormValid } from './useLogin'
const { t } = useI18n() const { t } = useI18n()
const formLogin = ref() const formLogin = ref()
const { wsCache } = useCache()
const { validForm } = useFormValid(formLogin) const { validForm } = useFormValid(formLogin)
const { setLoginState, getLoginState } = useLoginState() const { setLoginState, getLoginState } = useLoginState()
const { currentRoute, push } = useRouter() const { currentRoute, push } = useRouter()
@ -194,10 +195,10 @@ const loginData = reactive({
signIn: false signIn: false
}, },
loginForm: { loginForm: {
tenantName: Cookies.get('tenantName') ? Cookies.get('tenantName') : '芋道源码', tenantName: wsCache.get('tenantName') ? wsCache.get('tenantName') : '芋道源码',
username: Cookies.get('username') ? Cookies.get('username') : 'admin', username: wsCache.get('username') ? wsCache.get('username') : 'admin',
password: Cookies.get('password') password: wsCache.get('password')
? (decrypt(Cookies.get('password')) as unknown as string) ? (decrypt(wsCache.get('password')) as unknown as string)
: 'admin123', : 'admin123',
captchaVerification: '', captchaVerification: '',
rememberMe: false rememberMe: false
@ -222,12 +223,12 @@ const getTenantId = async () => {
} }
// //
const getCookie = () => { const getCookie = () => {
const username = Cookies.get('username') const username = wsCache.get('username')
const password = Cookies.get('password') const password = wsCache.get('password')
? (decrypt(Cookies.get('password')) as unknown as string) ? (decrypt(wsCache.get('password')) as unknown as string)
: undefined : undefined
const rememberMe = Cookies.get('rememberMe') const rememberMe = wsCache.get('rememberMe')
const tenantName = Cookies.get('tenantName') const tenantName = wsCache.get('tenantName')
loginData.loginForm = { loginData.loginForm = {
...loginData.loginForm, ...loginData.loginForm,
username: username ? username : loginData.loginForm.username, username: username ? username : loginData.loginForm.username,
@ -256,17 +257,17 @@ const handleLogin = async (params) => {
background: 'rgba(0, 0, 0, 0.7)' background: 'rgba(0, 0, 0, 0.7)'
}) })
if (loginData.loginForm.rememberMe) { if (loginData.loginForm.rememberMe) {
Cookies.set('username', loginData.loginForm.username, { expires: 30 }) wsCache.set('username', loginData.loginForm.username, { exp: 30 * 24 * 60 * 60 })
Cookies.set('password', encrypt(loginData.loginForm.password as unknown as string), { wsCache.set('password', encrypt(loginData.loginForm.password as unknown as string), {
expires: 30 exp: 30
}) })
Cookies.set('rememberMe', loginData.loginForm.rememberMe, { expires: 30 }) wsCache.set('rememberMe', loginData.loginForm.rememberMe, { exp: 30 * 24 * 60 * 60 })
Cookies.set('tenantName', loginData.loginForm.tenantName, { expires: 30 }) wsCache.set('tenantName', loginData.loginForm.tenantName, { exp: 30 * 24 * 60 * 60 })
} else { } else {
Cookies.remove('username') wsCache.delete('username')
Cookies.remove('password') wsCache.delete('password')
Cookies.remove('rememberMe') wsCache.delete('rememberMe')
Cookies.remove('tenantName') wsCache.delete('tenantName')
} }
setToken(res) setToken(res)
if (!redirect.value) { if (!redirect.value) {

View File

@ -142,25 +142,30 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
optimizeDeps: { optimizeDeps: {
include: [ include: [
'vue', 'vue',
'sass',
'vue-router', 'vue-router',
'vue-types', 'vue-types',
'vue-i18n', 'vue-i18n',
'vxe-table', 'vxe-table',
'vxe-table/es/style',
'xe-utils', 'xe-utils',
'lodash-es', 'lodash-es',
'element-plus/es', 'element-plus',
'element-plus/es/locale/lang/zh-cn', 'element-plus/es/locale/lang/zh-cn',
'element-plus/es/locale/lang/en', 'element-plus/es/locale/lang/en',
'@iconify/iconify', '@iconify/iconify',
'@vueuse/core', '@vueuse/core',
'axios',
'qs', 'qs',
'axios',
'pinia',
'dayjs', 'dayjs',
'echarts', 'qrcode',
'echarts/core',
'echarts/charts',
'echarts/components',
'echarts/renderers',
'echarts-wordcloud', 'echarts-wordcloud',
'intro.js', 'intro.js',
'qrcode',
'pinia',
'crypto-js', 'crypto-js',
'@wangeditor/editor', '@wangeditor/editor',
'@wangeditor/editor-for-vue' '@wangeditor/editor-for-vue'