diff --git a/src/axios/fetch.js b/src/axios/fetch.js index 9f0c1e0..007bc98 100644 --- a/src/axios/fetch.js +++ b/src/axios/fetch.js @@ -4,7 +4,7 @@ export const api = axios.create({ // baseURL: 'https://ccb.canary.moe/api/', baseURL: window.location.origin + '/api/', // baseURL: 'https://canary.lacus.site/api/', - // baseURL: 'http://canary.lacus.icu/api/', + // baseURL: 'https://canary.lacus.icu/api/', // baseURL: 'http://beta.lacus.site/api/', // baseURL: 'http://152.136.99.231:8001' + '/api/', headers: { diff --git a/src/views/Account/Account.vue b/src/views/Account/Account.vue index 5011ca9..3e66541 100644 --- a/src/views/Account/Account.vue +++ b/src/views/Account/Account.vue @@ -200,11 +200,11 @@ export default { manageLoginRes(data) { // 登录成功 let user_infos = { + ...this.user_infos, cid: this.cid, row_login_pwd: encryptMainCode(this.password), user_name: data.username, update_time: data.modified, - drivce: this.user_infos.drivce, cloud_drivce: this.settings.is_chinese ? '暂无' : 'unknown' }; this.setUserInfo([user_infos, this]); @@ -347,10 +347,10 @@ export default { startLogout() { // 初始化用户信息 let user_infos = { + ...this.user_infos, user_name: 'A Little Canary', cid: 'Codebook', row_login_pwd: '', - drivce: this.user_infos.drivce, cloud_drivce: this.settings.is_chinese ? '暂无' : 'unknown', update_time: new Date().getTime() }; diff --git a/src/views/Settings/Settings.vue b/src/views/Settings/Settings.vue index 5b19910..dfe3d33 100644 --- a/src/views/Settings/Settings.vue +++ b/src/views/Settings/Settings.vue @@ -204,7 +204,7 @@ export default { }, // 重置账户 - resetAccount(need_loading = true) { + resetAccount(need_loading = true, need_reset_drvice = false) { this.reset_active = true; if (need_loading) { this.account_loading = true; @@ -216,13 +216,13 @@ export default { }.bind(this), 1000 ); - } + } // 初始化用户信息 let user_infos = { user_name: 'A Little Canary', cid: 'Codebook', row_login_pwd: '', - drivce: this.user_infos.drivce, + drivce: need_reset_drvice ? '' : this.user_infos.drivce, cloud_drivce: this.settings.is_chinese ? '暂无' : 'unknown', update_time: new Date().getTime() }; @@ -254,7 +254,7 @@ export default { resetApplication() { this.application_loading = true; this.reset_active = true; - this.resetAccount(false); + this.resetAccount(false, true); this.resetCodebook(false); this.setRowPwd(['', this]); console.log('主密码覆写完成');