diff --git a/src/components/Header.vue b/src/components/Header.vue index f738f53..2ebf747 100644 --- a/src/components/Header.vue +++ b/src/components/Header.vue @@ -6,7 +6,7 @@
- + {{userName}}
@@ -19,7 +19,6 @@ export default { data() { return { - avatar: 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png', userName: '' }; }, @@ -30,7 +29,7 @@ export default { getUserInfo(){ this.$get(this.api.queryUserInfoDetails).then(res => { let userInfo = res.result.hrUserInfo - if(userInfo.userAvatars) this.avatar = userInfo.userAvatars + if(userInfo.userAvatars) this.$store.commit('userAvatar',{avatar: userInfo.userAvatars}) this.userName = userInfo.userName }).catch(err => {}) }, diff --git a/src/config/index.js b/src/config/index.js index 17241d2..e5f4c83 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -18,9 +18,9 @@ export default { */ initialPassword: '111aaa', /** - * 所属平台:1->职站 2->数据平台 + * 所属平台:1->职站 2->数据平台 3->中台 */ - platformId: 1, + platformId: 3, /** * @description 系统列表 */ diff --git a/src/utils/http.js b/src/utils/http.js index e9682f5..532b93d 100644 --- a/src/utils/http.js +++ b/src/utils/http.js @@ -40,8 +40,8 @@ axios.interceptors.request.use(config => { axios.interceptors.response.use( response => { if (response.status === 200) { - if(response.data.status!==200){// 接口定义的非正常返回的时候,应当处于报错状态 - Message.error(response.data.message)// 非服务器状态码对应的报错信息 + if(response.data.status && response.data.status!==200){// 接口定义的非正常返回的时候,应当处于报错状态 + Message.error(response.data.message) return Promise.reject(response); } return Promise.resolve(response); diff --git a/src/views/customer/AddCustomer.vue b/src/views/customer/AddCustomer.vue index 9b0b776..5e35c29 100644 --- a/src/views/customer/AddCustomer.vue +++ b/src/views/customer/AddCustomer.vue @@ -182,8 +182,8 @@ -