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.
156 lines
3.0 KiB
156 lines
3.0 KiB
<template>
|
|
<view class="coupon">
|
|
<view class="coupon-hd">
|
|
<image src="@/static/news/coupon-bg.jpg"></image>
|
|
</view>
|
|
<view class="coupon-tab">
|
|
<view class="item" :class="tabIndex == 0?'item-on':''" @click="tabItem(0)">商品券</view>
|
|
<view class="item" :class="tabIndex == 1?'item-on':''" @click="tabItem(1)">服务券</view>
|
|
</view>
|
|
<view class="coupon-bd">
|
|
<view class="item" v-for="i in 10" :key="i" @click="openPage()">
|
|
<view class="a">¥<text>890</text></view>
|
|
<view class="b">满999元使用</view>
|
|
<view class="c">适用于全场商品</view>
|
|
<view class="d">点击领取</view>
|
|
<image src="@/static/news/icon-coupon-01.png"></image>
|
|
</view>
|
|
</view>
|
|
<view class="nolist">
|
|
<image src="@/static/news/icon-coupon-03.png"></image>
|
|
<view class="txt">暂无已使用优惠券</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
tabIndex: 0
|
|
}
|
|
},
|
|
methods: {
|
|
openPage() {
|
|
uni.navigateTo({
|
|
url: "/pages/news/coupon/list"
|
|
})
|
|
},
|
|
tabItem(index){
|
|
this.tabIndex = index
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.coupon{
|
|
background-color: #FB3A22;
|
|
overflow: hidden;
|
|
.nolist{
|
|
width: 100%;
|
|
display: block;
|
|
margin: 0 auto;
|
|
text-align: center;
|
|
padding: 150rpx 50rpx;
|
|
image{
|
|
width: 388rpx;
|
|
height: 378rpx;
|
|
}
|
|
.txt{
|
|
font-size: 32rpx;
|
|
margin-top: 20rpx;
|
|
font-weight: 500;
|
|
color: #fff;
|
|
}
|
|
}
|
|
&-hd{
|
|
width: 100%;
|
|
height: 445rpx;
|
|
image{
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
}
|
|
&-tab{
|
|
padding: 0 40rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
.item{
|
|
width: 316rpx;
|
|
line-height: 80rpx;
|
|
border-radius: 10rpx;
|
|
font-size: 32rpx;
|
|
color: #FFFFFF;
|
|
text-align: center;
|
|
&-on{
|
|
color: #F34A40;
|
|
background: #FFFFFF;
|
|
}
|
|
}
|
|
}
|
|
&-bd{
|
|
padding: 0 40rpx 40rpx;
|
|
overflow: hidden;
|
|
.item{
|
|
width: 662rpx;
|
|
height: 366rpx;
|
|
position: relative;
|
|
margin-top: 20rpx;
|
|
overflow: hidden;
|
|
image{
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
.a{
|
|
width: 100%;
|
|
position: absolute;
|
|
left: 60rpx;
|
|
top: 70rpx;
|
|
z-index: 2;
|
|
font-size: 36rpx;
|
|
font-weight: 500;
|
|
color: #FE6900;
|
|
text{
|
|
font-size: 68rpx;
|
|
}
|
|
}
|
|
.b{
|
|
width: 100%;
|
|
position: absolute;
|
|
left: 60rpx;
|
|
top: 160rpx;
|
|
z-index: 2;
|
|
font-size: 32rpx;
|
|
font-weight: 500;
|
|
color: #6B6B6B;
|
|
}
|
|
.c{
|
|
width: 100%;
|
|
position: absolute;
|
|
left: 60rpx;
|
|
bottom: 20rpx;
|
|
z-index: 2;
|
|
font-size: 28rpx;
|
|
font-weight: 500;
|
|
color: #A7572C;
|
|
}
|
|
.d{
|
|
width: 188rpx;
|
|
line-height: 68rpx;
|
|
background: linear-gradient(180deg, #FF7366 0%, #FF5242 100%);
|
|
border-radius: 68rpx;
|
|
position: absolute;
|
|
right: 28rpx;
|
|
top: 40rpx;
|
|
z-index: 2;
|
|
font-size: 28rpx;
|
|
font-weight: 500;
|
|
color: #FFFFFF;
|
|
text-align: center;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|
|
|