You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
107 lines
2.1 KiB
107 lines
2.1 KiB
<template>
|
|
<view class="content">
|
|
<view class="shop" @click="$url(main[0].link)">
|
|
<image class="img" :src="main[0] && main[0].image" mode="aspectFill"></image>
|
|
</view>
|
|
<scroll-view class="scroll-view" :scroll-x="true">
|
|
<view class="scroll-content">
|
|
<view class="goods-item"
|
|
v-for="(item, index) in list" :key="index"
|
|
@click="$url('/pages/shop/goodsdetail?id='+ item.associate.id)">
|
|
<image class="goods-img" :src="item.associate.img"></image>
|
|
<view class="goods-info">
|
|
<view class="lf-line-1">{{ item.associate.name }}</view>
|
|
<view>¥{{ item.associate.sell_price }}</view>
|
|
</view>
|
|
</view>
|
|
<view class="goods-item" @click="$url('/pages/shop/specialList')">
|
|
<view class="more-box">
|
|
<text>查看更多</text>
|
|
<text class="lf-iconfont icon--2 lf-text-vertical"></text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
props: {
|
|
list: {
|
|
type: Array,
|
|
default: []
|
|
},
|
|
main: {
|
|
type: Array,
|
|
default: []
|
|
}
|
|
},
|
|
data(){
|
|
return {
|
|
|
|
}
|
|
},
|
|
created(){
|
|
|
|
},
|
|
methods: {
|
|
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped="scoped">
|
|
.content{
|
|
width: 750rpx;
|
|
height: max-content;
|
|
box-sizing: border-box;
|
|
padding: 0rpx 32rpx;
|
|
.shop{
|
|
width: 100%;
|
|
height: 245rpx;
|
|
.img{
|
|
width: 100%;
|
|
height: 100%;
|
|
border-radius: 20rpx 20rpx 0rpx 0rpx;
|
|
}
|
|
}
|
|
.scroll-view{
|
|
height: 280rpx;
|
|
width: 100%;
|
|
margin-top: 20rpx;
|
|
.scroll-content{
|
|
display: flex;
|
|
width: 100%;
|
|
.goods-item{
|
|
margin-right: 15rpx;
|
|
width: 180rpx;
|
|
}
|
|
.goods-img{
|
|
width: 180rpx;
|
|
height: 180rpx;
|
|
background-color: #EEEEEE;
|
|
}
|
|
.goods-info{
|
|
text-align: center;
|
|
color: #222222;
|
|
&>view:nth-child(1n){
|
|
font-size: 24rpx;
|
|
}
|
|
&>view:nth-child(2n){
|
|
font-size: 28rpx;
|
|
font-weight: bold;
|
|
}
|
|
}
|
|
.more-box{
|
|
width: 180rpx;
|
|
height: 180rpx;
|
|
background-color: #EEEEEE;
|
|
text-align: center;
|
|
line-height: 180rpx;
|
|
font-size: 24rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|