Merge branch 'feature/GFRS-1991【待确定】APP检测结果优化-整理' into release/20201126

This commit is contained in:
yang.huaxiang
2020-11-25 13:44:05 +08:00
3 changed files with 1 additions and 15 deletions

View File

@@ -115,7 +115,6 @@ const service = axios.create({
service.interceptors.request.use(
config => {
let relativePath = config.url && config.url.split(configApp.API_VERSION)[1]
console.log(config.url.split(configApp.API_VERSION)[0])
if (whiteList.includes(relativePath)) {
Toast.loading({
duration: 0, // 持续展示 toast
@@ -133,9 +132,7 @@ service.interceptors.request.use(
}
if(!!config.data && config.data != null){
let encrypt = AESTools.AESEncrypt(JSON.stringify(config.data),configApp.REQ_PWD)
console.log("[调用请求加密服务][请求地址:"+config.url+"][加密前报文:]",JSON.stringify(config.data))
config.data = {"data": encrypt }
console.log("[调用请求加密服务][请求地址:"+config.url+"][加密后报文:]",config.data)
}
}
config.headers['token'] = CacheUtils.getLocItem('token')
@@ -143,7 +140,6 @@ service.interceptors.request.use(
let timeStr = new Date().getTime() + '';
config.headers['timeStr'] = timeStr;
config.headers['signature'] = MD5(timeStr + CacheUtils.getLocItem('token'));
// config.headers['token'] = `f0003a753d1d492083248f723ab1b6e9`//TEST测试专用
return config
},
error => {
@@ -155,14 +151,10 @@ service.interceptors.request.use(
// respone拦截器
service.interceptors.response.use(
response => {
console.log(response)
console.log('----------------')
let res = response.data
if( configApp.API_VERSION == 'v2' && 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))
console.log("[调用请求解密服务][请求地址:"+response.config.url+"][解密后报文:]",res)
}
}
Toast.clear()

View File

@@ -19,7 +19,6 @@ const service = axios.create({
service.interceptors.request.use(
config => {
let relativePath = config.url && config.url.split(configApp.API_VERSION)[1]
console.log(config.url.split(configApp.API_VERSION)[0])
if (whiteList.includes(relativePath)) {
Toast.loading({
duration: 0, // 持续展示 toast
@@ -37,9 +36,7 @@ service.interceptors.request.use(
}
if(!!config.data && config.data != null){
let encrypt = AESTools.AESEncrypt(JSON.stringify(config.data),configApp.REQ_PWD)
console.log("[调用请求加密服务][请求地址:"+config.url+"][加密前报文:]",JSON.stringify(config.data))
config.data = {"data": encrypt }
console.log("[调用请求加密服务][请求地址:"+config.url+"][加密后报文:]",config.data)
}
}
config.headers['token'] = CacheUtils.getLocItem('token')
@@ -47,7 +44,6 @@ service.interceptors.request.use(
let timeStr = new Date().getTime() + '';
config.headers['timeStr'] = timeStr;
config.headers['signature'] = MD5(timeStr + CacheUtils.getLocItem('token'));
// config.headers['token'] = `f0003a753d1d492083248f723ab1b6e9`//TEST测试专用
return config
},
error => {
@@ -64,9 +60,7 @@ service.interceptors.response.use(
let res = response.data
if( configApp.API_VERSION == 'v2' && 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))
console.log("[调用请求解密服务][请求地址:"+response.config.url+"][解密后报文:]",res)
}
}
Toast.clear()

View File

@@ -35,7 +35,7 @@ switch (process.env.VUE_APP_FLAG) {
API_VERSION = 'v2'
break
case 'prd':
apiDomain = 'https://iagentsales.e-guofu.com/api/v1'
apiDomain = 'https://iagentsales.e-guofu.com/api/v2'
imgDomain = 'https://iagentsales-ud.e-guofu.com:8553/updown'
assetsUrl = 'https://iagentsales-sr.e-guofu.com:8443/'
mainUrl = 'https://iagentsales.e-guofu.com'