首页部分提交

This commit is contained in:
duan
2025-03-11 09:56:55 +08:00
parent 5342133cbd
commit c1917c5fa3
7 changed files with 1872 additions and 710 deletions

View File

@@ -3,11 +3,12 @@
<view class="onecontentleft" v-if="bannervo">
现有<text style="color: #FC851E;font-size: 24rpx;">
{{bannervo.coupons==null?116:bannervo.coupons}}
<!-- {{bannervo.coupons==null?116:bannervo.coupons}} -->
</text>
已免单
</view>
<view class="onecontentright flex-start">
<view class="onecontentrightimage" v-if="bannervo">
<!-- <view class="onecontentrightimage" v-if="bannervo">
<view class="swiperPanel" @touchstart="startMove" @touchend="endMove">
<view class="swiperItem" v-for="(item, index) in bannervo.counponsInfo" :key="index"
:style="{transform: itemStyle[index].transform, zIndex: itemStyle[index].zIndex, opacity: itemStyle[index].opacity}">
@@ -16,17 +17,24 @@
</view>
</view>
</view>
</view> -->
<view style="overflow: hidden;width: 100rpx;">
<view style="width: 600rpx;" class="swiperstyle">
<image style="width: 30rpx;height: 30rpx;border-radius: 50%;display: inline-block;"
v-for="(item, index) in listData" :key="index" :src="item.logo">
</image>
</view>
</view>
<view class="onecontentrighttext">
<swiper class="swiper" circular :autoplay="true" :vertical='true' :interval="2000">
<swiper-item class="swiperitem" v-for="(item,index) in bannervo.counponsInfo" :key="index">
<swiper-item class="swiperitem" v-for="(item,index) in bannervo" :key="index">
{{item.name}}已省{{item.money}}元钱
</swiper-item>
</swiper>
</view>
</view>
<!-- 小内切圆 -->
<view class="after"></view>
<!-- <view class="after"></view> -->
</view>
</template>
@@ -35,7 +43,9 @@
defineProps,
onBeforeUnmount,
reactive,
defineExpose
defineExpose,
ref,
watch
} from 'vue';
const props = defineProps({
bannervo: {
@@ -51,6 +61,13 @@
}] //
}
});
const listData = ref()
const listdataNumber = ref(4)
watch(() => props.bannervo, (n, o) => {
listData.value = [...props.bannervo,...props.bannervo]
})
const slideNote = reactive({
x: 0,
y: 0
@@ -137,6 +154,11 @@
align-items: center;
justify-content: center;
.swiperstyle {
position: relative;
animation: animationName 5s linear infinite;
}
.onecontentrightimage {
width: 65rpx;
position: relative;
@@ -207,7 +229,7 @@
.onecontentrighttext {
width: 232rpx;
margin-left: 20rpx;
.swiper {
height: 28rpx;
// width: 232rpx;
@@ -239,4 +261,16 @@
z-index: 9999;
}
}
@keyframes animationName {
0% {
/* 动画开始时的样式 */
left: 0;
}
100% {
/* 动画结束时的样式 */
left: -290rpx;
}
}
</style>

View File

@@ -1,5 +1,5 @@
<template>
<view class="therecontent flex-between" v-if="salesList">
<view class="therecontent flex-between" >
<view class="therecontent_box_item">
<view class="therecontent_box_imge flex-between" @click="jrtoday(0)">
<view class="therecontent_box_imge_text">
@@ -13,14 +13,14 @@
</view>
</view>
<view class="therecontent_box_itembox">
<view class="therecontent_box_itembox_item flex-between" v-for="(item,index) in todayList.todayList"
<view class="therecontent_box_itembox_item flex-between" v-for="(item,index) in todayList.hotList"
:key="index" @click="clickproduct(item)">
<image :src="`${item.image}?x-oss-process=image/resize,m_lfit,w_114,h_136`" mode="aspectFill">
<image :src="`${item.coverImg}?x-oss-process=image/resize,m_lfit,w_114,h_136`" mode="aspectFill">
</image>
<view class="therecontent_box_itembox_itemview flex-colum-start">
<view class="therecontent_box_itembox_itemviewone">
<text
style="margin-left: 0;">{{item.productName.length>5?item.productName.substring(0,5)+'...':item.productName}}</text>
style="margin-left: 0;">{{item.name.length>5?item.name.substring(0,5)+'...':item.name}}</text>
</view>
<view class="therecontent_box_itembox_itemviewtow flex-around">
<image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/index/xia.png" mode="widthFix">
@@ -54,17 +54,17 @@
<view class="therecontent_box_itembox">
<view class="therecontent_box_itembox_item flex-between" v-for="(item,index) in salesList.hotList"
:key="index" @click="clickproduct(item)">
<image :src="`${item.image}?x-oss-process=image/resize,m_lfit,w_114,h_136`" mode="aspectFill">
<image :src="`${item.coverImg}?x-oss-process=image/resize,m_lfit,w_114,h_136`" mode="aspectFill">
</image>
<view class="therecontent_box_itembox_itemview flex-colum-start">
<view class="therecontent_box_itembox_itemviewone flex-start">
<view class="therecontent_box_itembox_itemviewoneafter">
TOP.{{index + 1}}
</view>
<text>{{ item.productName.length>5?item.productName.substring(0,5)+'...':item.productName }}</text>
<text>{{ item.name.length>5?item.name.substring(0,5)+'...':item.name }}</text>
</view>
<view class="therecontent_box_itembox_itemviewtowdiscount flex-around">
已抢{{item.realSalesNumber}}
已抢{{item.saleNum}}
</view>
<view class="therecontent_box_itembox_itemviewthere ">
<text>{{item.salePrice}}</text>