Browse Source

完成秒杀专场页面UI

master
邓平艺 4 years ago
parent
commit
9bc0dd5d39
  1. 4
      components/lf-seckill/lf-seckill.vue
  2. 7
      pages.json
  3. 142
      pages/shop/seckillList.vue

4
components/lf-seckill/lf-seckill.vue

@ -1,12 +1,12 @@
<template>
<view class="content">
<view class="title">剁手不心疼</view>
<view class="card">
<view class="card" @click="$url('/pages/shop/seckillList')">
<view class="title">秒杀购</view>
<view class="desc">低价不等人快来秒杀啦</view>
<scroll-view class="scroll-view" :scroll-x="true">
<view class="lf-flex">
<view class="goods-item" v-for="(item, index) in 4" :key="index" @click="$url('/pages/shop/goodsdetail')">
<view class="goods-item" v-for="(item, index) in 4" :key="index">
<image class="goods-img"></image>
<view class="lf-line-1 goods-title">日本sk-ll小灯跑</view>
<view class="goods-price">

7
pages.json

@ -844,6 +844,13 @@
"navigationBarTitleText": "商品专题列表",
"navigationStyle": "custom"
}
},
{
"path" : "pages/shop/seckillList",
"style" : {
"navigationBarTitleText": "秒杀专场",
"navigationStyle": "custom"
}
}
],
"globalStyle": {

142
pages/shop/seckillList.vue

@ -0,0 +1,142 @@
<template>
<view>
<lf-nav title="秒杀专场" :showIcon="true" bgColor="#fff"></lf-nav>
<view class="content">
<view class="card" v-for="(item, index) in 7" :key="index" @click="$url('/pages/shop/goodsdetail')">
<view class="goods-img">
<image class="img" src="https://picsum.photos/200/300"></image>
<view class="tips">已有0人购买</view>
</view>
<view class="goods-info">
<view>
<view class="lf-line-2 title">SK-II秋日宠粉体验套装</view>
<view class="desc">距离开始还剩余 20:34:18</view>
</view>
<view class="lf-row-between">
<view class="price">
<text>¥888</text>
<text>¥10000</text>
</view>
<view class="btn" hover-class="lf-opacity">立即秒杀</view>
</view>
</view>
</view>
</view>
<u-back-top :scrollTop="pageScrollTop"></u-back-top>
</view>
</template>
<script>
export default {
data(){
return {
}
},
onLoad(){
},
methods: {
}
}
</script>
<style>
page{
background-color: #F8F8F8;
}
</style>
<style lang="scss" scoped="scoped">
.content{
padding: 30rpx 32rpx;
width: 750rpx;
height: max-content;
box-sizing: border-box;
.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;
}
.tips{
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 37rpx;
background-color: rgba(0,0,0,0.5);
color: #FFFFFF;
font-size: 22rpx;
display: flex;
justify-content: center;
align-items: center;
}
}
.goods-info{
width: 410rpx;
height: 200rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
.title{
font-size: 28rpx;
color: #222222;
font-weight: bold;
}
.desc{
width: 281rpx;
height: 35rpx;
border-radius: 3rpx;
background-color: #E9F2F2;
font-size: 24rpx;
color: #15716E;
display: flex;
justify-content: center;
align-items: center;
margin-top: 10rpx;
}
.price>text:nth-child(1){
font-size: 36rpx;
color: #F63434;
font-weight: bold;
}
.price>text:nth-child(2){
font-size: 24rpx;
color: #777777;
margin-left: 20rpx;
text-decoration: line-through;
}
.btn{
width: 142rpx;
height: 60rpx;
background: rgba(21, 113, 110, 0.05);
border-radius: 36rpx;
border: 2rpx solid #15716E;
font-size: 26rpx;
color: #15716E;
display: flex;
justify-content: center;
align-items: center;
}
}
}
}
</style>
Loading…
Cancel
Save