guhongwei il y a 5 ans
Parent
commit
674334fb0e
3 fichiers modifiés avec 24 ajouts et 35 suppressions
  1. 9 1
      src/layout/index/menuInfo.vue
  2. 4 4
      src/layout/index/xinpin.vue
  3. 11 30
      src/views/index.vue

+ 9 - 1
src/layout/index/menuInfo.vue

@@ -17,7 +17,15 @@
           <el-menu-item index="/supermaket/supermarket">科技超市</el-menu-item>
           <el-menu-item index="/shuju/shuju">科技数据</el-menu-item>
           <el-menu-item index="/service/service">科技服务</el-menu-item>
-          <el-menu-item index="/resource/resource">科技资源</el-menu-item>
+          <el-menu-item index="/">
+            <el-link
+              style="padding: 0px 0px;font-size: 22px;"
+              :underline="false"
+              href="http://139.210.167.203/free-technological-management/mapApply/getMap"
+              target="_blank"
+              >科技资源</el-link
+            >
+          </el-menu-item>
           <el-menu-item index="/personnel/personnel">科技人才</el-menu-item>
         </el-menu>
       </el-col>

+ 4 - 4
src/layout/index/xinpin.vue

@@ -13,8 +13,8 @@
             <ul>
               <li class="zixunList" v-for="(item, index) in xinpinList" :key="index">
                 <el-link :underline="false">
-                  <span class="title textOver">{{ item.title }}</span>
-                  <span class="date textOver">{{ item.date }}</span>
+                  <span class="title textOver">{{ item.name }}</span>
+                  <span class="date textOver">{{ item.meta && item.meta.createdAt ? new Date(item.meta.createdAt).toLocaleDateString() : '' || '' }}</span>
                 </el-link>
               </li>
             </ul>
@@ -31,8 +31,8 @@
             <ul>
               <li class="zixunList" v-for="(item, index) in chuangxinList" :key="index">
                 <el-link :underline="false">
-                  <span class="title textOver">{{ item.title }}</span>
-                  <span class="date textOver">{{ item.date }}</span>
+                  <span class="title textOver">{{ item.name }}</span>
+                  <span class="date textOver">{{ item.meta && item.meta.createdAt ? new Date(item.meta.createdAt).toLocaleDateString() : '' || '' }}</span>
                 </el-link>
               </li>
             </ul>

+ 11 - 30
src/views/index.vue

@@ -22,6 +22,7 @@ const { mapActions: mapAffairsColumn } = createNamespacedHelpers('affairsColumn'
 const { mapActions: mapAffairsNews } = createNamespacedHelpers('affairsNews');
 const { mapActions: mapPolicyColumn } = createNamespacedHelpers('policyColumn');
 const { mapActions: mapPolicyNews } = createNamespacedHelpers('policyNews');
+const { mapActions: mapProduct } = createNamespacedHelpers('enterpriseproject');
 export default {
   name: 'index',
   props: {},
@@ -33,43 +34,17 @@ export default {
     map: require('@/assets/map.jpg'),
     gndtList: [],
     tzggList: [],
-    zhzczdList: [
-      {
-        title: '尼日利亚传统领袖:尼应学习借鉴中国自贸区建设经验',
-        date: '2019-12-25',
-      },
-      {
-        title: '八条数据',
-        date: '2019-12-25',
-      },
-    ],
+    zhzczdList: [],
     linkList: [],
-    xinpinList: [
-      {
-        title: '科技超市(产品)',
-        date: '2019-12-25',
-      },
-      {
-        title: '六条数据',
-        date: '2019-12-25',
-      },
-    ],
-    chuangxinList: [
-      {
-        title: '科技超市(产品)',
-        date: '2019-12-25',
-      },
-      {
-        title: '六条数据',
-        date: '2019-12-25',
-      },
-    ],
+    xinpinList: [],
+    chuangxinList: [],
   }),
   created() {
     this.searchSite();
     this.searchLink();
     this.searchAffairs();
     this.searchPolicy();
+    this.searchProduct();
   },
   computed: {},
   methods: {
@@ -79,6 +54,7 @@ export default {
     ...mapAffairsNews({ affairsNews: 'query' }),
     ...mapPolicyColumn({ policyColumnList: 'query', policyColumnInfo: 'fetch' }),
     ...mapPolicyNews({ policyNews: 'query' }),
+    ...mapProduct({ productList: 'query', productInfo: 'fetch' }),
     // 查询站点信息
     async searchSite() {
       let res = await this.showInfo();
@@ -137,6 +113,11 @@ export default {
         this.$set(this, `${site}List`, res.data);
       }
     },
+    async searchProduct({ skip = 0, limit = 6, ...info } = {}) {
+      const res = await this.productList({ skip, limit, ...info });
+      this.$set(this, `xinpinList`, res.data);
+      this.$set(this, `chuangxinList`, res.data);
+    },
   },
 };
 </script>