Skip to content

Commit 0d97358

Browse files
author
GongJS
committed
feat:个人中心
1 parent 4ed5b81 commit 0d97358

6 files changed

Lines changed: 528 additions & 8 deletions

File tree

.env.development

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
ENV = 'development'
22

3-
VUE_APP_BASE_URL = 'http://localhost:5000/'
3+
VUE_APP_BASE_URL = 'http://digital.7yue.pro/'

src/components/layout/User.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
</div>
3333
</div>
3434
<ul class="dropdown-box">
35-
<li class="password" @click="changePassword">
36-
<i class="iconfont icon-weibaoxitongshangchuanlogo-"></i> <span>修改登录密码</span>
35+
<li class="password" @click="goToCenter">
36+
<i class="iconfont icon-weibaoxitongshangchuanlogo-"></i> <span>个人中心</span>
3737
</li>
3838
<li class="account" @click="outLogin"><i class="iconfont icon-tuichu"></i> <span>退出账户</span></li>
3939
</ul>
@@ -346,8 +346,8 @@ export default {
346346
this.groupName = user.groupName ? user.groupName : '超级管理员'
347347
this.nickname = user && user.nickname ? user.nickname : '佚名'
348348
},
349-
changePassword() {
350-
this.dialogFormVisible = true
349+
goToCenter() {
350+
this.$router.push('/center')
351351
},
352352
// 弹框 右上角 X
353353
handleClose(done) {

src/config/stage/center.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const centerRouter = {
2+
route: null,
3+
name: null,
4+
title: '个人',
5+
type: 'view', // 类型: folder, tab, view
6+
icon: 'iconfont icon-tushuguanli',
7+
filePath: 'views/center/', // 文件路径
8+
order: null,
9+
inNav: true,
10+
}
11+
12+
export default centerRouter

src/config/stage/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ let homeRouter = [
2626
order: 1,
2727
permission: ['查询所有日志'],
2828
},
29+
{
30+
title: '个人中心',
31+
type: 'view',
32+
name: Symbol('center'),
33+
route: '/center',
34+
filePath: 'views/center/Center.vue',
35+
inNav: false,
36+
icon: 'iconfont icon-rizhiguanli',
37+
},
2938
{
3039
title: '404',
3140
type: 'view',

src/lin/models/admin.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,10 @@ export default class Admin {
117117
return res
118118
}
119119

120-
static async updateOneUser(email, group_id, id) {
121-
const res = await put(`cms/admin/${id}`, {
120+
static async updateOneUser(email, group_ids, id) {
121+
const res = await put(`cms/admin/user/${id}`, {
122122
email,
123-
group_id,
123+
group_ids,
124124
})
125125
return res
126126
}

0 commit comments

Comments
 (0)