Commit 1cdbff5f authored by zhanglw's avatar zhanglw

路由调整

parent 50dadf42
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<el-divider /> <el-divider />
<div class="vertical-menu-title"> <div class="vertical-menu-title">
<img src="@/assets/home_images/mark_pro.png"> <img src="@/assets/home_images/mark_pro.png">
<span>供应</span> <span>采购</span>
</div> </div>
<div class="vertical-menu-label touch"><span :class="menuIndex==='3'?'active':''" @click="menuClick('/console/collectPro')">收藏的产品</span></div> <div class="vertical-menu-label touch"><span :class="menuIndex==='3'?'active':''" @click="menuClick('/console/collectPro')">收藏的产品</span></div>
<div class="vertical-menu-label touch"><span :class="menuIndex==='4'?'active':''" @click="menuClick('/console/collectSup')">收藏的供应商</span></div> <div class="vertical-menu-label touch"><span :class="menuIndex==='4'?'active':''" @click="menuClick('/console/collectSup')">收藏的供应商</span></div>
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</el-image> </el-image>
<el-row> <el-row>
<el-col :span="21"> <el-col :span="21">
<div class="title touch" :title="item.title" @click="goToDetails(item, 'product')">{{ item.title }}</div> <div class="title touch" :title="item.title" @click="goToDetails(item, '/product/details')">{{ item.title }}</div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<img v-if="item.isStore" class="touch" src="@/assets/home_images/to_like_h.png" title="点击取消收藏" @click="storeShowcase(item, 'product')"> <img v-if="item.isStore" class="touch" src="@/assets/home_images/to_like_h.png" title="点击取消收藏" @click="storeShowcase(item, 'product')">
...@@ -207,7 +207,7 @@ ...@@ -207,7 +207,7 @@
</el-image> </el-image>
<el-row> <el-row>
<el-col :span="21"> <el-col :span="21">
<div class="title touch" :title="item.title" @click="goToDetails(item, 'product')">{{ item.title }}</div> <div class="title touch" :title="item.title" @click="goToDetails(item, '/product/details')">{{ item.title }}</div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<img v-if="item.isStore" class="touch" src="@/assets/home_images/to_like_h.png" title="点击取消收藏" @click="storeShowcase(item, 'product')"> <img v-if="item.isStore" class="touch" src="@/assets/home_images/to_like_h.png" title="点击取消收藏" @click="storeShowcase(item, 'product')">
...@@ -470,10 +470,22 @@ export default { ...@@ -470,10 +470,22 @@ export default {
console.log(item, type) console.log(item, type)
this.$refs.inquiryView.initView(item.id, type) this.$refs.inquiryView.initView(item.id, type)
}, },
// 跳转到详情 // 点击收藏
goToDetails(item, type) { storeShowcase(item, type) {
item.isStore = !item.isStore
this.$message.warning({
message: `您${item.isStore ? '' : '已取消'}收藏了该产品!`
})
console.log(item, type) console.log(item, type)
}, },
// 跳转到详情
goToDetails(item, path) {
if (item) {
this.$router.push({ path: `${path}/${item.id || 123}` })
} else {
this.$router.push({ path: `${path}` })
}
},
pageChange(e) { pageChange(e) {
this.page = e this.page = e
this.loadData() this.loadData()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment