用户登录问题修改

This commit is contained in:
jiang 2024-10-29 15:20:59 +08:00
parent 7ffda168f5
commit 7e6ecd0dba
3 changed files with 16 additions and 3 deletions

View File

@ -8,7 +8,9 @@ import cache from '@/plugins/cache'
import { saveAs } from 'file-saver'
import { encryptCBC, decryptCBC } from '@/utils/aescbc'
import { hashWithSM3AndSalt } from '@/utils/sm'
const systemConfig = JSON.parse(localStorage.getItem('systemConfig'));
const systemConfig = JSON.parse(localStorage.getItem('systemConfig')) || {
requestConfig: { encryptRequest: false, checkIntegrity: false, encryptResponse: false }
};
let downloadLoadingInstance
// 是否显示重新登录

View File

@ -198,7 +198,15 @@ export default {
},
computed: {
config() {
return JSON.parse(localStorage.getItem('systemConfig')); // JSON
return JSON.parse(localStorage.getItem('systemConfig')) || {loginConfig:{
phonePassword: true,
emailPassword: true,
phoneCode: false,
emailCode: false
},registersConfig: {
phoneRegisters: true,
emailRegisters: true
}}; // JSON
},
loginRules() {
return this.loginMethod === 'password' ? this.passwordLoginRules : this.mobileLoginRules

View File

@ -110,7 +110,10 @@ export default {
return LOGIN
},
config() {
return JSON.parse(localStorage.getItem('systemConfig')); // JSON
return JSON.parse(localStorage.getItem('systemConfig')) || {registersConfig: {
phoneRegisters: true,
emailRegisters: true
}}; // JSON
},
},
data() {