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..9eb0ee4 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 }} + + + + + + + @@ -146,9 +103,6 @@ export default { }, value: 2, displayInnerWindow: '', - avatarUrl: '', - uin: '', - userGroup: 'user', tab: null, accounts: [], filter: { @@ -182,31 +136,10 @@ export default { }, mounted() { - this.tokenLogin() }, methods: { - tokenLogin() { - this.$axios.get('/v1/account/token-check') - .then(res => { - if (res.data.code === 0) { - this.uin = res.data.data.uin - this.avatarUrl = "http://q1.qlogo.cn/g?b=qq&nk=" + res.data.data.uin + "&s=100" - this.userGroup = res.data.data.user_group - } else { - this.toast('登录失败:' + res.data.msg) - } - }) - .catch(err => { - if (err.response.data.code === -1) { - this.$router.push('/auth?hint=请先登录嗷') - return - } - this.toast('登录失败:' + err.response.data.msg) - console.error(err) - }) - }, randomColor() { let colors = ["#FFC107", "#42A5F5", "#9CCC65", "#F06292", "#76FF03", "#9E9E9E", "#8D6E63"] return colors[Math.floor(Math.random() * 100) % colors.length] @@ -254,7 +187,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/auth.vue b/frontend/src/pages/auth.vue index 42f0056..b23baee 100644 --- a/frontend/src/pages/auth.vue +++ b/frontend/src/pages/auth.vue @@ -1,5 +1,5 @@