Commit 0c79b6fa authored by 刘怀志's avatar 刘怀志

encrypt

parent b557351b
......@@ -5,4 +5,4 @@ export const PARAM_ENCRYPT_ABLE = true
// 结果是否进行加密
export const RESULT_ENCRYPT_ABLE = true
// 需要排除的不进行加密的接口,正则匹配
export const EXCLUE_PATH = ['.*/captchaImage']
export const EXCLUE_PATH = ['.*/captchaImage','.*/common/uploadMinioPublic','.*/uploadMinioPrivate','.*/export','.*/logout']
......@@ -45,7 +45,7 @@ service.interceptors.request.use(config => {
// get请求映射params参数
if (config.method === 'get' && config.params) {
console.log('加密前参数get', config.params)
if (paramEncryptFlag) {
if (paramEncryptFlag && config.params) {
parseParam = secret.encrypt(config.params)
}
let url = config.url + '?' + tansParams(parseParam);
......@@ -76,7 +76,7 @@ service.interceptors.request.use(config => {
}
}
console.log('加密前参数post', config.data)
if (paramEncryptFlag) {
if (paramEncryptFlag && config.data) {
config.data = secret.encrypt(config.data)
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment