金诚优选前端代码
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.
 
 
 
 
 

163 lines
3.1 KiB

<template>
<view>
<lf-nav :showIcon="true" bgColor="transparent" :spreadOut="false"></lf-nav>
<view class="head">
<image class="img" mode="aspectFill" src="https://picsum.photos/200/300?grayscale"></image>
<view class="title">热销榜单</view>
</view>
<view class="content">
<view class="card" v-for="(item, index) in 7" :key="index" @click="$url('/pages/shop/goodsdetail?id='+ item.id)">
<view class="goods-img">
<image class="img" src="https://picsum.photos/200/300"></image>
<view class="ranking">
<view class="top">{{ item+1 }}</view>
<view class="down"></view>
</view>
</view>
<view class="goods-info">
<view>
<view class="lf-line-2 title">SK-II秋日宠粉体验套装</view>
<view class="desc">月销量:324</view>
</view>
<view class="lf-row-between">
<view class="price">
<text>¥888</text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data(){
return {
}
},
onLoad(){
},
methods: {
}
}
</script>
<style>
page{
background-color: #F8F8F8;
}
</style>
<style lang="scss" scoped="scoped">
.head{
width: 750rpx;
height: 430rpx;
position: relative;
.img{
width: 100%;
height: 100%;
}
.title{
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
font-size: 100rpx;
color: #FFFFFF;
font-weight: bold;
font-family: '楷体';
}
}
.content{
padding: 30rpx 32rpx;
.card{
width: 686rpx;
height: 260rpx;
background: #FFFFFF;
border-radius: 20rpx;
box-sizing: border-box;
padding: 30rpx;
display: flex;
&:nth-child(n+2){
margin-top: 30rpx;
}
.goods-img{
width: 200rpx;
height: 200rpx;
border-radius: 10rpx;
overflow: hidden;
position: relative;
margin-right: 15rpx;
.img{
width: 100%;
height: 100%;
background-color: #EEEEEE;
}
.ranking{
position: absolute;
top: 0;
left: 0;
width: 36rpx;
height: 56rpx;
overflow: hidden;
.top{
width: 36rpx;
height: 36rpx;
background-color: #15716E;
position: relative;
z-index: 3;
text-align: center;
color: #FFFFFF;
font-size: 28rpx;
}
.down{
width: 36rpx;
height: 36rpx;
background-color: #15716E;
transform: rotate(45deg);
margin-top: -26rpx;
position: relative;
z-index: 1;
}
}
}
.goods-info{
width: 410rpx;
height: 200rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
.title{
font-size: 28rpx;
color: #222222;
}
.desc{
width: max-content;
height: 35rpx;
border-radius: 18rpx;
background-color: #E9F2F2;
font-size: 24rpx;
color: #15716E;
display: flex;
justify-content: center;
align-items: center;
margin-top: 10rpx;
padding: 0 10rpx;
}
.price>text:nth-child(1){
font-size: 32rpx;
color: #222222;
font-weight: bold;
}
}
}
}
</style>