diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 34b1b9f1..96daf0ad 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -122,26 +122,6 @@ const useUserStore = defineStore('user', { this.phonenumber = user.phonenumber; this.email = user.email; this.sex = user.sex; - // 额外信息 - try { - this.profile = JSON.parse(user.profile); - } catch (error) { - console.error(error); - this.profile = { - color: { - critical: '#e8994a', - event: '#c5d2dc', - major: '#494040', - minor: '#5f70a8', - sound: 'custom', - warning: '#b9e1dd', - }, - custom: 'hrxz.com-exz2s3uxhc47391.mp3', - pwdErrCount: 0, - pwdErrTime: 0, - sound: 'custom', - }; - } // 验证返回的roles是否是一个非空数组 if (Array.isArray(roles) && roles.length > 0) {