Bladeren bron

兜底&&面包屑

suxinf 4 jaren geleden
bovenliggende
commit
68dd391db6

+ 4 - 4
src/App.vue

@@ -46,7 +46,7 @@ export default {
           url: '/uploadInfor'
         }
       ],
-      isManufacturer: 'manufacturer', // distributor 经销商 manufacturer 厂商
+      isManufacturer: 'distributor', // distributor 经销商 manufacturer 厂商
       userAccount: '',
       userToken:''
     }
@@ -77,10 +77,10 @@ export default {
           } else {
             if (userInfo.userRole == '1' || userInfo.userRole == '2') {
               this.isManufacturer = 'distributor';
-              if(this.$route.path !== '/inforList') this.$router.replace({ path: "/inforList" });
+              this.$router.replace({ path: "/inforList" });
             } else {
               this.isManufacturer = 'manufacturer';
-              if(this.$route.path !== '/uploadInfor') this.$router.replace({ path: "/uploadInfor" });
+              this.$router.replace({ path: "/uploadInfor" });
             }
           }
           sessionStorage.setItem('userPath',this.isManufacturer)
@@ -98,7 +98,7 @@ export default {
     // 测试接口
     getData() {
       // 正常token
-      // dXNlcklkPTEwMCZhY2NvdW50PUwwUDAxX01NJmZyb209c2l3ZWkmdGltZXN0YW1wPTE2MTkwNjI1OTcmc2lnbj0zNTJiMmE3MDc4OTlhNDY0ZmY0Nzc1M2IxMzU3NTg0Ng== //测试经销商TOKEN
+      // dXNlcklkPTEwMDEmYWNjb3VudD1MMDIxMF9NTSZmcm9tPXNpd2VpJnRpbWVzdGFtcD0xNjE4NTU2MTQ4JnNpZ249MWI3MmIwODkzNmZhNDdmMDU5MDRiNDc3N2FkOTdkMTI== //测试经销商TOKEN
       // dXNlcklkPTE1NiZhY2NvdW50PUwwTTE0X01NJmZyb209c2l3ZWkmdGltZXN0YW1wPTE2MTg1NTYzMDAmc2lnbj1lNDZmM2Q3MmFiZDI3ODYwMDYyMmY2N2NmZjFiNjZmNw== //测试厂商TOKEN
       this.userToken = sessionStorage.getItem('setToken');
       if(this.userToken){

+ 14 - 10
src/components/RouterBanner.vue

@@ -35,7 +35,8 @@
           </div>
         </div>
         <!-- 模块的子路由 -->
-        <div class="second_level" v-show="(routerObj.pathList || []).indexOf(routerPath) > -1">
+        <div class="second_level"
+          v-show="((routerObj.pathList || []).indexOf(routerPath) > -1)">
           <div
             v-for="(list, index) in routerObj.list"
             :key="index"
@@ -65,21 +66,24 @@ export default {
   data() {
     return {
       isHover: [true, true, true, true, true],
-      routerList: ROUTER
+      routerList: ROUTER,
+      firstRouter: ''
     };
   },
   computed: {
     routerPath: function () {
-      return this.$route.path;
+      return this.$route.matched[0].path;
     },
   },
-  // watch: {
-  //   routerPath: function(newpath, oldPath) {
-  //     console.log(newpath, 'new');
-  //     console.log(oldPath);
-  //     console.log()
-  //   }
-  // },
+  watch: {
+    // routerPath: function(newpath, oldPath) {
+    //   this.firstRouter = 
+    //   console.log(this.$route.matched[0].path)
+    //   console.log(newpath, 'new');
+    //   console.log(oldPath);
+      // console.log()
+    // }
+  },
   methods: {
     enterDiv: function (i) {
       this.isHover.splice(i, 1, false);

+ 1 - 1
src/config/router.js

@@ -22,7 +22,7 @@ const ROUTER = [
         pathList: ['/uploadRecord', '/uploadLinks', '/uploadInfor'] // 方便判断是否展开
     },
     {
-        title: "数据管理", // 进销商数据管理
+        title: "传播项目", // 进销商数据管理
         path: "/inforList", // 点击数据管理展示的路由
         img1: require("../img/edit-manage1.png"), // 没点击的背景图
         img2: require("../img/edit-manage2.png"), // 点击了的背景图

+ 9 - 0
src/views/account/AccountManage.vue

@@ -157,6 +157,15 @@ export default {
     };
     this.selectMediaAccountPage(data);
   },
+  activated() {
+    const nav = [
+      {
+        title: '账号管理',
+        url: ''
+      }
+    ]
+    this.$emit('change_nav', nav)
+  }
 };
 </script>
 

+ 13 - 1
src/views/data/InforList.vue

@@ -531,8 +531,20 @@ export default {
       this.userId = localStorage.getItem('userId');
       this.getDataListPage()
     },500)
+  },
+  activated() {
+    const nav = [
+      {
+        title: '传播项目',
+        url: ''
+      },
+      {
+        title: '资料下载',
+        url: ''
+      }
+    ]
+    this.$emit('change_nav', nav)
   }
-
 };
 </script>
 

+ 13 - 0
src/views/data/UploadLink.vue

@@ -733,6 +733,19 @@ export default {
       }); */
     //this.getPlatform();
   },
+  activated() {
+    const nav = [
+      {
+        title: '传播项目',
+        url: ''
+      },
+      {
+        title: '传播反馈',
+        url: ''
+      }
+    ]
+    this.$emit('change_nav', nav)
+  }
 };
 </script>
 

+ 3 - 3
src/views/data/components/InfoListItemDetail.vue

@@ -7,7 +7,7 @@
       <div class="content_datail" v-if="status">
         <div class="detail">
           <span>资料名称:</span>
-          <span>{{ detailData[nowIndex].informationName }}</span>
+          <span>{{ detailData[nowIndex].informationName || '' }}</span>
         </div>
         <div class="detail">
           <span>上传时间:</span>
@@ -52,7 +52,7 @@
         </div>
         <div class="detail">
           <span>资料描述:</span>
-          <span>{{ detailData[nowIndex].fileDiscription }}</span>
+          <span>{{ detailData[nowIndex].fileDiscription || '' }}</span>
         </div>
         <div class="filesStyle multiDetail">
           <span>附件:</span>
@@ -192,7 +192,7 @@ export default {
   mounted() {
     this.getDataListPage();
     console.log(this.detailData);
-  },
+  }
 };
 </script>
 

+ 4 - 4
src/views/data/components/UploadRecordDetail.vue

@@ -7,7 +7,7 @@
       <div class="content_datail">
         <div class="detail">
           <p style="width: 65px">资料名称:</p>
-          <p>{{ detailData.informationName }}</p>
+          <p>{{ detailData.informationName || '' }}</p>
         </div>
         <div class="detail">
           <p style="width: 65px">上传时间:</p>
@@ -25,7 +25,7 @@
             </p>
             <p>
               可查看经销商<span @click="showTable">{{
-                detailData.totalCount
+                detailData.totalCount || 0
               }}</span
               >家
             </p>
@@ -33,7 +33,7 @@
         </div>
         <div class="detail">
           <div style="width: 15%">资料描述:</div>
-          <p style="width: 85%">{{ detailData.fileDiscription }}</p>
+          <p style="width: 85%">{{ detailData.fileDiscription || '' }}</p>
         </div>
         <div class="files">
           <p style="width: 65px">附件:</p>
@@ -43,7 +43,7 @@
               :key="index"
               @click="downloadFile(index)"
             >
-              {{ item.fileName }}
+              {{ item.fileName || ''}}
             </p>
           </div>
         </div>