This commit is contained in:
bb_pan 2025-05-07 15:00:21 +08:00
parent a264a9c693
commit 7d95a14b71
2 changed files with 11 additions and 4 deletions

View File

@ -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;
// 是否显示重新登录

View File

@ -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(() => {