Skip to content

Commit d97702e

Browse files
committed
fix: 登录名修改
1 parent 3d1fcec commit d97702e

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

lib/core.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ export class Manager {
253253
export class User extends Model {
254254
public id!: number;
255255
public username!: string;
256+
public nickname!: string;
256257
public admin!: number;
257258
public active!: number;
258259
public email!: string;
@@ -303,6 +304,7 @@ export class User extends Model {
303304
const origin = {
304305
id: this.id,
305306
username: this.username,
307+
nickname: this.nickname,
306308
admin: this.admin,
307309
active: this.active,
308310
email: this.email,

lib/interface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export let UserInterface = {
5454
comment: '头像url',
5555
get() {
5656
// @ts-ignore
57-
return this.getDataValue('avatar') ? config.getItem('siteDomain') + 'assets/' + this.getDataValue('avatar') : null;
57+
return this.getDataValue('avatar') ? config.getItem('siteDomain').replace(/\/+$/, '') + '/assets/' + this.getDataValue('avatar') : null;
5858
}
5959

6060
},

0 commit comments

Comments
 (0)