首頁組件

This commit is contained in:
魏啾
2024-04-15 16:15:09 +08:00
parent 289b808bf6
commit 091552233c
36 changed files with 3452 additions and 295 deletions

View File

@@ -1,7 +1,7 @@
<template>
<view class="therecontent flex-between">
<view class="therecontent_box_item">
<view class="therecontent_box_imge flex-between">
<view class="therecontent_box_imge flex-between" @click="jrtoday(0)">
<view class="therecontent_box_imge_text">
{{todayList.name}}
</view>
@@ -14,17 +14,17 @@
</view>
<view class="therecontent_box_itembox">
<view class="therecontent_box_itembox_item flex-between" v-for="(item,index) in todayList.todayList"
:key="item">
:key="index">
<image :src="item.image" mode="aspectFill"></image>
<view class="therecontent_box_itembox_itemview">
<view class="therecontent_box_itembox_itemview flex-colum-start">
<view class="therecontent_box_itembox_itemviewone">
{{item.productName}}
<text style="margin-left: 0;">{{item.productName}}</text>
</view>
<view class="therecontent_box_itembox_itemviewtow flex-start">
<view class="therecontent_box_itembox_itemviewtow flex-around">
<image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/index/xia.png" mode="widthFix">
</image>
<view>
8
{{item.discount || '1'}}
</view>
</view>
<view class="therecontent_box_itembox_itemviewthere flex-start">
@@ -37,7 +37,7 @@
</view>
<view class="therecontent_box_item">
<view class="therecontent_box_imge flex-between"
style="background: url(https://czg-qr-order.oss-cn-beijing.aliyuncs.com/index/towcontent_box2.png) no-repeat;">
style="background: url(https://czg-qr-order.oss-cn-beijing.aliyuncs.com/index/towcontent_box2.png) no-repeat; background-size: cover;" @click="jrtoday(1)">
<view class="therecontent_box_imge_text">
{{salesList.name}}
</view>
@@ -49,21 +49,18 @@
</view>
</view>
<view class="therecontent_box_itembox">
<view class="therecontent_box_itembox_item flex-between" v-for="(item,index) in salesList.hotList" :key="item">
<image :src="item.image" mode="aspectFill"></image>
<view class="therecontent_box_itembox_itemview">
<view class="therecontent_box_itembox_item flex-between" v-for="(item,index) in salesList.hotList"
:key="index">
<image :src="item.image" 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}}</text>
</view>
<view class="therecontent_box_itembox_itemviewtow flex-start">
<image :src="item.image">
</image>
<view>
8
</view>
<view class="therecontent_box_itembox_itemviewtowdiscount flex-around">
已抢{{item.realSalesNumber}}
</view>
<view class="therecontent_box_itembox_itemviewthere flex-start">
<text>{{item.salePrice}}</text>
@@ -85,13 +82,17 @@
salesList: {
type: Object,
default () {
return {}
return {
salesList:[]
}
}
},
todayList: {
type: Object,
default () {
return {}
return {
todayList:[]
}
}
},
title: {
@@ -99,13 +100,21 @@
default: '每日特价'
}
},
methods:{
jrtoday(e){
if(e == 0){
uni.pro.navigateTo('index/jtoday')
}else{
uni.pro.navigateTo('index/hotlist')
}
}
}
};
</script>
<style scoped lang="scss">
.therecontent {
padding: 0 28rpx;
background: #F9F9F9;
.therecontent_box_item {
width: 336rpx;
@@ -117,6 +126,7 @@
.therecontent_box_itembox_item {
margin-top: 20rpx;
flex-wrap: nowrap;
image {
width: 114rpx;
@@ -133,19 +143,21 @@
font-weight: 400;
font-size: 24rpx;
color: #333333;
text{
text {
margin-left: 4rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.therecontent_box_itembox_itemviewoneafter{
.therecontent_box_itembox_itemviewoneafter {
width: 48rpx;
height: 24rpx;
line-height: 24rpx;
text-align: center;
background: linear-gradient( 116deg, #FF9D2B 0%, #FF4805 100%);
background: linear-gradient(116deg, #FF9D2B 0%, #FF4805 100%);
border-radius: 4rpx 4rpx 4rpx 4rpx;
font-family: Roboto, Roboto;
font-weight: 500;
@@ -153,11 +165,11 @@
color: #FFFFFF;
}
}
.therecontent_box_itembox_itemviewtow {
margin-top: 8rpx;
width: 60rpx;
padding: 4rpx 10rpx;
// padding: 4rpx 10rpx;
background: #FFFFFF;
border-radius: 4rpx;
border: 2rpx solid #FF7127;
@@ -168,6 +180,7 @@
}
view {
padding-right: 2rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: bold;
font-size: 16rpx;
@@ -175,12 +188,21 @@
}
}
.therecontent_box_itembox_itemviewtowdiscount {
margin-top: 10rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 16rpx;
color: #FF7127;
}
.therecontent_box_itembox_itemviewthere {
margin-top: 4rpx;
align-items: flex-end;
text:nth-child(1) {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-weight: Bold;
font-size: 24rpx;
color: #FF7127;
}