diff --git a/src/api/log.js b/src/api/log.js index 69ddcdfd..d7b05ba9 100644 --- a/src/api/log.js +++ b/src/api/log.js @@ -14,4 +14,43 @@ logApi.listLatest = (top) => { }) } +logApi.logType = { + BLOG_INITIALIZED: { + value: 0, + text: '博客初始化' + }, + POST_PUBLISHED: { + value: 5, + text: '文章发布' + }, + POST_EDITED: { + value: 15, + text: '文章修改' + }, + POST_DELETED: { + value: 20, + text: '文章删除' + }, + LOGGED_IN: { + value: 25, + text: '用户登陆' + }, + LOGGED_OUT: { + value: 30, + text: '注销登陆' + }, + LOGIN_FAILED: { + value: 35, + text: '登陆失败' + }, + PASSWORD_UPDATED: { + value: 40, + text: '修改密码' + }, + PROFILE_UPDATED: { + value: 45, + text: '资料修改' + } +} + export default logApi diff --git a/src/views/dashboard/Dashboard.vue b/src/views/dashboard/Dashboard.vue index 5b4f4c0e..695fd4f6 100644 --- a/src/views/dashboard/Dashboard.vue +++ b/src/views/dashboard/Dashboard.vue @@ -221,7 +221,7 @@ title="日志记录" :bodyStyle="{ padding: '16px' }" > - + { + log.type = this.logType[log.type].text + return log + }) } }, methods: { diff --git a/src/views/system/ToolList.vue b/src/views/system/ToolList.vue index 0d76e177..daaabf88 100644 --- a/src/views/system/ToolList.vue +++ b/src/views/system/ToolList.vue @@ -3,9 +3,11 @@