|
|
|
@ -40,10 +40,10 @@ service.interceptors.request.use( |
|
|
|
if (userStore.userToken) { |
|
|
|
config.headers["user-token"] = userStore.userToken; |
|
|
|
} |
|
|
|
console.error('<---------------请求拦截---------->') |
|
|
|
console.error('请求拦截----config------>', config.url) |
|
|
|
console.error('请求拦截----data------>', config.data) |
|
|
|
console.error('<---------------请求拦截---------->') |
|
|
|
// console.error('<---------------请求拦截---------->')
|
|
|
|
// console.error('请求拦截----config------>', config.url)
|
|
|
|
// console.error('请求拦截----data------>', config.data)
|
|
|
|
// console.error('<---------------请求拦截---------->')
|
|
|
|
// if (config.headers['content-type'] === 'application/json') {
|
|
|
|
let { data, headers } = config |
|
|
|
//获取16位随机数
|
|
|
|
@ -85,8 +85,8 @@ service.interceptors.response.use( |
|
|
|
let jsonData = sm4DecryptMethod(data.data, authKey) |
|
|
|
response.data.data = JSON.parse(jsonData) |
|
|
|
} |
|
|
|
console.error('行营结果----解密结构------>', response.config.url) |
|
|
|
console.error('行营结果----解密结构------>', response.data) |
|
|
|
// console.error('行营结果----解密结构------>', response.config.url)
|
|
|
|
// console.error('行营结果----解密结构------>', response.data)
|
|
|
|
// console.log('行营结果----解密结构------>', headers['auth-key'], response)
|
|
|
|
const { code, msg } = response.data; |
|
|
|
if (code === 0 || code === 200 || code === 10001) { |
|
|
|
|