Skip to content

Commit 4723f8f

Browse files
committed
fix(user):
1 parent 0d97358 commit 4723f8f

5 files changed

Lines changed: 31 additions & 26 deletions

File tree

.env.production

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

22

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

package-lock.json

Lines changed: 23 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"fs-extra": "^8.1.0",
5555
"inquirer": "^6.5.0",
5656
"js-yaml": "^3.13.1",
57-
"lint-staged": "^10.0.0-1",
57+
"lint-staged": "^9.5.0",
5858
"node-sass": "^4.12.0",
5959
"sass-loader": "^7.1.0",
6060
"semver": "^6.2.0",

src/lin/models/user.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { post, get, put } from '@/lin/plugins/axios'
22
import { saveTokens } from '../utils/token'
33

4-
const SUPER_VALUE = 2
4+
// const SUPER_VALUE = 2
55
const ACTIVE_VALUE = 1
66

77
export default class User {
@@ -29,14 +29,14 @@ export default class User {
2929
// 分组名称
3030
groupName = null
3131

32-
constructor(active, email, groupId, username, _super, avatar, auths, nickname, groupName) {
32+
constructor(active, email, groupId, username, admin, avatar, permissions, nickname, groupName) {
3333
this.isActive = active === ACTIVE_VALUE
3434
this.email = email
3535
this.groupId = groupId
3636
this.username = username
3737
this.avatar = avatar
38-
this.isSuper = _super === SUPER_VALUE
39-
this.auths = auths || []
38+
this.isSuper = admin
39+
this.auths = permissions || []
4040
this.nickname = nickname
4141
this.groupName = groupName
4242
}
@@ -85,7 +85,7 @@ export default class User {
8585
* 获取当前用户信息和所拥有的权限
8686
*/
8787
static async getAuths() {
88-
const info = await get('cms/user/auths')
88+
const info = await get('cms/user/permissions')
8989
return new User(
9090
info.active,
9191
info.email,

src/views/login/Login.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default {
3131
wait: 2000, // 2000ms之内不能重复发起请求
3232
throttleLogin: null, // 节流登录
3333
form: {
34-
username: 'super',
34+
username: 'root',
3535
password: '123456',
3636
confirm_password: '123456',
3737
email: '2285901508@qq.com',

0 commit comments

Comments
 (0)