mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-11 07:26:44 +08:00
Merge branch 'feature/GFRS-1991【待确定】APP检测结果优化-整理' into release/20201126
This commit is contained in:
@@ -115,7 +115,6 @@ const service = axios.create({
|
|||||||
service.interceptors.request.use(
|
service.interceptors.request.use(
|
||||||
config => {
|
config => {
|
||||||
let relativePath = config.url && config.url.split(configApp.API_VERSION)[1]
|
let relativePath = config.url && config.url.split(configApp.API_VERSION)[1]
|
||||||
console.log(config.url.split(configApp.API_VERSION)[0])
|
|
||||||
if (whiteList.includes(relativePath)) {
|
if (whiteList.includes(relativePath)) {
|
||||||
Toast.loading({
|
Toast.loading({
|
||||||
duration: 0, // 持续展示 toast
|
duration: 0, // 持续展示 toast
|
||||||
@@ -133,9 +132,7 @@ service.interceptors.request.use(
|
|||||||
}
|
}
|
||||||
if(!!config.data && config.data != null){
|
if(!!config.data && config.data != null){
|
||||||
let encrypt = AESTools.AESEncrypt(JSON.stringify(config.data),configApp.REQ_PWD)
|
let encrypt = AESTools.AESEncrypt(JSON.stringify(config.data),configApp.REQ_PWD)
|
||||||
console.log("[调用请求加密服务][请求地址:"+config.url+"][加密前报文:]",JSON.stringify(config.data))
|
|
||||||
config.data = {"data": encrypt }
|
config.data = {"data": encrypt }
|
||||||
console.log("[调用请求加密服务][请求地址:"+config.url+"][加密后报文:]",config.data)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
config.headers['token'] = CacheUtils.getLocItem('token')
|
config.headers['token'] = CacheUtils.getLocItem('token')
|
||||||
@@ -143,7 +140,6 @@ service.interceptors.request.use(
|
|||||||
let timeStr = new Date().getTime() + '';
|
let timeStr = new Date().getTime() + '';
|
||||||
config.headers['timeStr'] = timeStr;
|
config.headers['timeStr'] = timeStr;
|
||||||
config.headers['signature'] = MD5(timeStr + CacheUtils.getLocItem('token'));
|
config.headers['signature'] = MD5(timeStr + CacheUtils.getLocItem('token'));
|
||||||
// config.headers['token'] = `f0003a753d1d492083248f723ab1b6e9`//TEST测试专用
|
|
||||||
return config
|
return config
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
@@ -155,14 +151,10 @@ service.interceptors.request.use(
|
|||||||
// respone拦截器
|
// respone拦截器
|
||||||
service.interceptors.response.use(
|
service.interceptors.response.use(
|
||||||
response => {
|
response => {
|
||||||
console.log(response)
|
|
||||||
console.log('----------------')
|
|
||||||
let res = response.data
|
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( 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 节点
|
if(res.response){// 正常情況返回必有response 节点
|
||||||
console.log("[调用请求解密服务][请求地址:"+response.config.url+"][解密前报文:]",JSON.stringify(res.response))
|
|
||||||
res = JSON.parse(AESTools.AESDecrypt(res.response,configApp.REQ_PWD))
|
res = JSON.parse(AESTools.AESDecrypt(res.response,configApp.REQ_PWD))
|
||||||
console.log("[调用请求解密服务][请求地址:"+response.config.url+"][解密后报文:]",res)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Toast.clear()
|
Toast.clear()
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ const service = axios.create({
|
|||||||
service.interceptors.request.use(
|
service.interceptors.request.use(
|
||||||
config => {
|
config => {
|
||||||
let relativePath = config.url && config.url.split(configApp.API_VERSION)[1]
|
let relativePath = config.url && config.url.split(configApp.API_VERSION)[1]
|
||||||
console.log(config.url.split(configApp.API_VERSION)[0])
|
|
||||||
if (whiteList.includes(relativePath)) {
|
if (whiteList.includes(relativePath)) {
|
||||||
Toast.loading({
|
Toast.loading({
|
||||||
duration: 0, // 持续展示 toast
|
duration: 0, // 持续展示 toast
|
||||||
@@ -37,9 +36,7 @@ service.interceptors.request.use(
|
|||||||
}
|
}
|
||||||
if(!!config.data && config.data != null){
|
if(!!config.data && config.data != null){
|
||||||
let encrypt = AESTools.AESEncrypt(JSON.stringify(config.data),configApp.REQ_PWD)
|
let encrypt = AESTools.AESEncrypt(JSON.stringify(config.data),configApp.REQ_PWD)
|
||||||
console.log("[调用请求加密服务][请求地址:"+config.url+"][加密前报文:]",JSON.stringify(config.data))
|
|
||||||
config.data = {"data": encrypt }
|
config.data = {"data": encrypt }
|
||||||
console.log("[调用请求加密服务][请求地址:"+config.url+"][加密后报文:]",config.data)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
config.headers['token'] = CacheUtils.getLocItem('token')
|
config.headers['token'] = CacheUtils.getLocItem('token')
|
||||||
@@ -47,7 +44,6 @@ service.interceptors.request.use(
|
|||||||
let timeStr = new Date().getTime() + '';
|
let timeStr = new Date().getTime() + '';
|
||||||
config.headers['timeStr'] = timeStr;
|
config.headers['timeStr'] = timeStr;
|
||||||
config.headers['signature'] = MD5(timeStr + CacheUtils.getLocItem('token'));
|
config.headers['signature'] = MD5(timeStr + CacheUtils.getLocItem('token'));
|
||||||
// config.headers['token'] = `f0003a753d1d492083248f723ab1b6e9`//TEST测试专用
|
|
||||||
return config
|
return config
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
@@ -64,9 +60,7 @@ service.interceptors.response.use(
|
|||||||
let res = response.data
|
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( 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 节点
|
if(res.response){// 正常情況返回必有response 节点
|
||||||
console.log("[调用请求解密服务][请求地址:"+response.config.url+"][解密前报文:]",JSON.stringify(res.response))
|
|
||||||
res = JSON.parse(AESTools.AESDecrypt(res.response,configApp.REQ_PWD))
|
res = JSON.parse(AESTools.AESDecrypt(res.response,configApp.REQ_PWD))
|
||||||
console.log("[调用请求解密服务][请求地址:"+response.config.url+"][解密后报文:]",res)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Toast.clear()
|
Toast.clear()
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ switch (process.env.VUE_APP_FLAG) {
|
|||||||
API_VERSION = 'v2'
|
API_VERSION = 'v2'
|
||||||
break
|
break
|
||||||
case 'prd':
|
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'
|
imgDomain = 'https://iagentsales-ud.e-guofu.com:8553/updown'
|
||||||
assetsUrl = 'https://iagentsales-sr.e-guofu.com:8443/'
|
assetsUrl = 'https://iagentsales-sr.e-guofu.com:8443/'
|
||||||
mainUrl = 'https://iagentsales.e-guofu.com'
|
mainUrl = 'https://iagentsales.e-guofu.com'
|
||||||
|
|||||||
Reference in New Issue
Block a user