From d86afa000be27f59b32dd9cbf9e8599d44aefafd Mon Sep 17 00:00:00 2001 From: RockChinQ <1010553892@qq.com> Date: Fri, 5 Jul 2024 23:33:56 +0800 Subject: [PATCH 1/3] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E5=89=8D?= =?UTF-8?q?=E7=AB=AFrouter=E5=AE=9E=E7=8E=B0=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/package.json | 2 +- frontend/src/App.vue | 4 +- frontend/src/components/Auth.vue | 0 frontend/src/main.js | 1 + frontend/src/pages/admin.vue | 183 +++++------- frontend/src/pages/index.vue | 385 +++---------------------- frontend/src/pages/post.vue | 469 +++++++++++++++++++++++++++++++ frontend/src/pages/service.vue | 183 +++++------- frontend/src/pages/world.vue | 125 +++----- frontend/src/router/index.js | 18 +- 10 files changed, 710 insertions(+), 660 deletions(-) delete mode 100644 frontend/src/components/Auth.vue create mode 100644 frontend/src/pages/post.vue diff --git a/frontend/package.json b/frontend/package.json index 838a1c2..1cc48d5 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -34,6 +34,6 @@ "unplugin-vue-router": "^0.8.4", "vite": "^5.1.5", "vite-plugin-vuetify": "^2.0.3", - "vue-router": "^4.3.0" + "vue-router": "^4.4.0" } } diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 2caa78e..6fb643e 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -1,11 +1,11 @@ diff --git a/frontend/src/components/Auth.vue b/frontend/src/components/Auth.vue deleted file mode 100644 index e69de29..0000000 diff --git a/frontend/src/main.js b/frontend/src/main.js index c849848..3859cea 100644 --- a/frontend/src/main.js +++ b/frontend/src/main.js @@ -19,6 +19,7 @@ import VueCookies from 'vue-cookies' const app = createApp(App) + app.use(store) app.use(VueCookies) diff --git a/frontend/src/pages/admin.vue b/frontend/src/pages/admin.vue index 9be4f04..f29b27c 100644 --- a/frontend/src/pages/admin.vue +++ b/frontend/src/pages/admin.vue @@ -2,125 +2,82 @@ -
-
-

Campux

-
-
-
- 📝 投稿 -
-
- 🌏 稿件 -
-
- 🛠 服务 -
-
- 🔐 管理 +
+

Campux

+ {{ $store.state.metadata.brand }} +
+ + 🪪 账号 + 🚫 封禁记录 + + + + + + +
+ +
+
+ + + + + 查找
+ +
+ -
- -
-

{{ uin }}

-

{{ userGroup }}

-
+
+ + +
+ +
+
+ + + + + 查找 +
+
-
- - -
-
- -
-
-

Campux

- {{ $store.state.metadata.brand }} + +
+ +
- - 🪪 账号 - 🚫 封禁记录 - - - - - - -
- -
-
- - - - - 查找 -
-
- -
- - - -
-
-
- -
- -
-
- - - - - 查找 -
-
- - -
- -
-
-
-
- - - {{ snackbar.text }} - - - - - - - - -
-
+
+
+ + + {{ snackbar.text }} + + + + + + + @@ -254,7 +211,7 @@ export default { if (res.data.code === 0) { this.accounts = res.data.data.list - for (let i = 0; this.accounts!=null && i < this.accounts.length; i++) { + for (let i = 0; this.accounts != null && i < this.accounts.length; i++) { let date = new Date(this.accounts[i].created_at) this.accounts[i].created_at = date.toLocaleString() diff --git a/frontend/src/pages/index.vue b/frontend/src/pages/index.vue index 961ce3b..39b975e 100644 --- a/frontend/src/pages/index.vue +++ b/frontend/src/pages/index.vue @@ -1,34 +1,46 @@ diff --git a/frontend/src/pages/post.vue b/frontend/src/pages/post.vue index 8fd6afa..a8d1c8d 100644 --- a/frontend/src/pages/post.vue +++ b/frontend/src/pages/post.vue @@ -15,7 +15,7 @@