请求配置

This commit is contained in:
BianLzhaoMin 2025-08-28 16:32:10 +08:00
parent c11f69cb1f
commit 14b02487ee
2 changed files with 25 additions and 8 deletions

View File

@ -7,11 +7,19 @@ import { tansParams, blobValidate } from '@/utils/bonus'
import cache from '@/plugins/cache'
import { saveAs } from 'file-saver'
import { decryptWithSM4, encryptWithSM4, hashWithSM3AndSalt } from '@/utils/sm'
const systemConfig = JSON.parse(localStorage.getItem('systemConfig')) || {
// const systemConfig = JSON.parse(localStorage.getItem('systemConfig')) || {
// requestConfig: {
// encryptRequest: true,
// checkIntegrity: true,
// encryptResponse: true,
// },
// }
const systemConfig = {
requestConfig: {
encryptRequest: true,
checkIntegrity: true,
encryptResponse: true,
encryptRequest: process.env.VUE_APP_ENV === 'production' ? true : false,
checkIntegrity: process.env.VUE_APP_ENV === 'production' ? true : false,
encryptResponse:
process.env.VUE_APP_ENV === 'production' ? true : false,
},
}

View File

@ -7,11 +7,20 @@ import { tansParams, blobValidate } from '@/utils/bonus'
import cache from '@/plugins/cache'
import { saveAs } from 'file-saver'
import { decryptWithSM4, encryptWithSM4, 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,
// },
// }
const systemConfig = {
requestConfig: {
encryptRequest: false,
checkIntegrity: false,
encryptResponse: false,
encryptRequest: process.env.VUE_APP_ENV === 'production' ? true : false,
checkIntegrity: process.env.VUE_APP_ENV === 'production' ? true : false,
encryptResponse:
process.env.VUE_APP_ENV === 'production' ? true : false,
},
}