wuhongyu vor 5 Jahren
Ursprung
Commit
003b2d72a6
1 geänderte Dateien mit 23 neuen und 6 gelöschten Zeilen
  1. 23 6
      src/views/market/index.vue

+ 23 - 6
src/views/market/index.vue

@@ -11,23 +11,23 @@
                 <p></p>
               </el-col>
               <el-col :span="23" class="leftList">
-                <el-col :span="12" class="productList" v-for="(item, index) in productList" :key="index">
+                <el-col :span="12" class="productList" v-for="(item, index) in productList" :key="index" @click.native="detail(item)">
                   <el-image :src="item.image[0].url"></el-image>
                   <p>{{ item.name }}</p>
                 </el-col>
                 <el-col :span="24" class="leftListDown">
                   <span></span>
-                  <a href="">MORE</a>
+                  <a href="http://localhost:8001/supermaket/supermarketlist?totaltype=1">MORE</a>
                 </el-col>
               </el-col>
             </el-col>
             <el-col :span="12" class="right">
               <el-col :span="24" class="rightTop">
-                <a href="">MORE</a>
+                <a href="http://localhost:8001/supermaket/supermarketlist?totaltype=0">MORE</a>
                 <span></span>
               </el-col>
               <el-col :span="23" class="rightList">
-                <el-col :span="24" class="tecList" v-for="(item, index) in tecList" :key="index">
+                <el-col :span="24" class="tecList" v-for="(item, index) in tecList" :key="index" @click.native="detailjishu(item)">
                   <span></span>
                   <span>{{ item.name }}</span>
                   <span>{{ item.meta | getDate }}</span>
@@ -45,10 +45,10 @@
             <el-col :span="12" class="left">
               <el-col :span="24" class="leftTop">
                 <span>服务供求</span>
-                <a href="">MORE</a>
+                <a href="http://localhost:8001/supermaket/supermarketlist?totaltype=2">MORE</a>
               </el-col>
               <el-col :span="24" class="leftList">
-                <el-col :span="24" class="serviceList" v-for="(item, index) in serviceList" :key="index">
+                <el-col :span="24" class="serviceList" v-for="(item, index) in serviceList" :key="index" @click.native="clickdetail(item)">
                   <el-image :src="item.image[0].url"></el-image>
                   <p>
                     <span>{{ item.name }}</span>
@@ -120,6 +120,23 @@ export default {
       res = await this.expertQuery({ skip: 0, limit: 4 });
       if (this.$checkRes(res)) this.$set(this, `expertsList`, res.data);
     },
+    detail(id) {
+      console.log(id.id);
+      let newid = id.id;
+      window.location.href = 'http://localhost:8001/supermaket/supermarketdetail?totaltype=1&&?&id=' + newid + '';
+    },
+
+    detailjishu(id) {
+      console.log('ads');
+      console.log(id.id);
+      let newid = id.id;
+      window.location.href = 'http://localhost:8001/supermaket/supermarketdetail?totaltype=0&&?&id=' + newid + '';
+    },
+    clickdetail(id) {
+      console.log(id.id);
+      let newid = id.id;
+      window.location.href = 'http://localhost:8001/supermaket/supermarketdetail?totaltype=2&&?&id=' + newid + '';
+    },
   },
   filters: {
     getDate(meta) {