mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-19 14:56:44 +08:00
安全性问题处理:代码版本整理 修复版本1 --提交人:阳华祥
This commit is contained in:
@@ -127,7 +127,7 @@ service.interceptors.request.use(
|
||||
/**
|
||||
* 请求拦截处理(待添加 判断走统一网关处理)
|
||||
*/
|
||||
if(config.url && config.method == 'post' && /api\/$/.test(config.url.split(configApp.API_VERSION)[0])){
|
||||
if(config.url && /api\/$/.test(config.url.split(configApp.API_VERSION)[0])){
|
||||
if(!config.data || config.data == null){
|
||||
config.data = {}
|
||||
}
|
||||
@@ -158,7 +158,7 @@ service.interceptors.response.use(
|
||||
console.log(response)
|
||||
console.log('----------------')
|
||||
let res = response.data
|
||||
if(response.config.url && response.config.method == 'post' && /api\/$/.test(response.config.url.split(configApp.API_VERSION)[0])){
|
||||
if(response.config.url && response.headers['content-type'].match(/application\/json/) && /api\/$/.test(response.config.url.split(configApp.API_VERSION)[0])){
|
||||
if(res.response){// 正常情況返回必有response 节点
|
||||
console.log("[调用请求解密服务][请求地址:"+response.config.url+"][解密前报文:]",JSON.stringify(res.response))
|
||||
res = JSON.parse(AESTools.AESDecrypt(res.response,configApp.REQ_PWD))
|
||||
|
||||
Reference in New Issue
Block a user