diff --git a/src/components/admin/notification.vue b/src/components/admin/notification.vue index bee8a09..cf7dd1f 100644 --- a/src/components/admin/notification.vue +++ b/src/components/admin/notification.vue @@ -3,8 +3,18 @@ 添加公告 - -

特色

+ + + + + + + + + + 提交 + @@ -34,6 +44,10 @@ import { reactive, ref } from 'vue' export default { data(){ return{ + formData:{ + title:'', + content:'', + }, data:[], dialogTableVisible:false, } @@ -53,6 +67,19 @@ export default { }) }, methods:{ + submitNotice(){ + axios.post('/api/v1/admin/notice',this.formData).then(res => { + if (res.data.code === 200) { + this.dialogTableVisible = false; + ElNotification.success({ + title: '成功', + message: '添加成功', + duration: 2000 + }); + window.location.reload() + } + }) + }, handleClick(row){ axios.delete('/api/v1/admin/notice/'+row.id).then(res => { if (res.data.code === 200) {