提交 a3f4b4cb 编写于 作者: guangjun.yang's avatar guangjun.yang

no message

上级 fdf7d757
......@@ -13,15 +13,15 @@ const service = axios.create({
service.interceptors.request.use(config => {
if (config.data && config.data.setEntry) {
config.headers['sysCode'] = config.data.sysCode || 10
if(config.data.token){
config.headers['token'] = config.data.token || 'CAF8336E76514F07BF195EFCEBE60775'
if( process.env.BUILD_ENV == "development" ){ // 本地开发环境
if (config.data.token) {
config.headers['token'] = config.data.token || 'CAF8336E76514F07BF195EFCEBE60775'
if (process.env.BUILD_ENV == "development") { // 本地开发环境
config.headers['token'] = config.data.token || '14587B3BBD77434EAFE8755FB1856008';
}
delete config.data.setEntry;
delete config.data.token;
}
delete config.data.setEntry;
delete config.data.token;
}
config.headers['deviceInfo'] = JSON.stringify({ "app_channel": "", "app_mac": "", "app_uuid": "", "app_version": "", "device_brand": "", "device_ip": "", "device_model": "", "device_net": "", "device_ops": "", "resolution_wh": "", "system_level": "", "device_type": '10' })
}
return config
......@@ -37,7 +37,7 @@ service.interceptors.response.use(
/*
baseUrl时,返回000000为成功
apiUrl时,返回200为成功
*/
*/
if (res.code !== '000000' && response.respCode === 200) {
return Promise.reject('error')
} else {
......
......@@ -488,6 +488,7 @@ export default {
this.showChangeCard = false;
},
//
beforeChangeCardAction(cardKey) {
this.commonCheckToken( () => {
this.changeCardAction(cardKey);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册