From 94e677a7dcd704cfd9bdc5d06a10ea2dc6d89853 Mon Sep 17 00:00:00 2001 From: buqiyuan <1743369777@qq.com> Date: Fri, 15 Mar 2024 21:41:04 +0800 Subject: [PATCH] perf: lockscreen page --- package.json | 7 +- pnpm-lock.yaml | 312 +++++++++++------- src/components/basic/lockscreen/index.vue | 6 + .../basic/lockscreen/lockscreen-page.vue | 169 ++++------ .../src/components/table-settings/index.vue | 2 +- src/router/router-guards.ts | 11 +- src/store/index.ts | 7 + src/store/modules/layoutSetting.ts | 100 +++--- src/store/modules/lockscreen.ts | 83 +++-- src/store/modules/user.ts | 273 ++++++++------- src/utils/common.ts | 36 -- src/utils/request.ts | 9 +- 12 files changed, 533 insertions(+), 482 deletions(-) diff --git a/package.json b/package.json index 643383b93..093734ba5 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ "@vueuse/core": "~10.9.0", "ant-design-vue": "~4.1.2", "axios": "~1.6.7", + "crypto-js": "^4.2.0", "dayjs": "~1.11.10", "echarts": "^5.5.0", "file-saver": "~2.0.5", @@ -52,6 +53,7 @@ "mitt": "~3.0.1", "nprogress": "~1.0.0-1", "pinia": "~2.1.7", + "pinia-plugin-persistedstate": "^3.2.1", "qiniu-js": "^3.4.2", "qs": "~6.12.0", "sortablejs": "~1.15.2", @@ -68,12 +70,13 @@ "@admin-pkg/components": "workspace:^", "@admin-pkg/vite-plugin-msw": "workspace:^", "@admin-pkg/vite-plugin-tinymce-resource": "workspace:^", - "@commitlint/cli": "~19.1.0", + "@commitlint/cli": "~19.2.0", "@commitlint/config-conventional": "~19.1.0", "@faker-js/faker": "^8.4.1", "@iconify-json/ant-design": "^1.1.15", "@iconify-json/ep": "^1.1.15", "@iconify/json": "^2.2.191", + "@types/crypto-js": "^4.2.2", "@types/lodash-es": "~4.17.12", "@types/node": "~20.11.16", "@typescript-eslint/eslint-plugin": "~7.2.0", @@ -110,7 +113,7 @@ "stylelint-order": "~6.0.4", "stylelint-prettier": "^5.0.0", "typescript": "~5.4.2", - "unocss": "^0.58.5", + "unocss": "^0.58.6", "unplugin-vue-components": "~0.26.0", "vite": "~5.1.6", "vite-plugin-checker": "~0.6.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bb263b093..91eef0f9b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -26,6 +26,9 @@ importers: axios: specifier: ~1.6.7 version: 1.6.7(debug@4.3.4) + crypto-js: + specifier: ^4.2.0 + version: 4.2.0 dayjs: specifier: ~1.11.10 version: 1.11.10 @@ -47,6 +50,9 @@ importers: pinia: specifier: ~2.1.7 version: 2.1.7(typescript@5.4.2)(vue@3.4.21) + pinia-plugin-persistedstate: + specifier: ^3.2.1 + version: 3.2.1(pinia@2.1.7) qiniu-js: specifier: ^3.4.2 version: 3.4.2 @@ -91,8 +97,8 @@ importers: specifier: workspace:^ version: link:packages/vite-plugin-tinymce-resource '@commitlint/cli': - specifier: ~19.1.0 - version: 19.1.0(@types/node@20.11.26)(typescript@5.4.2) + specifier: ~19.2.0 + version: 19.2.0(@types/node@20.11.26)(typescript@5.4.2) '@commitlint/config-conventional': specifier: ~19.1.0 version: 19.1.0 @@ -108,6 +114,9 @@ importers: '@iconify/json': specifier: ^2.2.191 version: 2.2.191 + '@types/crypto-js': + specifier: ^4.2.2 + version: 4.2.2 '@types/lodash-es': specifier: ~4.17.12 version: 4.17.12 @@ -217,8 +226,8 @@ importers: specifier: ~5.4.2 version: 5.4.2 unocss: - specifier: ^0.58.5 - version: 0.58.5(postcss@8.4.35)(vite@5.1.6) + specifier: ^0.58.6 + version: 0.58.6(postcss@8.4.35)(vite@5.1.6) unplugin-vue-components: specifier: ~0.26.0 version: 0.26.0(vue@3.4.21) @@ -1679,15 +1688,15 @@ packages: dependencies: statuses: 2.0.1 - /@commitlint/cli@19.1.0(@types/node@20.11.26)(typescript@5.4.2): - resolution: {integrity: sha512-SYGm8HGbVzrlSYeB6oo6pG1Ec6bOMJcDsXgNGa4vgZQsPj6nJkcbTWlIRmtmIk0tHi0d5sCljGuQ+g/0NCPv7w==} + /@commitlint/cli@19.2.0(@types/node@20.11.26)(typescript@5.4.2): + resolution: {integrity: sha512-8XnQDMyQR+1/ldbmIyhonvnDS2enEw48Wompo/967fsEvy9Vj5/JbDutzmSBKxANWDVeEbR9QQm0yHpw6ArrFw==} engines: {node: '>=v18'} hasBin: true dependencies: '@commitlint/format': 19.0.3 '@commitlint/lint': 19.1.0 - '@commitlint/load': 19.1.0(@types/node@20.11.26)(typescript@5.4.2) - '@commitlint/read': 19.0.3 + '@commitlint/load': 19.2.0(@types/node@20.11.26)(typescript@5.4.2) + '@commitlint/read': 19.2.0 '@commitlint/types': 19.0.3 execa: 8.0.1 yargs: 17.7.2 @@ -1758,6 +1767,7 @@ packages: /@commitlint/load@19.1.0(@types/node@20.11.26)(typescript@5.4.2): resolution: {integrity: sha512-rWqnvNDpeshX8JfUC/qjpDkQB78qF+4uHcJmIRJMwvlj6zWce08SP/TPKN3GlNKgXhAawwcAPxXL9qOTTdiOBA==} engines: {node: '>=v18'} + requiresBuild: true dependencies: '@commitlint/config-validator': 19.0.3 '@commitlint/execute-rule': 19.0.0 @@ -1773,6 +1783,26 @@ packages: - '@types/node' - typescript dev: true + optional: true + + /@commitlint/load@19.2.0(@types/node@20.11.26)(typescript@5.4.2): + resolution: {integrity: sha512-XvxxLJTKqZojCxaBQ7u92qQLFMMZc4+p9qrIq/9kJDy8DOrEa7P1yx7Tjdc2u2JxIalqT4KOGraVgCE7eCYJyQ==} + engines: {node: '>=v18'} + dependencies: + '@commitlint/config-validator': 19.0.3 + '@commitlint/execute-rule': 19.0.0 + '@commitlint/resolve-extends': 19.1.0 + '@commitlint/types': 19.0.3 + chalk: 5.3.0 + cosmiconfig: 9.0.0(typescript@5.4.2) + cosmiconfig-typescript-loader: 5.0.0(@types/node@20.11.26)(cosmiconfig@9.0.0)(typescript@5.4.2) + lodash.isplainobject: 4.0.6 + lodash.merge: 4.6.2 + lodash.uniq: 4.5.0 + transitivePeerDependencies: + - '@types/node' + - typescript + dev: true /@commitlint/message@19.0.0: resolution: {integrity: sha512-c9czf6lU+9oF9gVVa2lmKaOARJvt4soRsVmbR7Njwp9FpbBgste5i7l/2l5o8MmbwGh4yE1snfnsy2qyA2r/Fw==} @@ -1788,12 +1818,13 @@ packages: conventional-commits-parser: 5.0.0 dev: true - /@commitlint/read@19.0.3: - resolution: {integrity: sha512-b5AflTyAXkUx5qKw4TkjjcOccXZHql3JqMi522knTQktq2AubKXFz60Sws+K4FsefwPws6fGz9mqiI/NvsvxFA==} + /@commitlint/read@19.2.0: + resolution: {integrity: sha512-HlGeEd/jyp2a5Fb9mvtsaDm5hFCmj80dJYjLQkpG3DzWneWBc37YU3kM8Za1D1HUazZaTkdsWq73M3XDE4CvCA==} engines: {node: '>=v18'} dependencies: '@commitlint/top-level': 19.0.0 '@commitlint/types': 19.0.3 + execa: 8.0.1 git-raw-commits: 4.0.0 minimist: 1.2.8 dev: true @@ -2675,6 +2706,10 @@ packages: /@types/cookie@0.6.0: resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} + /@types/crypto-js@4.2.2: + resolution: {integrity: sha512-sDOLlVbHhXpAUAL0YHDUUwDZf3iN4Bwi4W6a0W0b+QcAezUbRtH4FVb+9J4h+XFPW7l/gQ9F8qC7P+Ec4k8QVQ==} + dev: true + /@types/eslint@7.29.0: resolution: {integrity: sha512-VNcvioYDH8/FxaeTKkM4/TiTwt6pBV9E3OfGmvaw8tPl0rrHCJ4Ll15HRT+pMiFAf/MLQvAzC+6RzUMEL9Ceng==} dependencies: @@ -3159,32 +3194,32 @@ packages: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true - /@unocss/astro@0.58.5(vite@5.1.6): - resolution: {integrity: sha512-LtuVnj8oFAK9663OVhQO8KpdJFiOyyPsYfnOZlDCOFK3gHb/2WMrzdBwr1w8LoQF3bDedkFMKirVF7gWjyZiaw==} + /@unocss/astro@0.58.6(vite@5.1.6): + resolution: {integrity: sha512-0BvbhEp5Ln6wFNnhISusB2hcfycWkdgnjlFMcLT69efvj4G39MzB6JYT/1qiidLfpj35HcqkpBz7TfZ4bUmOAw==} peerDependencies: vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 peerDependenciesMeta: vite: optional: true dependencies: - '@unocss/core': 0.58.5 - '@unocss/reset': 0.58.5 - '@unocss/vite': 0.58.5(vite@5.1.6) + '@unocss/core': 0.58.6 + '@unocss/reset': 0.58.6 + '@unocss/vite': 0.58.6(vite@5.1.6) vite: 5.1.6(@types/node@20.11.26)(less@4.2.0) transitivePeerDependencies: - rollup dev: true - /@unocss/cli@0.58.5: - resolution: {integrity: sha512-FzVVXO9ghsGtJpu9uR4o7JeM9gUfWNbVZZ/IfH+0WbDJuyx4rO/jwN55z0yA5QDkhvOz9DvzwPCBzLpTJ5q+Lw==} + /@unocss/cli@0.58.6: + resolution: {integrity: sha512-cfJBiEAKElo9vcA4ZU1WTXeUha5qVBtn3+ZjgdgOvveSX0oY0gOheG+DD2LaEjwWzjCstFU38lblUHWzHRv0sQ==} engines: {node: '>=14'} hasBin: true dependencies: '@ampproject/remapping': 2.3.0 '@rollup/pluginutils': 5.1.0 - '@unocss/config': 0.58.5 - '@unocss/core': 0.58.5 - '@unocss/preset-uno': 0.58.5 + '@unocss/config': 0.58.6 + '@unocss/core': 0.58.6 + '@unocss/preset-uno': 0.58.6 cac: 6.7.14 chokidar: 3.6.0 colorette: 2.0.20 @@ -3197,174 +3232,174 @@ packages: - rollup dev: true - /@unocss/config@0.58.5: - resolution: {integrity: sha512-O1pLSeNXfG11QHaLSVwS9rJKvE4b9304IQ3UvOdbYN+7SAT4YTZ7JDU4ngO1KWyOFBO6RD0WspCR95pgqOqJiQ==} + /@unocss/config@0.58.6: + resolution: {integrity: sha512-YyywfigaEzGkDJ0ztp/tvruD+0xfdCcMZUvaGH4IElAwZDdcSsuaHdR1HW3EixCETOyFHBcuFk6sJwfLPIZLTw==} engines: {node: '>=14'} dependencies: - '@unocss/core': 0.58.5 + '@unocss/core': 0.58.6 unconfig: 0.3.11 dev: true - /@unocss/core@0.58.5: - resolution: {integrity: sha512-qbPqL+46hf1/UelQOwUwpAuvm6buoss43DPYHOPdfNJ+NTWkSpATQMF0JKT04QE0QRQbHNSHdMe9ariG+IIlCw==} + /@unocss/core@0.58.6: + resolution: {integrity: sha512-m87iuENM/PLqLKnfE2mJbpfzj7NQ99LP2go0r+x5X4kXKppyGRJNQg6RIW3AqTS22jup1YPgd62UNXvvRtHtww==} dev: true - /@unocss/extractor-arbitrary-variants@0.58.5: - resolution: {integrity: sha512-KJQX0OJKzy4YjJo09h2la2Q+cn5IJ1JdyPVJJkzovHnv7jSBWzsfct+bj/6a+SJ4p4JBIqEJz3M/qxHv4EPJyA==} + /@unocss/extractor-arbitrary-variants@0.58.6: + resolution: {integrity: sha512-iSrjLEM+dtcpCmJ8myttPZ/0Dg4HKYVYpM71rNTybrX1HB/cfRsGwIHobjsvvRnve+LAxC4Hmdi8EXRd8V1xPg==} dependencies: - '@unocss/core': 0.58.5 + '@unocss/core': 0.58.6 dev: true - /@unocss/inspector@0.58.5: - resolution: {integrity: sha512-cbJlIHEZ14puTtttf7sl+VZFDscV1DJiSseh9sSe0xJ/1NVBT9Bvkm09/1tnpLYAgF5gfa1CaCcjKmURgYzKrA==} + /@unocss/inspector@0.58.6: + resolution: {integrity: sha512-JCcnIwSofdIdpR/GYTZ78d4dMZP8Z2oF/g9f9MlPG96LLLwqXSmYtR83vC34fUWm1hz7FZyTLK5OqTV7VfUb+w==} dependencies: - '@unocss/core': 0.58.5 - '@unocss/rule-utils': 0.58.5 + '@unocss/core': 0.58.6 + '@unocss/rule-utils': 0.58.6 gzip-size: 6.0.0 sirv: 2.0.4 dev: true - /@unocss/postcss@0.58.5(postcss@8.4.35): - resolution: {integrity: sha512-m4L2YRdYfT6CV306Kl2VwEwbqa/92EpW4GE2Kqak1RuJyFJXBnWEEMJV4Uy6B1jWKLlCEWkuVUW33JUg7X6BxQ==} + /@unocss/postcss@0.58.6(postcss@8.4.35): + resolution: {integrity: sha512-jTwu7llhRm7luscsk0JekCeo6RS2W98CXiCJRE1H6IDQnjGQQ/9uRAqW4wuLsv7OQ1ThF8m9NKEj0wFJv7ePNg==} engines: {node: '>=14'} peerDependencies: postcss: ^8.4.21 || 5 dependencies: - '@unocss/config': 0.58.5 - '@unocss/core': 0.58.5 - '@unocss/rule-utils': 0.58.5 + '@unocss/config': 0.58.6 + '@unocss/core': 0.58.6 + '@unocss/rule-utils': 0.58.6 css-tree: 2.3.1 fast-glob: 3.3.2 magic-string: 0.30.8 postcss: 8.4.35 dev: true - /@unocss/preset-attributify@0.58.5: - resolution: {integrity: sha512-OR4gUHamHCb4/LB/zZHlibaraTyILfFvRIzgmJnEb6lITGApQUl86qaJcTbTyfTfLVRufLG/JVeuz2HLUBPRXw==} + /@unocss/preset-attributify@0.58.6: + resolution: {integrity: sha512-IW2aIBH0RiYsP50VckgxXhMwjDk/XVZykUUklgko9aT+gNC2xDBm3936RWLVLmHdBHG1Vnnjc71BG6aUAqrtEA==} dependencies: - '@unocss/core': 0.58.5 + '@unocss/core': 0.58.6 dev: true - /@unocss/preset-icons@0.58.5: - resolution: {integrity: sha512-LDNXavHtWaIvMvBezT9O8yiqHJChVCEfTRO6YFVY0yy+wo5jHiuMh6iKeHVcwbYdn3NqHYmpi7b/hrXPMtODzA==} + /@unocss/preset-icons@0.58.6: + resolution: {integrity: sha512-20P1ISxEX2J5mhyNkMm0nKp2p0qJfmDArolC10Fjyl+GUTCsojDNFfonzQEkHeIIJwzgRcubdtNaotTgYSKSRg==} dependencies: '@iconify/utils': 2.1.22 - '@unocss/core': 0.58.5 + '@unocss/core': 0.58.6 ofetch: 1.3.3 transitivePeerDependencies: - supports-color dev: true - /@unocss/preset-mini@0.58.5: - resolution: {integrity: sha512-WqD31fKUAN28OCUOyi1uremmLk0eTMqtCizjbbXsY/DP6RKYUT7trFAtppTcHWFhSQcknb4FURfAZppACsTVQQ==} + /@unocss/preset-mini@0.58.6: + resolution: {integrity: sha512-COaM/04Z6/gawzrFcCwoyD6t0FCpuKRyljKKs3VxitoGxsN9BHKiFE3U/cPSQarpG789rmZg8D/wmLHCChSXvg==} dependencies: - '@unocss/core': 0.58.5 - '@unocss/extractor-arbitrary-variants': 0.58.5 - '@unocss/rule-utils': 0.58.5 + '@unocss/core': 0.58.6 + '@unocss/extractor-arbitrary-variants': 0.58.6 + '@unocss/rule-utils': 0.58.6 dev: true - /@unocss/preset-tagify@0.58.5: - resolution: {integrity: sha512-UB9IXi8vA/SzmmRLMWR7bzeBpxpiRo7y9xk3ruvDddYlsyiwIeDIMwG23YtcA6q41FDQvkrmvTxUEH9LFlv6aA==} + /@unocss/preset-tagify@0.58.6: + resolution: {integrity: sha512-xhpHMz8KLrFlLXaOCeShu0/yVpe6J8bd2WcOTd5VuU5W1uCsplcaagpfTRkBpaH1tJt/MTTU5e4cQLa20l0JZQ==} dependencies: - '@unocss/core': 0.58.5 + '@unocss/core': 0.58.6 dev: true - /@unocss/preset-typography@0.58.5: - resolution: {integrity: sha512-rFny4a9yxgY34XOom5euCqQaOLV8PpbTg0Pn+5FelUMG4OfMevTwBCe9JttFJcUc3cNTL2enkzIdMa3l66114g==} + /@unocss/preset-typography@0.58.6: + resolution: {integrity: sha512-s4SSw3SK/JjAqYlga51XnxzPc7jF+TmkEkW09IkYYLPrmqJ76U4i5Po2N7HzyjpVGWnmIp1fQ5mCvbhj4tNyNQ==} dependencies: - '@unocss/core': 0.58.5 - '@unocss/preset-mini': 0.58.5 + '@unocss/core': 0.58.6 + '@unocss/preset-mini': 0.58.6 dev: true - /@unocss/preset-uno@0.58.5: - resolution: {integrity: sha512-vgq/R4f7RDmdROy+pX+PeE38I3SgYKd4LL7Wb1HJUaVwz7PkF0XHCynOTbwrPXnK1kp1cnZYYEww7/RiYp+IQQ==} + /@unocss/preset-uno@0.58.6: + resolution: {integrity: sha512-QFbgvxCvTFqKIA/VGcPM+XcfPGDgbmaiXKbnh7hIbkER6TRxjt4DIGapPt150w/kQT+zC/jerWditSdyn+s3xQ==} dependencies: - '@unocss/core': 0.58.5 - '@unocss/preset-mini': 0.58.5 - '@unocss/preset-wind': 0.58.5 - '@unocss/rule-utils': 0.58.5 + '@unocss/core': 0.58.6 + '@unocss/preset-mini': 0.58.6 + '@unocss/preset-wind': 0.58.6 + '@unocss/rule-utils': 0.58.6 dev: true - /@unocss/preset-web-fonts@0.58.5: - resolution: {integrity: sha512-WKZ5raSClFXhqzfAhApef3+fuMq6cjKBxvhJ1FBIxFKcSOvN8e2czty2iGQVl02yMsxBWMv0Bpfm7np+cCoI1w==} + /@unocss/preset-web-fonts@0.58.6: + resolution: {integrity: sha512-W/8102vurABwfnb9QQyp9GBKP80kpy/IADSM7hbqLNaqmgxHASELXkjhqqt+et39Zn2tnXpIHNVWoqG6QNWBwQ==} dependencies: - '@unocss/core': 0.58.5 + '@unocss/core': 0.58.6 ofetch: 1.3.3 dev: true - /@unocss/preset-wind@0.58.5: - resolution: {integrity: sha512-54RkjLmlqMUlC8o8nDCVzB25D1zzK4eth+/3uQzt739qU0U92NxuZKY21ADj9Rp/mVhKBV5FKuXPjmYc6yTQRQ==} + /@unocss/preset-wind@0.58.6: + resolution: {integrity: sha512-zs41CpFVvLB8CutroUeI1iqxzPsztiur9ei0QjRshxpYerPSsTSgdTkF+eul5D1q3BcsebLebzqtCSqnpFOuOA==} dependencies: - '@unocss/core': 0.58.5 - '@unocss/preset-mini': 0.58.5 - '@unocss/rule-utils': 0.58.5 + '@unocss/core': 0.58.6 + '@unocss/preset-mini': 0.58.6 + '@unocss/rule-utils': 0.58.6 dev: true - /@unocss/reset@0.58.5: - resolution: {integrity: sha512-2wMrkCj3SSb5hrx9TKs5jZa34QIRkHv9FotbJutAPo7o8hx+XXn56ogzdoUrcFPJZJUx2R2nyOVbSlGMIjtFtw==} + /@unocss/reset@0.58.6: + resolution: {integrity: sha512-mYyOe5QDRHc1BBRff+G97j3SGGC8s3Vk7cCcXc/l48FvPHKtLCphMZaBS+KkGkzWqwAtxv0QRbGhTixJCVDRug==} dev: true - /@unocss/rule-utils@0.58.5: - resolution: {integrity: sha512-w0sGJoeUGwMWLVFLEE9PDiv/fQcQqZnTIIQLYNCjTdqXDRlwTp9ACW0h47x/hAAIXdOtEOOBuTfjGD79GznUmA==} + /@unocss/rule-utils@0.58.6: + resolution: {integrity: sha512-qbVDeyKzExFY/YeoIbMw/lu8PXEGJzSHrFXRumNHX5lvTu8ggAjH6p9xyvYa/YnuNU0+pFKuYxG8LNK2F8f1EQ==} engines: {node: '>=14'} dependencies: - '@unocss/core': 0.58.5 + '@unocss/core': 0.58.6 magic-string: 0.30.8 dev: true - /@unocss/scope@0.58.5: - resolution: {integrity: sha512-vSentagAwYTnThGRCjzZ6eNSSRuzdWBl21L1BbvVNM91Ss/FugQnZ1hd0m3TrVvvStYXnFVHMQ/MjCAEJ4cMYg==} + /@unocss/scope@0.58.6: + resolution: {integrity: sha512-22BDrZPOkfEKuXY4NROhY+J25TAXN+GIxZpE4IbT1Wh+dkjnMXyC85VKGzOAuY/0v0zbaj12dYkmtndueQ/04w==} dev: true - /@unocss/transformer-attributify-jsx-babel@0.58.5: - resolution: {integrity: sha512-IAWSSKN3V0D87DE8bqaaPrZBWOdWQ06QNfi9vRuQJfRWOui87ezi9+NffjcnQw/ap9xMk1O6z74/WOW3zo6uYA==} + /@unocss/transformer-attributify-jsx-babel@0.58.6: + resolution: {integrity: sha512-IVU/ZozKTFhP9z1I9ZgSKiEx3WfDFDNXbTYTqwNW2SHPmAj5Qf99kn6o7br7Kd1dnxSjKFXOmNfNGkW9AMDraA==} dependencies: '@babel/core': 7.24.0 '@babel/plugin-syntax-jsx': 7.23.3(@babel/core@7.24.0) '@babel/preset-typescript': 7.23.3(@babel/core@7.24.0) - '@unocss/core': 0.58.5 + '@unocss/core': 0.58.6 transitivePeerDependencies: - supports-color dev: true - /@unocss/transformer-attributify-jsx@0.58.5: - resolution: {integrity: sha512-sItEALyvAt3PZLd9Q1tlIATjaj3kWbS/qI3otUVsYBdZjP4UudzJ3D1fcWNL2WPlgz8KtlVzRUuxob8TQ4ibZg==} + /@unocss/transformer-attributify-jsx@0.58.6: + resolution: {integrity: sha512-S+mTR5qwMsEaq8nYtqUgYdYIIRAA4oltxfGMYGj3Gxy9V0uteyo56QNp7IOjlYxAB8Dq9jQ8GLYEQe5JlffO1A==} dependencies: - '@unocss/core': 0.58.5 + '@unocss/core': 0.58.6 dev: true - /@unocss/transformer-compile-class@0.58.5: - resolution: {integrity: sha512-4MaxjaZo1rf5uHvDGa2mbnXxAYVYoj1+oRNpL4fE3FoExS1Ka2CiNGQn/S4bHMF51vmXMSWtOzurJpPD4BaJUQ==} + /@unocss/transformer-compile-class@0.58.6: + resolution: {integrity: sha512-iung3cPA+IpBHoP6dTs9gkPN/wEVujqMZYxf6FQLjRH+v70rPxqTgaeGDyuQZAYikfDhdUZF8PJ4IUMOxEFsmw==} dependencies: - '@unocss/core': 0.58.5 + '@unocss/core': 0.58.6 dev: true - /@unocss/transformer-directives@0.58.5: - resolution: {integrity: sha512-allspF5TlT1B2bJSZ1houHScXOTaTPlatLiEmgQKzr/m93rCvktokaO5J6qeN2VXQdpTIsxdA5B8//7UkfTuIA==} + /@unocss/transformer-directives@0.58.6: + resolution: {integrity: sha512-8/+KGRmRnlkAJCRt4VqcYK16SnEr9wf1q7D9OCM2kZhk33Sx5SlsO6vjNZ1IH4c67/WviwNV6+KeS4elnQY8bA==} dependencies: - '@unocss/core': 0.58.5 - '@unocss/rule-utils': 0.58.5 + '@unocss/core': 0.58.6 + '@unocss/rule-utils': 0.58.6 css-tree: 2.3.1 dev: true - /@unocss/transformer-variant-group@0.58.5: - resolution: {integrity: sha512-SjUwGzKK5CVqn7Gg+3v3hV47ZUll7GcGu0vR3RCLO4gqEfFlZWMTHml1Sl2sY1WAca2iVcDRu+dp0RLxRG/dUA==} + /@unocss/transformer-variant-group@0.58.6: + resolution: {integrity: sha512-6IFmfzketh4j+Mc/ik4nU+Oec0cptNR+aVfZZkGb4wd2h1lH+teAT2Y/Vz2xY8rDExOrbjY5y5FgRGd16LY2Rw==} dependencies: - '@unocss/core': 0.58.5 + '@unocss/core': 0.58.6 dev: true - /@unocss/vite@0.58.5(vite@5.1.6): - resolution: {integrity: sha512-p4o1XNX1rvjmoUqSSdua8XyWNg/d+YUChDd2L/xEty+6j2qv0wUaohs3UQ87vWlv632/UmgdX+2MbrgtqthCtw==} + /@unocss/vite@0.58.6(vite@5.1.6): + resolution: {integrity: sha512-DPXCoYU/Ozqc/Jeptd41XvtW8MSgVxmtTyhpMAsm/hJuBfwIV7Fy3TZquf4V9BpaTb4ao1LVXzgXmVUmj2HXpA==} peerDependencies: vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 dependencies: '@ampproject/remapping': 2.3.0 '@rollup/pluginutils': 5.1.0 - '@unocss/config': 0.58.5 - '@unocss/core': 0.58.5 - '@unocss/inspector': 0.58.5 - '@unocss/scope': 0.58.5 - '@unocss/transformer-directives': 0.58.5 + '@unocss/config': 0.58.6 + '@unocss/core': 0.58.6 + '@unocss/inspector': 0.58.6 + '@unocss/scope': 0.58.6 + '@unocss/transformer-directives': 0.58.6 chokidar: 3.6.0 fast-glob: 3.3.2 magic-string: 0.30.8 @@ -4657,6 +4692,21 @@ packages: jiti: 1.21.0 typescript: 5.4.2 dev: true + optional: true + + /cosmiconfig-typescript-loader@5.0.0(@types/node@20.11.26)(cosmiconfig@9.0.0)(typescript@5.4.2): + resolution: {integrity: sha512-+8cK7jRAReYkMwMiG+bxhcNKiHJDM6bR9FD/nGBXOWdMLuYawjF5cGrtLilJ+LGd3ZjCXnJjR5DkfWPoIVlqJA==} + engines: {node: '>=v16'} + peerDependencies: + '@types/node': '*' + cosmiconfig: '>=8.2' + typescript: '>=4' + dependencies: + '@types/node': 20.11.26 + cosmiconfig: 9.0.0(typescript@5.4.2) + jiti: 1.21.0 + typescript: 5.4.2 + dev: true /cosmiconfig@7.1.0: resolution: {integrity: sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==} @@ -4672,6 +4722,7 @@ packages: /cosmiconfig@8.3.6(typescript@5.4.2): resolution: {integrity: sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==} engines: {node: '>=14'} + requiresBuild: true peerDependencies: typescript: '>=4.9.5' peerDependenciesMeta: @@ -4684,6 +4735,7 @@ packages: path-type: 4.0.0 typescript: 5.4.2 dev: true + optional: true /cosmiconfig@9.0.0(typescript@5.4.2): resolution: {integrity: sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==} @@ -4724,6 +4776,10 @@ packages: which: 2.0.2 dev: true + /crypto-js@4.2.0: + resolution: {integrity: sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==} + dev: false + /css-functions-list@3.2.1: resolution: {integrity: sha512-Nj5YcaGgBtuUmn1D7oHqPW0c9iui7xsTsj5lIX8ZgevdfhmjFfKB3r8moHJtNJnctnYXJyYX5I1pp90HM4TPgQ==} engines: {node: '>=12 || >=16'} @@ -6351,6 +6407,7 @@ packages: /global-directory@4.0.1: resolution: {integrity: sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==} engines: {node: '>=18'} + requiresBuild: true dependencies: ini: 4.1.1 dev: true @@ -6703,6 +6760,7 @@ packages: /import-meta-resolve@4.0.0: resolution: {integrity: sha512-okYUR7ZQPH+efeuMJGlq4f8ubUgO50kByRPyt/Cy1Io4PSRsPjxME+YlVaCOx+NIToW7hCsZNFJyTPFFKepRSA==} + requiresBuild: true dev: true /import-modules@2.1.0: @@ -6738,6 +6796,7 @@ packages: /ini@4.1.1: resolution: {integrity: sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + requiresBuild: true dev: true /inquirer@8.2.5: @@ -7494,6 +7553,7 @@ packages: /lodash.mergewith@4.6.2: resolution: {integrity: sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==} + requiresBuild: true dev: true /lodash.snakecase@4.1.1: @@ -8537,6 +8597,14 @@ packages: requiresBuild: true optional: true + /pinia-plugin-persistedstate@3.2.1(pinia@2.1.7): + resolution: {integrity: sha512-MK++8LRUsGF7r45PjBFES82ISnPzyO6IZx3CH5vyPseFLZCk1g2kgx6l/nW8pEBKxxd4do0P6bJw+mUSZIEZUQ==} + peerDependencies: + pinia: ^2.0.0 + dependencies: + pinia: 2.1.7(typescript@5.4.2)(vue@3.4.21) + dev: false + /pinia@2.1.7(typescript@5.4.2)(vue@3.4.21): resolution: {integrity: sha512-+C2AHFtcFqjPih0zpYuvof37SFxMQ7OEG2zV9jRI12i9BOy3YQVAHwdKtyyc8pDcDyIc33WCIsZaCFWU7WWxGQ==} peerDependencies: @@ -10606,11 +10674,11 @@ packages: engines: {node: '>= 10.0.0'} dev: true - /unocss@0.58.5(postcss@8.4.35)(vite@5.1.6): - resolution: {integrity: sha512-0g4P6jLgRRNnhscxw7nQ9RHGrKJ1UPPiHPet+YT3TXUcmy4mTiYgo9+kGQf5bjyrzsELJ10cT6Qz2y6g9Tls4g==} + /unocss@0.58.6(postcss@8.4.35)(vite@5.1.6): + resolution: {integrity: sha512-HBstDtC6KKD5yCYh5hHpPdHGZai0B/iLlDwkOIK+xfQYrvl8tNBvKfRz3xgiaI5MJ+fLmEOxbfXQIjleU1A0iA==} engines: {node: '>=14'} peerDependencies: - '@unocss/webpack': 0.58.5 + '@unocss/webpack': 0.58.6 vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 peerDependenciesMeta: '@unocss/webpack': @@ -10618,26 +10686,26 @@ packages: vite: optional: true dependencies: - '@unocss/astro': 0.58.5(vite@5.1.6) - '@unocss/cli': 0.58.5 - '@unocss/core': 0.58.5 - '@unocss/extractor-arbitrary-variants': 0.58.5 - '@unocss/postcss': 0.58.5(postcss@8.4.35) - '@unocss/preset-attributify': 0.58.5 - '@unocss/preset-icons': 0.58.5 - '@unocss/preset-mini': 0.58.5 - '@unocss/preset-tagify': 0.58.5 - '@unocss/preset-typography': 0.58.5 - '@unocss/preset-uno': 0.58.5 - '@unocss/preset-web-fonts': 0.58.5 - '@unocss/preset-wind': 0.58.5 - '@unocss/reset': 0.58.5 - '@unocss/transformer-attributify-jsx': 0.58.5 - '@unocss/transformer-attributify-jsx-babel': 0.58.5 - '@unocss/transformer-compile-class': 0.58.5 - '@unocss/transformer-directives': 0.58.5 - '@unocss/transformer-variant-group': 0.58.5 - '@unocss/vite': 0.58.5(vite@5.1.6) + '@unocss/astro': 0.58.6(vite@5.1.6) + '@unocss/cli': 0.58.6 + '@unocss/core': 0.58.6 + '@unocss/extractor-arbitrary-variants': 0.58.6 + '@unocss/postcss': 0.58.6(postcss@8.4.35) + '@unocss/preset-attributify': 0.58.6 + '@unocss/preset-icons': 0.58.6 + '@unocss/preset-mini': 0.58.6 + '@unocss/preset-tagify': 0.58.6 + '@unocss/preset-typography': 0.58.6 + '@unocss/preset-uno': 0.58.6 + '@unocss/preset-web-fonts': 0.58.6 + '@unocss/preset-wind': 0.58.6 + '@unocss/reset': 0.58.6 + '@unocss/transformer-attributify-jsx': 0.58.6 + '@unocss/transformer-attributify-jsx-babel': 0.58.6 + '@unocss/transformer-compile-class': 0.58.6 + '@unocss/transformer-directives': 0.58.6 + '@unocss/transformer-variant-group': 0.58.6 + '@unocss/vite': 0.58.6(vite@5.1.6) vite: 5.1.6(@types/node@20.11.26)(less@4.2.0) transitivePeerDependencies: - postcss diff --git a/src/components/basic/lockscreen/index.vue b/src/components/basic/lockscreen/index.vue index aa4ffef14..6f4a5d966 100644 --- a/src/components/basic/lockscreen/index.vue +++ b/src/components/basic/lockscreen/index.vue @@ -9,9 +9,11 @@ import { useRoute } from 'vue-router'; import LockScreenPage from './lockscreen-page.vue'; import { useLockscreenStore } from '@/store/modules/lockscreen'; + import { useUserStore } from '@/store/modules/user'; import { LOGIN_NAME } from '@/router/constant'; const lockscreenStore = useLockscreenStore(); + const userStore = useUserStore(); const route = useRoute(); const isLock = computed(() => lockscreenStore.isLock); const lockTime = computed(() => lockscreenStore.lockTime); @@ -27,11 +29,15 @@ // 重置锁屏时间 lockscreenStore.setLockTime(); timer = setInterval(() => { + if (!userStore.token || isLock.value) { + return clearInterval(timer); + } // 锁屏倒计时递减 lockscreenStore.setLockTime(lockTime.value - 1); if (lockTime.value <= 0) { // 设置锁屏 lockscreenStore.setLock(true); + lockscreenStore.setLockPwd(); return clearInterval(timer); } // console.log(lockTime.value, '锁屏倒计时') diff --git a/src/components/basic/lockscreen/lockscreen-page.vue b/src/components/basic/lockscreen/lockscreen-page.vue index 12a3cd9b0..a165779ac 100644 --- a/src/components/basic/lockscreen/lockscreen-page.vue +++ b/src/components/basic/lockscreen/lockscreen-page.vue @@ -1,45 +1,23 @@