This commit is contained in:
parent
a264a9c693
commit
7d95a14b71
|
|
@ -8,9 +8,15 @@ import cache from '@/plugins/cache'
|
|||
import { saveAs } from 'file-saver'
|
||||
import { decryptWithSM4, encryptWithSM4, hashWithSM3AndSalt } from '@/utils/sm'
|
||||
|
||||
const systemConfig = JSON.parse(localStorage.getItem('systemConfig')) || {
|
||||
requestConfig: { encryptRequest: false, checkIntegrity: false, encryptResponse: false }
|
||||
};
|
||||
const systemConfig = (() => {
|
||||
try {
|
||||
const config = JSON.parse(localStorage.getItem('systemConfig'));
|
||||
return config || { requestConfig: { encryptRequest: false, checkIntegrity: false, encryptResponse: false } };
|
||||
} catch (error) {
|
||||
console.warn('Failed to parse systemConfig from localStorage:', error);
|
||||
return { requestConfig: { encryptRequest: false, checkIntegrity: false, encryptResponse: false } };
|
||||
}
|
||||
})()
|
||||
|
||||
let downloadLoadingInstance;
|
||||
// 是否显示重新登录
|
||||
|
|
|
|||
|
|
@ -120,7 +120,8 @@ export default {
|
|||
if (valid) {
|
||||
const oldPassword = encrypt(this.user.oldPassword)
|
||||
const newPassword = encrypt(this.user.newPassword)
|
||||
resetUserPwd(0, newPassword).then((response) => {
|
||||
const userId = sessionStorage.getItem('userId')
|
||||
resetUserPwd(userId, newPassword).then((response) => {
|
||||
this.$modal.msgSuccess('修改成功, 请重新登录')
|
||||
// 重新登录
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue