Browse Source

首页-提示类-家装、工装不展示判断优化

zhujindu 10 months ago
parent
commit
cdacc57640
1 changed files with 3 additions and 8 deletions
  1. 3 8
      src/views/home/index.vue

+ 3 - 8
src/views/home/index.vue

@@ -84,14 +84,9 @@ export default {
       this.isLoading = false;
     },
     async getDict(isRefresh) {
-      this.toastLoading(0, '加载中...', true);
-      let gz_Option = await getDictOption({}, 'gz_customer_post'); //公装业务员岗位
-      let jz_Option = await getDictOption({}, 'jz_post_name'); //家装业务员岗位
-      this.toastLoading().clear();
-      let postName = this.userInfo.postName;
-      let is_gz = gz_Option.data.find((res) => res.dictLabel == postName);
-      let is_jz = jz_Option.data.find((res) => res.dictLabel == postName);
-      if (is_gz || is_jz) {
+      let postType = this.userInfo.postType;
+      // postType:人员类型,JZ(家装)、GZ(公装)、YF(应服)、DIY(DIY)
+      if (postType == 'JZ' || 'GZ') {
         localStorage.setItem('isGZorJZ', 'true');
         this.isGZorJZ = 'true';
       } else {