comment 7.2

This commit is contained in:
2020-07-24 19:48:57 +08:00
parent 4196f545fd
commit dd71a0f32a
23 changed files with 1630 additions and 350 deletions

View File

@@ -11,7 +11,9 @@
</view>
<image src="/static/image/shop/3.png" class="mnue" @click="toClassifyPage"></image>
</view>
<u-swiper :list="list" mode="dot" @click="clickImage"></u-swiper>
<view class="swiper-image">
<u-swiper :list="list" mode="dot" @click="clickImage"></u-swiper>
</view>
<view class="chengnuo">
<view>
<image src="/static/image/shop/4.png"></image>
@@ -33,21 +35,16 @@
<view class="fenlei">
<shopitem v-for="item in goodsClassify" :key="item.gc_id" :info="item" class="item"></shopitem>
</view>
<view class="hr" style="margin-top:80rpx"></view>
<!-- 秒杀 -->
<recommend v-if="JSON.stringify(recommendedSpike) != '{}'" :recommendData="recommendedSpike" type="spike"></recommend>
<view v-if="JSON.stringify(recommendedSpike) != '{}'" class="hr" style="margin-top:40rpx"></view>
<!-- 秒杀列表 -->
<seckill v-if="spikeList.length" :list="spikeList" :time="seckillTime"></seckill>
<view v-if="spikeList.length" class="hr" style="margin-top:40rpx"></view>
<!-- 拼团推荐 -->
<pintuan v-if="JSON.stringify(pinTuanPush) != '{}'" :recommendData="pinTuanPush"></pintuan>
<view class="hr" style="margin-top:40rpx" v-if="JSON.stringify(pinTuanPush) != '{}'"></view>
<!-- 拼团列表 -->
<group :groupList="pinTuanList" :classifyList="couponGroupList"></group>
<group :classifyList="couponGroupList"></group>
<image class="lingquan"></image>
<youhq></youhq>
<view class="hr" style="margin-top:40rpx"></view>
<list ref="recommendGoods"></list>
<view class="cart" @click="toCartPage">
<image src="/static/image/common/3.png"></image>
@@ -56,16 +53,16 @@
</scroll-view>
</template>
<script>
import shopitem from "@/components/shop/shop-item/index"
import recommend from "@/components/shop/recommend/index"
import pintuan from "@/components/shop/recommend/pintuan"
import seckill from "@/components/shop/seckill/index"
import group from "@/components/shop/group/index"
import youhq from "@/components/shop/youhq/index"
import list from "../../components/shop/list/index"
import shopitem from "@/components/shop/shop-item/index";
import recommend from "@/components/shop/recommend/index";
import pintuan from "@/components/shop/recommend/pintuan";
import seckill from "@/components/shop/seckill/index";
import group from "@/components/shop/group/index";
import youhq from "@/components/shop/youhq/index";
import list from "@/components/shop/list/index";
export default {
name:"shop",
components:{
name: "shop",
components: {
shopitem,
recommend,
seckill,
@@ -74,7 +71,7 @@ export default {
list,
pintuan
},
data(){
data() {
return {
area: "请选择",
chooseArea: false,
@@ -83,15 +80,14 @@ export default {
city: true,
area: false
},
keyword:"",
list:[],
keyword: "",
list: [],
goodsClassify: [], // 商品分类
classifyList: [],
recommendedSpike: {}, // 秒杀推荐
spikeList: [], // 全部秒杀列表
seckillTime: {}, // 秒杀时间
couponGroupList: [], // 优惠券拼团分类
pinTuanList: [], // 拼团商品
pinTuanPush: {}, // 拼团推荐
}
},
@@ -105,7 +101,7 @@ export default {
this.getPinTuanPush();
},
methods: {
sousuo(){
sousuo() {
// console.log(123)
this.$u.route({
url:"pageB/search/index"
@@ -146,7 +142,6 @@ export default {
this.$u.api.getGoodsClass().then(res => {
if(res.errCode == 0) {
this.couponGroupList = res.data;
this.getPinTuanList(this.couponGroupList[0].gc_id);
}
})
},
@@ -162,15 +157,6 @@ export default {
}
})
},
// 拼团列表
getPinTuanList(id) {
this.$u.api.getPinTuanList({
page: 0,
gc_id: id,
}).then(res => {
this.pinTuanList = res.data;
})
},
clickImage(index) {
console.log(index);
console.log(this.list[index]);
@@ -200,8 +186,10 @@ export default {
.shop {
height: calc(100vh - var(--window-top));
box-sizing: border-box;
padding: 0 33rpx 100rpx;
.top{
background-color: #F0EDF1;
.top {
padding: 0 30rpx;
background-color: #ffffff;
width: 100%;
height: 88rpx;
display: flex;
@@ -211,7 +199,11 @@ export default {
height: 37rpx;
}
}
.add{
.swiper-image {
background-color: #ffffff;
padding: 0 30rpx;
}
.add {
width: 115rpx;
height: 25rpx;
display: flex;
@@ -224,40 +216,43 @@ export default {
> text {
width: 80rpx;
}
>image{
> image {
width: 24rpx;
height: 15rpx;
}
}
.mnue{
.mnue {
background-color: #ffffff;
width: 35rpx;
height: 26rpx;
margin-left: 36rpx;
}
.chengnuo{
.chengnuo {
padding: 30rpx;
background-color: #ffffff;
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 24rpx;
>view{
> view {
display: flex;
align-items: center;
>image{
> image {
width: 23rpx;
height: 23rpx;
}
>text{
> text {
font-size: 22rpx;
color: #999;
margin-left: 8rpx;
}
}
}
.fenlei{
.fenlei {
padding: 30rpx;
background-color: #ffffff;
display: flex;
// justify-content: space-between;
margin-top: 30rpx;
flex-wrap: wrap;
margin-bottom: 20rpx;
> view {
margin-bottom: 30rpx;
&:not(:nth-child(5n)) {
@@ -265,13 +260,7 @@ export default {
}
}
}
.hr{
width: 750rpx;
margin-left: -33rpx;
height: 20rpx;
background-color: #ececec;
}
.lingquan{
.lingquan {
width: 750rpx;
height: 177rpx;
margin-left: -33rpx;