From 57e7825f7416b49fd1d92bfad09cfe02f07c7993 Mon Sep 17 00:00:00 2001 From: Litrix2 Date: Thu, 11 Jul 2024 22:33:48 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20=E6=94=B9=E8=BF=9B=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E5=92=8C=E9=A1=B5=E9=9D=A2=E9=80=BB=E8=BE=91=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A1=B5=E9=9D=A2=E5=88=87=E6=8D=A2=E7=9A=84?= =?UTF-8?q?=E8=BF=87=E6=B8=A1=E5=8A=A8=E7=94=BB=E5=92=8C=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E5=8A=A8=E7=94=BB=20=E6=B7=BB=E5=8A=A0=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=8A=A0=E8=BD=BD=E7=9A=84=E8=BF=87=E6=B8=A1?= =?UTF-8?q?=E5=8A=A8=E7=94=BB=20=E6=94=B9=E8=BF=9B=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=EF=BC=8C=E6=94=AF=E6=8C=81=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=A4=9A=E7=A7=8D=E9=94=99=E8=AF=AF=E5=8E=9F=E5=9B=A0=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AF=B9=E5=9C=A8=E5=B5=8C=E5=A5=97=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E4=B8=AD=E5=B5=8C=E5=A5=97=E6=98=BE=E7=A4=BA=E9=9D=9E?= =?UTF-8?q?404=E9=A1=B5=E9=9D=A2=E9=94=99=E8=AF=AF=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E7=9A=84=E6=94=AF=E6=8C=81=20=E6=94=B9=E8=BF=9B=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=BF=A1=E6=81=AF=E5=88=9D=E5=A7=8B=E5=8C=96=E7=9A=84?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 5 +- package.json | 3 +- src/App.vue | 269 +++-- src/assets/global.scss | 1 - src/assets/icons/Loading.svg | 4 + src/components/BackgroundComp.vue | 3 +- src/components/Game2048.vue | 25 +- src/components/Game2048Score.vue | 10 +- src/components/LoadingIcon.vue | 10 - src/router/index.ts | 164 +++- src/router/permissions.ts | 2 +- src/schemas/index.ts | 69 +- src/schemas/response.ts | 68 ++ src/stores/2048.ts | 6 +- src/stores/page.ts | 75 ++ src/stores/user.ts | 31 +- src/utils/api.ts | 2 +- src/utils/index.ts | 86 +- src/utils/permissions.ts | 13 - src/views/ErrorPage.vue | 30 + src/views/Game2048Page.vue | 4 +- src/views/MainPage.vue | 2 +- src/views/UserPage.vue | 3 +- vite.config.ts | 3 +- yarn.lock | 1511 ++++++++++++++--------------- 25 files changed, 1381 insertions(+), 1018 deletions(-) create mode 100644 src/assets/icons/Loading.svg delete mode 100644 src/components/LoadingIcon.vue create mode 100644 src/schemas/response.ts create mode 100644 src/stores/page.ts delete mode 100644 src/utils/permissions.ts create mode 100644 src/views/ErrorPage.vue diff --git a/components.d.ts b/components.d.ts index 1391121..9207363 100644 --- a/components.d.ts +++ b/components.d.ts @@ -20,21 +20,24 @@ declare module 'vue' { ElFormItem: (typeof import('element-plus/es'))['ElFormItem']; ElHeader: (typeof import('element-plus/es'))['ElHeader']; ElIcon: (typeof import('element-plus/es'))['ElIcon']; + ElImage: (typeof import('element-plus/es'))['ElImage']; ElInput: (typeof import('element-plus/es'))['ElInput']; ElInputNumber: (typeof import('element-plus/es'))['ElInputNumber']; ElMain: (typeof import('element-plus/es'))['ElMain']; + ElMenu: (typeof import('element-plus/es'))['ElMenu']; + ElMenuItem: (typeof import('element-plus/es'))['ElMenuItem']; ElPopover: (typeof import('element-plus/es'))['ElPopover']; ElTabPane: (typeof import('element-plus/es'))['ElTabPane']; ElTabs: (typeof import('element-plus/es'))['ElTabs']; Game2048: (typeof import('./src/components/Game2048.vue'))['default']; Game2048Button: (typeof import('./src/components/Game2048Button.vue'))['default']; Game2048Score: (typeof import('./src/components/Game2048Score.vue'))['default']; + IconCsLoading: (typeof import('~icons/cs/loading'))['default']; IconCsLock: (typeof import('~icons/cs/lock'))['default']; IconCsUser: (typeof import('~icons/cs/user'))['default']; IconCsValidate: (typeof import('~icons/cs/validate'))['default']; IconEpLoading: (typeof import('~icons/ep/loading'))['default']; IconEpUserFilled: (typeof import('~icons/ep/user-filled'))['default']; - LoadingIcon: (typeof import('./src/components/LoadingIcon.vue'))['default']; RouterLink: (typeof import('vue-router'))['RouterLink']; RouterView: (typeof import('vue-router'))['RouterView']; VerifyInput: (typeof import('./src/components/VerifyInput.vue'))['default']; diff --git a/package.json b/package.json index 8138f99..5bb2430 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "axios": "^1.6.8", "crypto-js": "^4.2.0", "element-plus": "^2.7.0", + "jwt-decode": "^4.0.0", "lodash-es": "^4.17.21", "pinia": "^2.1.7", "vfonts": "^0.0.3", @@ -42,7 +43,7 @@ "npm-run-all2": "^6.1.2", "prettier": "^3.2.5", "sass": "^1.75.0", - "typescript": "^5.4.5", + "typescript": "^5.5.3", "unplugin-auto-import": "^0.17.5", "unplugin-icons": "^0.18.5", "unplugin-vue-components": "^0.26.0", diff --git a/src/App.vue b/src/App.vue index 646eea5..5023c95 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,45 +1,92 @@