Commit 09303bef authored by zhanglw's avatar zhanglw

收藏供应商

parent 4bef0bcf
......@@ -180,6 +180,14 @@ export const constantRouterMap = [
},
hidden: true
},
{
path: '/console/collectSup',
meta: { title: '个人中心-收藏的供应商', noCache: true },
component: (resolve) => {
return require(['@/views/homepage/console/collectSup'], resolve)
},
hidden: true
},
{
path: '/backstage',
component: Layout,
......
......@@ -12,7 +12,7 @@
<span>供应</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('/home')">收藏的供应商</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==='5'?'active':''" @click="menuClick('/home')">询价记录</span></div>
</div>
</template>
......
......@@ -27,7 +27,7 @@
<span v-if="query.type==='hot'"><i v-if="query.sort" class="el-icon-sort-up touch" /><i v-else class="el-icon-sort-down touch" /></span>
</div>
</div>
<div style="width: 100%;height: 62vh;margin-top: 7px">
<div style="width: 100%;height: 62vh;margin-top: 7px;overflow: auto">
<div v-for="(item,index) in tableData" :key="'p_'+index" class="box-card-s">
<el-image
:src="item.imgSrc?imgSrcStart+'/img'+item.imgSrc:defaultImgProduct"
......
<template>
<div class="page-body">
<div class="head-box">
<div class="head-box-top">
<div class="top-call" />
<div class="top-call"><img src="@/assets/home_images/gemho_logo_b.png"></div>
<div class="top-call"><title-menus ref="titleMenus" menu-index="99" style="padding-top: 15px" /></div>
<div class="top-call"><user-login ref="userLogin" /></div>
<div class="top-call"><language-setting ref="languageSetting" /></div>
</div>
</div>
<div class="content-box">
<div style="width: 88%;padding-left: 9%;">
<el-row :gutter="20" style="padding-top: 10px">
<el-col :span="3">
<user-menus menu-index="4" />
</el-col>
<el-col :span="21" style="padding: 0 20px">
<div style="width: 100%;height: 66vh;margin-top: 5px;overflow: auto">
<!--供应商展柜-->
<div v-for="(item,index) in tableData" :key="'s_'+index" class="showcase-line">
<div class="supplier_card" style="position: relative;">
<div class="sup_btn touch" style="position: absolute;top: 15px;right: 30px" @click="goToDetails(item, '/supplier/details')">查看产品</div>
<div class="sup_btn touch" style="position: absolute;top: 60px;right: 30px;background: transparent;color: #FB7B09" @click="inquiry(item, 'supplier')">留言咨询</div>
<div class="sup_title">
<span class="touch" @click="goToDetails(item, '/supplier/details')">{{ item.name }}</span>
</div>
<div class="sup_area">
<img src="@/assets/home_images/locate.png">
<span>{{ item.area }}</span>
<img v-if="item.isStore" class="touch" src="@/assets/home_images/to_like_h.png" title="点击取消收藏" style="right:-12px;top:7px" @click="storeShowcase(item, 'supplier')">
<img v-else class="touch" src="@/assets/home_images/to_like.png" title="点击收藏" style="right:-12px;top:7px" @click="storeShowcase(item, 'supplier')">
</div>
<div style="margin: 25px 40px">
<div class="block-c">
<div>成立时间</div>
<div>{{ item.createTime }}</div>
</div>
<div class="block-c">
<div>可购品类数</div>
<div style="color: #EF1F1F">{{ item.classSum }}</div>
</div>
<div class="block-c">
<div>产品价格区间</div>
<div style="color: #EF1F1F">{{ item.price }}</div>
</div>
</div>
<el-row style="margin-top: 38px">
<el-col :span="3">
<div class="block-b">主营品类:</div>
</el-col>
<el-col :span="21">
<div class="block-b ellipsis">{{ item.mainProduct }}</div>
</el-col>
</el-row>
</div>
<div v-for="(p,i) in item.products" :key="'p_'+index+'_'+i" class="product_card">
<el-image :src="p.imgSrc?imgSrcStart+'/img'+p.imgSrc:defaultImgProduct" style="width:240px;height: 220px;border-radius: 10px;" />
<div class="product_title touch ellipsis" :title="p.name" @click="goToDetails(p, '/product/details')">{{ p.name }}</div>
</div>
</div>
</div>
<!--分页组件-->
<el-pagination :total="total" :current-page="page" :page-size="pageSize" style="margin-top: 8px;" layout="total, prev, pager, next, sizes" @size-change="sizeChange" @current-change="pageChange" />
</el-col>
</el-row>
</div>
</div>
<home-footer ref="homeFooter" />
<inquiry-view ref="inquiryView" />
<el-backtop />
</div>
</template>
<script>
import default_product from '@/assets/home_images/default_product.png'
import titleMenus from '../components/titleMenusV2'
import userLogin from '../components/userLoginV2'
import languageSetting from '../components/languageSettingV2'
import homeFooter from '../components/homeFooter'
import inquiryView from '../components/inquiryView'
import userMenus from '../components/userMenus'
export default {
components: { titleMenus, userLogin, languageSetting, homeFooter, inquiryView, userMenus },
data() {
return {
defaultImgProduct: default_product,
imgSrcStart: process.env.VUE_APP_BASE_API,
page: 1,
pageSize: 8,
total: 0,
query: {
keyword: '',
area: undefined,
type: undefined,
sort: false
},
tableData: [
{
isGood: true,
isStore: true,
name: '佛山英沃传感器科技有限公司',
area: '江苏省淮安市',
createTime: '2023 01-01 ',
classSum: '18',
price: '15 -300元',
mainProduct: '温度传感器 热电偶传感器 流量计 报做仪 pt100热电阳 压力变送器 气体检测仪 氟化氢检测仪',
products: [
{ name: '3GDN M30百流三线防 爆电感式接近传感爆电感式接近传感爆电感式接近传感爆电感式接近传感', imgSrc: '' },
{ name: '3GDN M30百流三线防 爆电感式接近传感', imgSrc: '' }
]
}, {
isGood: false,
isStore: false,
name: '佛山英沃传感器科技有限公司',
area: '江苏省淮安市',
createTime: '2023 01-01 ',
classSum: '18',
price: '15 -300元',
mainProduct: '温度传感器 热电偶传感器 流量计 报做仪 pt100热电阳 压力变送器 气体检测仪 氟化氢检测仪',
products: [
{ name: '3GDN M30百流三线防 爆电感式接近传感爆电感式接近传感爆电感式接近传感爆电感式接近传感', imgSrc: '' },
{ name: '3GDN M30百流三线防 爆电感式接近传感', imgSrc: '' }
]
}, {
isGood: true,
isStore: false,
name: '佛山英沃传感器科技有限公司',
area: '江苏省淮安市',
createTime: '2023 01-01 ',
classSum: '18',
price: '15 -300元',
mainProduct: '温度传感器 热电偶传感器 流量计 报做仪 pt100热电阳 压力变送器 气体检测仪 氟化氢检测仪',
products: [
{ name: '3GDN M30百流三线防 爆电感式接近传感爆电感式接近传感爆电感式接近传感爆电感式接近传感', imgSrc: '' },
{ name: '3GDN M30百流三线防 爆电感式接近传感', imgSrc: '' }
]
}
],
throttle: null, // 节流器
throttleTime: 300
}
},
mounted() {
this.$nextTick(() => {
})
},
methods: {
setQuertType(type) {
if (type === this.query.type) {
this.query.sort = !this.query.sort
} else {
this.query.type = type
this.query.sort = false
}
},
// 点击询价
inquiry(item, type) {
console.log(item, type)
this.$refs.inquiryView.initView(item.id, type)
},
// 点击收藏
storeShowcase(item, type) {
item.isStore = !item.isStore
this.$message.warning({
message: `您${item.isStore ? '' : '已取消'}收藏了该产品!`
})
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) {
this.page = e
this.loadData()
},
sizeChange(e) {
this.page = 1
this.pageSize = e
this.loadData()
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.touch {
cursor:pointer;
}
.clear {
clear: both
}
.inline-block {
display: inline-block;
}
.ellipsis {
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
-webkit-line-clamp: 2;
text-overflow: ellipsis;
}
.head-box {
width: 100vw;
top: 0;
position: fixed;
background: none repeat scroll 0 0 white;
z-index: 999;
box-shadow: 0px 3px 7px 0px rgba(0,0,0,0.2);
.head-box-top {
display: flex;
justify-content: space-evenly;
align-items: center;
.top-call {
height: 80px;
padding-top: 15px;
}
}
}
.content-box {
min-height: 70vh;
margin-top: 94px;
font-family: Source Han Sans CN;
user-select: none;
.showcase-line {
margin: 16px 0 28px;
display: flex;
justify-content: space-between;
font-family: Source Han Sans CN;
font-weight: 400;
}
.supplier_card {
padding: 10px 20px;
width: 742px;
height: 278px;
background: #F3F4F5;
border: 1px solid rgba(25,97,197,0.12);
box-shadow: 1px 2px 8px 0 rgba(0,0,0,0.12);
border-radius: 10px;
.sup_btn {
width: 124px;
height: 36px;
padding: 6px;
background: #FB7B09 ;
border: 1px solid #FB7B09 ;
border-radius: 10px;
font-size: 20px;
color: #FFFFFF;
text-align: center;
}
.sup_btn:hover {
font-weight: bold;
}
.sup_title {
max-width: 540px;
color: #1961C5;
font-size: 26px;
line-height: 34px;
span:hover {
font-weight: bolder;
}
}
.sup_area {
padding: 10px 0;
color: #666666;
font-size: 18px;
img {
position:relative;
top:4px;
}
}
.block-c {
display: inline-block;
width: 180px;
font-size: 20px;
line-height: 26px;
font-weight: 600;
color: #333333;
text-align: center;
opacity: 0.9;
}
.block-b {
height: 50px;
font-size: 18px;
color: #666666;
line-height: 25px;
opacity: 0.9;
}
}
.product_card {
width: 240px;
height: 278px;
background: #FFFFFF;
border: 1px solid rgba(0,0,0,0.12);
box-shadow: 1px 2px 8px 0 rgba(0,0,0,0.12);
border-radius: 10px;
.product_title {
padding: 0 10px;
width: 100%;
height: 40px;
line-height: 20px;
text-align: center;
}
.product_title:hover {
font-weight: bolder;
}
}
}
.line-btn {
display: flex;
justify-content: center;
font-family: Source Han Sans CN;
font-weight: 400;
.btn-o {
margin: 0 25px;
width: 360px;
padding: 6px 10px;
background: #F7601A;
box-shadow: 0 3px 6px 0 rgba(0,0,0,0.2);
text-align: center;
border: 1px solid transparent;
font-size: 22px;
color: #FFFFFF;
cursor:pointer;
user-select: none;
}
.btn-o:hover {
border: 1px solid rgba(30, 144, 255, 0.8);
color: #1482f0;
}
.btn-l {
margin: 0 25px;
width: 360px;
padding: 10px;
background: #1961C5;
box-shadow: 0 3px 6px 0 rgba(0,0,0,0.2);
text-align: center;
border: 1px solid transparent;
font-size: 22px;
color: #FFFFFF;
cursor:pointer;
user-select: none;
}
.btn-l:hover {
border: 1px solid rgba(0,0,0,0.3);
color: #F7601A;
}
.btn-b {
margin: 0 10px;
width: 168px;
padding: 6px;
background: #EFF6FF;
border: 1px solid transparent;
box-shadow: 0 1px 2px 0 rgba(0,0,0,0.2);
text-align: center;
font-size: 20px;
color: #1961C5;
cursor:pointer;
user-select: none;
}
.btn-b:hover {
border: 1px solid rgba(30, 144, 255, 0.9);
}
.active {
color: #FFFFFF;
font-weight: 400;
background: #1961C5;
}
}
</style>
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