Ver Fonte

修改引入组件

xiaomin há 4 anos atrás
pai
commit
db6b18eb89
4 ficheiros alterados com 10 adições e 4 exclusões
  1. 1 1
      src/components/MyBreadcrumb.vue
  2. 1 1
      src/main.js
  3. 7 1
      src/views/news.vue
  4. 1 1
      src/views/newsDetails.vue

+ 1 - 1
src/components/MyBreadcrumb.vue

@@ -2,7 +2,7 @@
   <el-breadcrumb separator-class="el-icon-arrow-right">
     <el-breadcrumb-item :to="{ path: '/' }"> {{level1}} </el-breadcrumb-item>
     <el-breadcrumb-item> {{level2}} </el-breadcrumb-item>
-    <el-breadcrumb-item v-if="flag"> {{level3}} </el-breadcrumb-item>
+    <el-breadcrumb-item> {{level3}} </el-breadcrumb-item>
   </el-breadcrumb>
 </template>
 

+ 1 - 1
src/main.js

@@ -8,7 +8,7 @@ import ElementUI from 'element-ui';
 // import 'swiper/dist/idangerous.swiper.css';
 import '@/assets/css/index.css';
 import myaxios from '@/plugins/MyAxios';
-import MyBreadcrumb from '@/components/MyBreadcrumb';
+// import MyBreadcrumb from '@/components/MyBreadcrumb';
 // import promise from 'es6-promise';promise.polyfill();
 import 'babel-polyfill';
 

+ 7 - 1
src/views/news.vue

@@ -90,7 +90,7 @@ export default {
       if (response.data.code === 1) {
         this.doctorNews = response.data.responseData.records;
         this.total = response.data.responseData.total;
-        console.log(response.data.responseData.records)
+        // console.log(response.data.responseData.records)
       }
     },
     //跳转
@@ -108,6 +108,12 @@ export default {
       this.loadData();
       console.log(`当前页: ${val}`);
     },
+    //获取url斜杠最后的一个字段
+    getUrlsub() {
+      var urlStr = location.pathname;
+      var index = urlStr.lastIndexOf('\/');
+      this.aid = urlStr.substring(index + 1, urlStr.length);
+    }
   }
 };
 </script>

+ 1 - 1
src/views/newsDetails.vue

@@ -5,7 +5,7 @@
     <div class="newscont">
       <div>
         <my-breadcrumb level1="首页" :level2="level2" :level3="level3" :flag="flagtag" style="height: 50px; line-height: 50px;"></my-breadcrumb>
-    </div>
+      </div>
       <div class="newsOnly">
         <h1>{{this.formData.title}}</h1>
         <div class="content" v-html="this.formData.content"></div>