From 77f146040fe6ad48707d77d488e41f6fc9d1c98a Mon Sep 17 00:00:00 2001
From: jiayuqi7813 <63686458+jiayuqi7813@users.noreply.github.com>
Date: Tue, 12 Jul 2022 03:21:13 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=A2=98=E7=9B=AE=E7=AE=A1?=
=?UTF-8?q?=E7=90=86=E8=B7=AF=E7=94=B1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/admin/challagne/chal.vue | 82 +++++++++++++++++++++++++
src/components/admin/notification.vue | 10 ++-
src/router/index.js | 6 ++
src/views/admin/AdminChal.vue | 12 ++++
4 files changed, 104 insertions(+), 6 deletions(-)
create mode 100644 src/components/admin/challagne/chal.vue
create mode 100644 src/views/admin/AdminChal.vue
diff --git a/src/components/admin/challagne/chal.vue b/src/components/admin/challagne/chal.vue
new file mode 100644
index 0000000..69e1bf9
--- /dev/null
+++ b/src/components/admin/challagne/chal.vue
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+ 删除
+
+
+
+
+
+
+
+
diff --git a/src/components/admin/notification.vue b/src/components/admin/notification.vue
index cf7dd1f..d092f58 100644
--- a/src/components/admin/notification.vue
+++ b/src/components/admin/notification.vue
@@ -71,10 +71,9 @@ export default {
axios.post('/api/v1/admin/notice',this.formData).then(res => {
if (res.data.code === 200) {
this.dialogTableVisible = false;
- ElNotification.success({
- title: '成功',
+ this.$message({
message: '添加成功',
- duration: 2000
+ type: 'success'
});
window.location.reload()
}
@@ -84,10 +83,9 @@ export default {
axios.delete('/api/v1/admin/notice/'+row.id).then(res => {
if (res.data.code === 200) {
this.data.splice(this.data.indexOf(row),1);
- ElNotification.success({
- title: '成功',
+ this.$message({
message: '删除成功',
- duration: 2000
+ type: 'success'
});
}
})
diff --git a/src/router/index.js b/src/router/index.js
index 5ccd34b..3bd1fb9 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -62,8 +62,14 @@ const router = createRouter({
path:'notification',
name:'AdminNotification',
component : () => import('../views/admin/AdminNotice.vue'),
+ },
+ {
+ path:'challenges',
+ name:'AdminChallenges',
+ component: ()=> import('../views/admin/AdminChal.vue'),
}
]
+
},
{
path:'/404',
diff --git a/src/views/admin/AdminChal.vue b/src/views/admin/AdminChal.vue
new file mode 100644
index 0000000..d476f2d
--- /dev/null
+++ b/src/views/admin/AdminChal.vue
@@ -0,0 +1,12 @@
+
+
+
+
+