Merge branch 'master' of http://192.168.0.56:3000/haozq/lj-zhgd-htweb
This commit is contained in:
commit
d9d99697e7
|
|
@ -106,7 +106,7 @@ const user = {
|
|||
})
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 退出系统
|
||||
LogOut({ commit, state }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ service.interceptors.request.use(config => {
|
|||
|
||||
if(config.headers['Content-Type']==null || config.headers['Content-Type']==''){
|
||||
config.headers['Content-Type']='application/json';
|
||||
console.warn("请求类型为空");
|
||||
console.warn("请求类型为空");
|
||||
}
|
||||
return config
|
||||
}, error => {
|
||||
|
|
@ -116,8 +116,11 @@ service.interceptors.response.use(res => {
|
|||
const resultData=decryptCBC(res.data.data);
|
||||
res.data=JSON.parse(resultData);
|
||||
}
|
||||
if(typeof res.data.code=='undefined'){
|
||||
res.data= res.data.data
|
||||
}
|
||||
// 未设置状态码则默认成功状态
|
||||
const code = res.data.code || 200;
|
||||
const code = res.data.code || 200;
|
||||
// 获取错误信息
|
||||
const msg = errorCode[code] || res.data.msg || errorCode['default']
|
||||
// 二进制数据则直接返回
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ module.exports = {
|
|||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
target: `http://127.0.0.1:18080`,
|
||||
target: `http://127.0.0.1:18080/ljzhgd`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||
|
|
|
|||
Loading…
Reference in New Issue