Commit a51b2793 authored by 李晓兵's avatar 李晓兵

'我的收藏'

parent edd7e3c6
...@@ -17,6 +17,30 @@ ...@@ -17,6 +17,30 @@
<img src="@/assets/distributorSign/search.png" alt=""> <img src="@/assets/distributorSign/search.png" alt="">
</div> </div>
</div> </div>
<list-item v-for="item in productList" :key="item.product_id">
<item :proportion="[1,4]" @click.native="goDetailed(item.product_id,item.collect_status)">
<div slot="name" class="item-pic">
<img src="@/assets/homePage/WechatIMG2 Copy@2x.png" alt="">
</div>
<div slot="content" class="item-content">
<div class="centers">
<p class="firsts1">经销商</p>
<p class="seconds1">{{ item.bp_name }}</p>
</div>
<div class="centers">
<p class="firsts1">参数项</p>
<p class="seconds1">{{ item.product_code }}</p>
</div>
<div class="centers">
<p class="firsts1">产品名称</p>
<p class="seconds1">{{ item.product_name }}</p>
</div>
</div>
<div slot="right-icon">
<img class="arrow" src="@/assets/productQuery/getIn.png" alt="" >
</div>
</item>
</list-item>
</h-content> </h-content>
</h-view> </h-view>
</template> </template>
...@@ -24,7 +48,9 @@ ...@@ -24,7 +48,9 @@
<script> <script>
export default { export default {
data() { data() {
return {} return {
productList: [],
}
}, },
created: function () { created: function () {
}, },
...@@ -34,7 +60,40 @@ ...@@ -34,7 +60,40 @@
}, },
destroyed: function () { destroyed: function () {
}, },
methods: {} beforeRouteEnter (to, from, next) {
next(vm => {
if (from.name === 'MyInfo') {
vm.getList()
}
})
},
methods: {
getList(){
let vm = this
let url = $config.basePath + 'my_collection_query'
let param = {
user_phone: window.localStorage.getItem('user_phone'),
}
vm.$post(url, param).then(function (res) {
if (res.result === 'S') {
vm.productList = res.lists
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
// val:产品id, status: 收藏状态
goDetailed (val, status) { // 进入产品查询功能明细页面
window.sessionStorage.setItem('collect_status', status)
this.$router.push({
name: 'ProDetailed',
params: {
product_id: val,
// collect_status: status,
},
})
},
}
} }
</script> </script>
...@@ -87,4 +146,58 @@ ...@@ -87,4 +146,58 @@
} }
} }
} }
.arrow {
width: 16px;
height: 16px;
// margin-left: 30px;
margin-top: 16px;
}
.item-pic {
width: 100px;
//height: 110px;
img {
width: 100%;
height: 100%;
}
}
.item-content {
// height: 102px;
width: 100%;
margin-left: 20px;
.centers:nth-of-type(1) {
margin-top: 16px;
}
.centers:nth-of-type(2) {
margin-top: 6px;
}
.centers:nth-of-type(3) {
margin-top: 6px;
}
.centers {
// margin-top: 6px;
// white-space: nowrap;
// width: 100%;
font-family: PingFangSC-Semibold;
font-size: 13px;
color: rgba(56,63,69,0.60);
letter-spacing: 0.5px;
display: flex;
flex-direction: row;
.firsts1 {
width: 60px;
height: 17px;
font-family: PingFangSC-Regular;
font-size: 13px;
color: rgba(56,63,69,0.60);
}
.seconds1 {
width: 70%;
margin-left: 16px;
height: auto;
font-family: PingFangSC-Regular;
font-size: 13px;
color: #383F45;
}
}
}
</style> </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