密码明文加密

This commit is contained in:
binbin_pan 2024-05-24 19:31:29 +08:00
parent abcb736322
commit 1821f36767
1 changed files with 2 additions and 5 deletions

View File

@ -182,6 +182,7 @@
<script> <script>
import { listConfig, getConfig, delConfig, addConfig, updateConfig, refreshCache } from "@/api/system/config"; import { listConfig, getConfig, delConfig, addConfig, updateConfig, refreshCache } from "@/api/system/config";
import { decrypt} from '@/utils/jsencrypt'
export default { export default {
name: "Config", name: "Config",
@ -242,11 +243,7 @@ export default {
listConfig(this.addDateRange(this.queryParams, this.dateRange)).then(response => { listConfig(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
response.rows.forEach(row => { response.rows.forEach(row => {
if (row.configKey == 'sys.user.initPassword') { if (row.configKey == 'sys.user.initPassword') {
this.decryptData(row.configValue, 'CCNXrpassWordKey').then(data => { row.configValue = decrypt(row.configValue)
row.configValue = data;
}).catch(err => {
console.log('🚀 ~ decryptData ~ err:', err);
});
} }
}); });
this.configList = response.rows; this.configList = response.rows;