Browse Source

专题改版

master
jiazhipeng 6 months ago
parent
commit
88bd4347d7
  1. 216
      subPackages/activity/springTour.vue

216
subPackages/activity/springTour.vue

@ -1,22 +1,16 @@
<template> <template>
<view class="bg"> <view class="bg">
<img :src="showImg('/uploads/20250401/c1cd30fafca4c753259aa3272dc7852e.png')" class="topImg" /> <image :src="showImg('/uploads/20250411/c2f08776888c2c46ffbd2c48cc232baf.png')" class="topImg" />
<view class="rule" @click="goRule()">
<text style="padding-bottom: 6rpx;display: inline-block;">活动规则</text>
<uni-icons color="#ffffff" type="right" size="14"></uni-icons></view>
<img :src="showImg('/uploads/20250401/d87051740887376b0cb9b57b37485017.png')" class="coupon-header"> <image :src="showImg('/uploads/20250411/98c8999a389c972aa7e2af20595e4045.png')" class="coupon-header">
<view class="coupon-box"> <view class="coupon-box">
<view class="rule" @click="goRule()">规则</view> <view class="coupon-item" v-for="(item,i) in couponList" :key="i" @click="getCoupon(item)"
:style="{'backgroundImage':`url(${item.img})`}">
<view class="coupon-item" v-for="(item,i) in couponList" :key="i" @click="getCoupon(item)"> <image src="https://tongli.sz-trip.com/uploads/20250411/c5c7e3ee78863380bbdace18bd8ac228.png" class="coupon-btn" />
<view class="coupon-price">
<view >
<text style="font-weight: bold;font-size: 25rpx;"></text>{{item.price}}
</view>
</view>
<view class="coupon-content">
<view style="font-weight: bold;font-size: 24rpx;color: #333333;">{{item.title}}</view>
<view class="coupon-btn">立即领取</view>
</view>
</view> </view>
</view> </view>
@ -24,18 +18,29 @@
<view class="item" v-for="item in list" :key="item.id" @click="goDetailByType(item.goods)"> <view class="item" v-for="item in list" :key="item.id" @click="goDetailByType(item.goods)">
<image class="item-img" :src="showImg(item.goods.image)" mode=""></image> <image class="item-img" :src="showImg(item.goods.image)" mode=""></image>
<view class="content"> <view class="content">
<view class="title text-overflowRows">{{item.goods.title}}</view> <view>
<view class="title text-overflowRows">{{item.goods.title}}</view>
<view class="tag-content" v-if="item.goods.goods_new_tag">
<view class="tag-item" v-for="(tag,i) in item.goods.goods_new_tag.split(',')" :key="i">
{{tag}}
</view>
</view>
</view>
<view class="bottom"> <view class="bottom">
<view class="price"> <view >
{{item.goods.money/100}} <text class="oldPrice">{{item.goods.price/100}}</text>
<text class="price">{{item.goods.money/100}}</text>
</view> </view>
<view class="buy"> <view class="buy">
立即购买 抢购
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<image v-if="goTop" @click="Totop()" class="goTopImg" src="https://tongli.sz-trip.com/uploads/20250411/83aaaa1a483aa1effe82f6a869ffce50.png"></image>
</view> </view>
</template> </template>
@ -44,22 +49,37 @@
data() { data() {
return { return {
couponList: [ couponList: [
{id: 1, price:5, title: '满15减5'}, {id: 1, price:5, title: '满15减5',img: 'https://tongli.sz-trip.com/uploads/20250411/c94ac0d977b4767d2809134fdace5a62.png'},
{id: 2, price:10, title: '满30减10'}, {id: 2, price:10, title: '满30减10',img: 'https://tongli.sz-trip.com/uploads/20250411/15a8af6400b71c5b7e2f8da78ead6f04.png'},
{id: 3, price:15, title: '满50减15'}, {id: 3, price:15, title: '满50减15',img: 'https://tongli.sz-trip.com/uploads/20250411/529b589eec9ac511f13fadbdd8188f2c.png'},
{id: 4, price:20, title: '满60减20'}, {id: 4, price:20, title: '满60减20',img: 'https://tongli.sz-trip.com/uploads/20250411/883734155ee9cbbbcee590194f6143be.png'},
], ],
list:[], list:[],
finished: false, finished: false,
isReceive: true, isReceive: true,
goTop: false
} }
}, },
onReady() { onReady() {
this.getCouponId() this.getCouponId()
this.getList() this.getList()
}, },
onPageScroll(e){
//
if(e.scrollTop>200){
this.goTop=true;
}else{
this.goTop=false;
}
},
methods: { methods: {
Totop(){
uni.pageScrollTo({
scrollTop: 0,//
duration: 300
});
},
// id // id
getCouponId () { getCouponId () {
this.Post({id: 256},'/api/multimedia/detail').then(res=>{ this.Post({id: 256},'/api/multimedia/detail').then(res=>{
@ -140,43 +160,61 @@
} }
.bg { .bg {
background: #A2EEC0; background: #AFEBB7;
min-height: 100vh; min-height: 100vh;
padding-bottom: 26rpx; padding-bottom: 120rpx;
position: relative;
} }
.topImg { .topImg {
width: 750rpx; width: 750rpx;
height: 440rpx; height: 893.33rpx;
}
.rule{
width: 58rpx;
height: 170rpx;
background: rgba(255,122,69,0.86);
border-radius: 7rpx 0rpx 0rpx 7rpx;
border: 2px solid #FF503B;
font-weight: 500;
font-size: 27rpx;
color: #FFFFFF;
text-align: center;
position: absolute;
top: 529rpx;
right: 0;
padding: 8rpx 14rpx 0;
line-height: 28rpx;
} }
.box { .box {
margin-top: 50rpx; margin-top: 50rpx;
// border-radius: 20rpx 20rpx 0rpx 0rpx;
padding: 0 26rpx; padding: 0 26rpx;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
} }
.item { .item {
margin-bottom: 22rpx; margin-bottom: 22rpx;
width: 335rpx; width: 100%;
height: 448rpx; height: 272.67rpx;
background: #FFFFFF; position: relative;
box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(153,153,153,0.38);
border-radius: 13rpx;
} }
.item-img { .item-img {
width: 100%; width: 307rpx;
height: 266.67rpx; height: 100%;
border-radius: 13rpx 13rpx 0rpx 0rpx; background: #FA6216;
border-radius: 20rpx;
} }
.content { .content {
height: 145rpx; height: 100%;
padding: 0 13rpx 13.33rpx; width: 459rpx;
background: #FFFFFF;
border-radius: 20rpx;
position: absolute;
top: 0;
right: 0;
padding: 24rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
@ -184,10 +222,9 @@
.title { .title {
font-family: PingFang SC; font-family: PingFang SC;
font-size: 29rpx;
color: #000000;
width: 291rpx;
font-weight: 500; font-weight: 500;
font-size: 31rpx;
color: #00132F;
} }
.bottom { .bottom {
@ -195,31 +232,50 @@
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
.oldPrice{
font-weight: 400;
font-size: 24rpx;
color: #66676A;
line-height: 15rpx;
text-decoration-line: line-through;
display: block;
}
.price { .price {
font-size: 33.33rpx; font-size: 33.33rpx;
font-family: PingFangSC; font-family: PingFangSC;
font-weight: bold; font-weight: bold;
color: #F40F0B; color: #F75008;
} }
.price::before { .price::before {
content: '¥'; content: '¥';
font-size: 24rpx; font-size: 24rpx;
} }
.price::after { .tag-content {
content: '起'; display: flex;
font-size: 20rpx; width: 100%;
color: #666; overflow: hidden;
font-weight: 400; margin-top: 20rpx;
.tag-item{
border-radius: 20rpx;
border: 1px solid #FFA416;
font-weight: 500;
font-size: 24rpx;
color: #FFA416;
line-height: 23rpx;
padding:10rpx 20rpx;
flex-shrink: 0;
margin-right: 13rpx;
}
} }
.buy { .buy {
width: 151rpx; width: 107rpx;
height: 48rpx; height: 53rpx;
background: linear-gradient(180deg, #FB6493, #E2235B); background: linear-gradient(90deg, #FF413B, #FFAB2E);
border-radius: 24rpx; border-radius: 27rpx;
text-align: center; text-align: center;
line-height: 48rpx; line-height: 53rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: bold; font-weight: bold;
font-size: 27rpx; font-size: 27rpx;
@ -227,48 +283,34 @@
} }
.coupon-header{ .coupon-header{
width: 589.33rpx; width: 450rpx;
height: 75.33rpx; height: 100rpx;
display: block; display: block;
margin: 0 auto; margin: 0 auto;
position: relative; position: relative;
margin-top: 35rpx;
z-index: 2; z-index: 2;
} }
.coupon-box{ .coupon-box{
width: 697rpx; width: 697rpx;
height: 413rpx; height: 597rpx;
background: #FFFDEB; background: #FFFFFF;
border-radius: 20rpx; border-radius: 20rpx;
margin: -50rpx auto 0; margin: -50rpx auto 0;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between; justify-content: space-between;
padding: 92rpx 17rpx 0; padding: 62rpx 32rpx 0;
position: relative; position: relative;
z-index: 1; z-index: 1;
.rule{
width: 83rpx;
height: 40rpx;
background: #27967B;
border-radius: 20rpx 0rpx 0rpx 20rpx;
font-weight: 500;
font-size: 25rpx;
color: #FFFFFF;
position: absolute;
top: 13rpx;
right: 0;
text-align: center;
line-height: 40rpx;
}
.coupon-item{ .coupon-item{
width: 327.33rpx; width: 306.67rpx;
height: 120.67rpx; height: 233.33rpx;
display: flex; display: flex;
background-image: url("https://tongli.sz-trip.com/uploads/20250401/df0ba64e58d91457c062be571ea51b3e.png");
background-size: 100% 100%; background-size: 100% 100%;
margin-bottom: 24rpx;
} }
.coupon-price{ .coupon-price{
font-weight: 600; font-weight: 600;
@ -287,16 +329,16 @@
flex: 1; flex: 1;
} }
.coupon-btn{ .coupon-btn{
width: 133rpx; width: 205.33rpx;
height: 40rpx; height: 48.67rpx;
background: linear-gradient(180deg, #FB6493, #E2235B); margin: 161rpx auto 0;
border-radius: 20rpx;
font-weight: bold;
font-size: 24rpx;
color: #FFFFFF;
text-align: center;
line-height: 40rpx;
} }
} }
.goTopImg{
width: 102rpx;
height: 102rpx;
position: fixed;
right: 28rpx;
bottom: 48rpx;
}
</style> </style>

Loading…
Cancel
Save