|
|
|
|
@ -8,7 +8,8 @@ console.log('use message in request', vue);
|
|
|
|
|
// import Vue from "vue";
|
|
|
|
|
// console.log('use message in request2', Vue);
|
|
|
|
|
// const baseURL = "//idaotian.com"; // 正式环境线上
|
|
|
|
|
const baseURL = "//test.renminshitang.com.cn/daotian/api_dev"; // 测试环境本地
|
|
|
|
|
const baseURL = "//daotian.matripe.com.cn"; // 正式环境线上
|
|
|
|
|
// const baseURL = "//test.renminshitang.com.cn/daotian/api_dev"; // 测试环境本地
|
|
|
|
|
// console.log(data1.keys());
|
|
|
|
|
axios.defaults.withCredentials = true; //添加这行代码
|
|
|
|
|
// 动态设置https协议,拼接到接口基础路径
|
|
|
|
|
@ -87,6 +88,7 @@ service.interceptors.response.use(
|
|
|
|
|
} else if (response.data.status === 2002) {// 职位名称
|
|
|
|
|
// message.error('职位名称:请不要填写【' + response.data.msg + '】相关违禁内容');
|
|
|
|
|
console.log('response.data.status === 2002', response.data.status);
|
|
|
|
|
console.log(' vue.$message', vue.$message);
|
|
|
|
|
vue.$message.error(response.data.msg)
|
|
|
|
|
// this.$message.error(response.data.msg);
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
@ -105,6 +107,19 @@ service.interceptors.response.use(
|
|
|
|
|
// code: 2002,
|
|
|
|
|
// msg: response.data.msg
|
|
|
|
|
// });
|
|
|
|
|
} else if (response.data.status == 9009) {
|
|
|
|
|
vue.$message.error(response.data.msg)
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
localStorage.removeItem("LOGIN_DATA");
|
|
|
|
|
localStorage.removeItem("LOGIN_DATA_token");
|
|
|
|
|
localStorage.removeItem("DAOTIAN_agencyid");
|
|
|
|
|
router.push("/login");
|
|
|
|
|
return Promise.reject(new Error(response.data.msg));
|
|
|
|
|
// 跳转到登录页面
|
|
|
|
|
// this.$message.warning(msg);
|
|
|
|
|
}, 2000);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
// Message.error(response.data.msg)
|
|
|
|
|
// vue.$message.error(response.data.msg)
|
|
|
|
|
|