|
|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<view class="container">
|
|
|
<!-- 轮播图 start -->
|
|
|
- <swiper class="top-swiper" autoplay="true" duration="400" interval="5000" @change="swiperChange">
|
|
|
+ <swiper class="top-swiper" autoplay="true" duration="400" interval="10000" @change="swiperChange">
|
|
|
<swiper-item v-for="(item, index) in bannerList" :key="index" class="carousel-item"
|
|
|
@click="navto(item.url)">
|
|
|
<image class="topImg" :src="item.pic" mode="scaleToFill" />
|
|
|
@@ -37,10 +37,10 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <swiper class="content-swiper" autoplay="true" duration="400" interval="10000" @change="swiperChange">
|
|
|
- <swiper-item v-for="(item, index) in bannerList" :key="index" class="nav"
|
|
|
- @click="navto(item.url)">
|
|
|
- <image class="contentImg" :src="item.lovely" mode="scaleToFill" />
|
|
|
+ <swiper indicator-dots indicator-color='rgba(255, 255, 255, .5)' indicator-active-color='#FFFFFF'
|
|
|
+ class="content-swiper" autoplay="true" duration="400" interval="5000" @change="swiperChange">
|
|
|
+ <swiper-item v-for="(item, index) in activity" :key="index" class="nav" @click="navto(item.url)">
|
|
|
+ <image class="contentImg" :src="item.pic" mode="scaleToFill" />
|
|
|
</swiper-item>
|
|
|
</swiper>
|
|
|
<view class="cate-section flex">
|
|
|
@@ -48,26 +48,53 @@
|
|
|
<view class="img-wrapper flex">
|
|
|
<image :src="item.pic" mode=" scaleToFill"></image>
|
|
|
</view>
|
|
|
- <view class="item-title">全部商品</view>
|
|
|
+ <view class="item-title">{{item.name}}</view>
|
|
|
</view>
|
|
|
- <!-- <view class="cate-item flex" @click="navto('/pages/index/artDetail?id=1')">
|
|
|
- <view class="img-wrapper flex">
|
|
|
- <image src="../../static/index/in2.png" mode=""></image>
|
|
|
- </view>
|
|
|
- <view class="item-title">公司介绍</view>
|
|
|
+ </view>
|
|
|
+ <view class="activty padding-b-20">
|
|
|
+ <view class="action-title flex">
|
|
|
+ <image class="action-title-icon" src="../../static/img/indexTitleLeft.png" mode="heightFix"></image>
|
|
|
+ <view class="margin-c-20">推荐商品</view>
|
|
|
+ <image class="action-title-icon" src="../../static/img/indexTitleRight.png" mode="scaleToFill"></image>
|
|
|
</view>
|
|
|
- <view class="cate-item flex" @click="openKf">
|
|
|
- <view class="img-wrapper flex">
|
|
|
- <image src="../../static/index/in3.png" mode=""></image>
|
|
|
- </view>
|
|
|
- <view class="item-title">联系客服</view>
|
|
|
+ <view class="action-title-tip">
|
|
|
+ 悦享套餐 格调生活
|
|
|
</view>
|
|
|
- <view class="cate-item flex" @click="navto('/pages/index/storeList')">
|
|
|
- <view class="img-wrapper flex">
|
|
|
- <image src="../../static/index/in6.png" mode=""></image>
|
|
|
+ </view>
|
|
|
+ <view class="productList" v-for="(item,ind) in hotgoods">
|
|
|
+ <view class="tipLeft text-white font-size-base">
|
|
|
+ 立省¥{{item.ot_price-item.price}}
|
|
|
+ </view>
|
|
|
+ <image class="productImg" :src="item.image" mode="scaleToFill"></image>
|
|
|
+ <view class="padding-c-20 padding-t-10 padding-b-20">
|
|
|
+ <view class="product-name clamp">
|
|
|
+ {{item.store_name}}
|
|
|
+ </view>
|
|
|
+ <view class="flex padding-t-10">
|
|
|
+ <view class="mask">
|
|
|
+ {{item.store_info}}
|
|
|
+ </view>
|
|
|
+ <view class="sales" v-if="item.sales>0">
|
|
|
+ 已售{{item.sales+item.unit_name}}
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="item-title">本地门店</view>
|
|
|
- </view> -->
|
|
|
+ <view class="flex padding-t-10">
|
|
|
+ <view class="flex money">
|
|
|
+ <view class="payMoney font-size-sm">
|
|
|
+ ¥
|
|
|
+ </view>
|
|
|
+ <view class="payMoney font-size-lg">
|
|
|
+ {{item.price}}
|
|
|
+ </view>
|
|
|
+ <view class="oldMoney margin-l-10">
|
|
|
+ {{item.ot_price}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="buttomPlay text-white" @click.stop="navto('/pages/')">
|
|
|
+ 立即抢购
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
@@ -93,9 +120,11 @@
|
|
|
// 轮播图
|
|
|
bannerList: [],
|
|
|
// 中间轮播图
|
|
|
- lovely:[],
|
|
|
- menus:[],
|
|
|
-
|
|
|
+ activity: [],
|
|
|
+ // 金刚区
|
|
|
+ menus: [],
|
|
|
+ // 首页推荐
|
|
|
+ hotgoods: []
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -193,9 +222,14 @@
|
|
|
.then(({
|
|
|
data
|
|
|
}) => {
|
|
|
+ // banner轮播图
|
|
|
this.bannerList = data.banner;
|
|
|
- this.lovely = data.lovely;
|
|
|
+ // 中间轮播图
|
|
|
+ this.activity = data.activity;
|
|
|
+ // 金刚区
|
|
|
this.menus = data.menus;
|
|
|
+ // 商品推荐
|
|
|
+ this.hotgoods = data.info.bastList;
|
|
|
})
|
|
|
.catch(e => {
|
|
|
uni.stopPullDownRefresh();
|
|
|
@@ -222,6 +256,7 @@
|
|
|
.container {
|
|
|
height: 100%;
|
|
|
background-color: $page-color-base;
|
|
|
+ padding-bottom: 30rpx;
|
|
|
}
|
|
|
|
|
|
.content-box {
|
|
|
@@ -241,6 +276,7 @@
|
|
|
padding: 12rpx;
|
|
|
background-color: #F5F5F5;
|
|
|
border-radius: 10rpx;
|
|
|
+ font-weight: bold;
|
|
|
|
|
|
.upViewTip {
|
|
|
height: 78rpx;
|
|
|
@@ -280,6 +316,7 @@
|
|
|
|
|
|
.username {
|
|
|
font-size: $font-lg;
|
|
|
+ font-weight: bold;
|
|
|
// height: 100%;
|
|
|
}
|
|
|
}
|
|
|
@@ -302,43 +339,50 @@
|
|
|
.top-swiper {
|
|
|
width: 750rpx;
|
|
|
height: 580rpx;
|
|
|
+
|
|
|
.topImg {
|
|
|
width: 750rpx;
|
|
|
height: 580rpx;
|
|
|
}
|
|
|
}
|
|
|
- .content-swiper{
|
|
|
+
|
|
|
+ .content-swiper {
|
|
|
background-color: #FFFFFF;
|
|
|
margin: 20rpx 30rpx;
|
|
|
width: 690rpx;
|
|
|
height: 238rpx;
|
|
|
border-radius: 15rpx;
|
|
|
+
|
|
|
.contentImg {
|
|
|
width: 690rpx;
|
|
|
height: 238rpx;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.cate-section {
|
|
|
justify-content: flex-start;
|
|
|
background-color: #fff;
|
|
|
padding: 30rpx 10rpx;
|
|
|
+ padding-bottom: 10rpx;
|
|
|
margin: 20rpx 30rpx 0rpx 30rpx;
|
|
|
flex-wrap: wrap;
|
|
|
border-radius: 15rpx;
|
|
|
+
|
|
|
.cate-item {
|
|
|
flex-grow: 0;
|
|
|
- width: 33.3%;
|
|
|
+ width: 25%;
|
|
|
flex-direction: column;
|
|
|
text-align: center;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
padding-bottom: 20rpx;
|
|
|
+
|
|
|
.img-wrapper {
|
|
|
width: 90rpx;
|
|
|
height: 90rpx;
|
|
|
border-radius: 20rpx;
|
|
|
position: relative;
|
|
|
-
|
|
|
+
|
|
|
image {
|
|
|
width: 90rpx;
|
|
|
height: 90rpx;
|
|
|
@@ -348,13 +392,84 @@
|
|
|
transform: translate(-50%, -50%);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.item-title {
|
|
|
margin-top: 15rpx;
|
|
|
font-size: 26rpx;
|
|
|
- font-weight: 500;
|
|
|
+ font-weight: bold;
|
|
|
color: #6B4216;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .activty {
|
|
|
+ padding-top: 30rpx;
|
|
|
+
|
|
|
+ .action-title {
|
|
|
+ color: #EE2F72;
|
|
|
+ font-weight: bold;
|
|
|
+ justify-content: center;
|
|
|
+
|
|
|
+ .action-title-icon {
|
|
|
+ width: 20rpx;
|
|
|
+ height: 12rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .action-title-tip {
|
|
|
+ font-size: $font-sm;
|
|
|
+ color: $font-color-light;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .productList {
|
|
|
+ margin: 0 30rpx 20rpx 30rpx;
|
|
|
+ border-radius: 20rpx;
|
|
|
+ overflow: hidden;
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ position: relative;
|
|
|
+ line-height: 1;
|
|
|
+ .tipLeft{
|
|
|
+ background-color:rgba(255, 51, 66, 1) ;
|
|
|
+ border-radius: 100rpx;
|
|
|
+ border-bottom-left-radius: 0rpx;
|
|
|
+ padding: 15rpx 25rpx;
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+ z-index: 9;
|
|
|
+ }
|
|
|
+ .productImg {
|
|
|
+ height: 330rpx;
|
|
|
+ width: 690rpx;
|
|
|
+ }
|
|
|
+ .product-name{
|
|
|
+ font-size: $font-base + 2rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ color: $font-color-dark;
|
|
|
+ }
|
|
|
+ .mask,.sales{
|
|
|
+ font-size: $font-sm;
|
|
|
+ color: $font-color-light;
|
|
|
+ }
|
|
|
+ .money{
|
|
|
+ align-items: flex-end;
|
|
|
+ line-height: 0;
|
|
|
+ .payMoney{
|
|
|
+ color: #FF4C4C;
|
|
|
+ }
|
|
|
+ .oldMoney{
|
|
|
+ text-decoration:line-through;
|
|
|
+ color: $font-color-light;
|
|
|
+ font-size: $font-base - 2rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .buttomPlay{
|
|
|
+ font-size: $font-base - 2rpx;
|
|
|
+ background-color:#EE2F72 ;
|
|
|
+ border-radius: 10rpx;
|
|
|
+ padding: 10rpx 20rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|