|
|
|
@ -85,8 +85,53 @@ |
|
|
|
<image :src="item1.block_pic" :style="{height:(item.zone_code=='SIXPIC')?item.zone_column+'rpx':''}" |
|
|
|
mode="" @click="imgTo(item1)" v-for="(item1,index1) in item.blocks" :key="item1.block_id"></image> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- HONLIST1 --> |
|
|
|
<scroll-view class="spike1 page_padding" scroll-x="true" @change="handlechange" :show-scrollbar="false" |
|
|
|
:indicator-dots="true" :circular="true" :interval="3000" :duration="1000" |
|
|
|
v-if="item.zone_code=='HONLIST1' && item.zone_status=='NORMAL'" :current="mycurrent"> |
|
|
|
<swiper style="height: 600rpx;" previous-margin="140rpx" next-margin="140rpx" @change="handlechange" :current="mycurrent" |
|
|
|
:indicator-dots="false" :circular="true" :interval="3000" :duration="1000"> |
|
|
|
<swiper-item v-for="item1,index1 in item.blocks" :key="item1.block_id"> |
|
|
|
<view :class="['swiper-items',index1==mycurrent ? 'active' : '']"> |
|
|
|
<image :src="item1.block_pic" mode="" |
|
|
|
:style="{width:(item.zone_code=='HONLIST1')?420+'rpx':'',height:'100%'}" |
|
|
|
@click="imgTo(item1)"></image> |
|
|
|
</view> |
|
|
|
</swiper-item> |
|
|
|
</swiper> |
|
|
|
<!-- </view> --> |
|
|
|
</scroll-view> |
|
|
|
<!-- HONLIST2 --> |
|
|
|
<scroll-view class="spike1 page_padding" scroll-x="true" @change="handlechange" :show-scrollbar="false" |
|
|
|
:indicator-dots="true" :circular="true" :interval="3000" :duration="1000" |
|
|
|
v-if="item.zone_code=='HONLIST2' && item.zone_status=='NORMAL'" :current="mycurrent"> |
|
|
|
<view class="spike1_item padding_honlist2" v-for="(item1,index1) in item.blocks" |
|
|
|
:key="item1.block_id"> |
|
|
|
<view :class="['swiper-item',index==mycurrent ? 'active' : '']"> |
|
|
|
<image :src="item1.block_pic" mode="" |
|
|
|
:style="{width:(item.zone_code=='HONLIST2')?420+'rpx':'',height:item.zone_column+'rpx'}" |
|
|
|
@click="imgTo(item1)"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
<!-- HONLIST3 --> |
|
|
|
<scroll-view class="spike1 page_padding" scroll-x="true" :show-scrollbar="false" |
|
|
|
v-if="item.zone_code=='HONLIST3' && item.zone_status=='NORMAL'" @scroll="scrollhot"> |
|
|
|
<view class="spike1_item" v-for="(item1,index1) in item.blocks" :key="item1.block_id"> |
|
|
|
<view class="item_img " |
|
|
|
:style="{width:(item.zone_code=='HONLIST3')?280+'rpx':'',height:item.zone_column +'rpx'}"> |
|
|
|
<image :src="item1.block_pic" mode="" @click="imgTo(item1)"></image> |
|
|
|
<a :href="item1.block_link"></a> |
|
|
|
</view> |
|
|
|
<view class="spike1_item_bottom"> |
|
|
|
<text>{{item1.block_title}}</text> |
|
|
|
<view class="spike1_item_text1">{{item1.block_title2}}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 标题 --> |
|
|
|
<navigator url="/pages/index/flashSale" v-if="item.zone_code=='SPIKE1' && item.zone_status=='NORMAL'"> |
|
|
|
<view class="index_title page_padding"> |
|
|
|
@ -158,7 +203,7 @@ |
|
|
|
</view> |
|
|
|
</view> --> |
|
|
|
|
|
|
|
<!-- HOT SELLS 2 --> |
|
|
|
<!-- HOT SELLS 2 |
|
|
|
<scroll-view class="spike1 page_padding_left" scroll-x="true" :show-scrollbar="false" |
|
|
|
v-if="item.zone_code=='HONLIST2' && item.zone_status=='NORMAL'"> |
|
|
|
<view class="spike1_item padding_honlist2" v-for="(item1,index1) in item.blocks" :key="item1.block_id"> |
|
|
|
@ -168,7 +213,7 @@ |
|
|
|
@click="imgTo(item1)"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
</scroll-view> --> |
|
|
|
|
|
|
|
<!-- 标题 --> |
|
|
|
<!-- <view class="index_title page_padding"> |
|
|
|
@ -179,7 +224,7 @@ |
|
|
|
</view> --> |
|
|
|
|
|
|
|
<!-- HOT SELLS 3 --> |
|
|
|
<scroll-view class="spike1 page_padding_left" scroll-x="true" :show-scrollbar="false" |
|
|
|
<!-- <scroll-view class="spike1 page_padding_left" scroll-x="true" :show-scrollbar="false" |
|
|
|
v-if="item.zone_code=='HONLIST3' && item.zone_status=='NORMAL'"> |
|
|
|
<view class="spike1_item" v-for="(item1,index1) in item.blocks" :key="item1.block_id"> |
|
|
|
<view class="item_img"> |
|
|
|
@ -193,9 +238,9 @@ |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
</scroll-view> --> |
|
|
|
|
|
|
|
<!-- GOODSTHREE 2 --> |
|
|
|
<!-- GOODSTHREE 2 |
|
|
|
<!-- <view class="goodsthree2"> |
|
|
|
<view class="goodsthree2_item" v-for="(item,index) in 3" :key="index"></view> |
|
|
|
</view> --> |
|
|
|
@ -269,6 +314,7 @@ |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
mycurrent: 0, |
|
|
|
isScrollShow: false, |
|
|
|
scroll_active: 0, |
|
|
|
scrollList: [ |
|
|
|
@ -566,7 +612,7 @@ |
|
|
|
} |
|
|
|
|
|
|
|
defaultRequest(data).then(res => { |
|
|
|
|
|
|
|
console.log(res); |
|
|
|
if (res.error == 0) { |
|
|
|
this.indexDate = res.data |
|
|
|
res.data.zones.map(item => { |
|
|
|
@ -575,7 +621,16 @@ |
|
|
|
this.info.push(item) |
|
|
|
console.log(item, 'info') |
|
|
|
} |
|
|
|
|
|
|
|
if (item.zone_code == 'HONLIST2') { |
|
|
|
item.blocks.map(item1 => { |
|
|
|
// console.log('HONLIST2',item1) |
|
|
|
}) |
|
|
|
} |
|
|
|
if (item.zone_code == 'HONLIST3') { |
|
|
|
item.blocks.map(item1 => { |
|
|
|
// console.log('HONLIST3',item1) |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
@ -587,18 +642,26 @@ |
|
|
|
//轮播图跳转 // 热卖跳转 |
|
|
|
imgTo(item) { |
|
|
|
console.log(item, 'item') |
|
|
|
let goodid = item.block_link.substring(12); |
|
|
|
console.log(item.block_link) |
|
|
|
let goodid = item.block_link; |
|
|
|
// let goodid = item.block_link.substring(12); |
|
|
|
if (goodid.includes('goodslist')) { |
|
|
|
uni.navigateTo({ |
|
|
|
url: 'http://localhost:8080/#/pages/index/pickUpCentre' |
|
|
|
// url: '../category/productList' + goodid |
|
|
|
url: '../category/productList'+goodid |
|
|
|
}) |
|
|
|
console.log(11111) |
|
|
|
} else { |
|
|
|
} else if (goodid.includes('youhui')) { |
|
|
|
uni.navigateTo({ |
|
|
|
url: '../index/pickUpCentre' |
|
|
|
}) |
|
|
|
console.log(33333); |
|
|
|
} else if (item.block_link.includes('goodid')) { |
|
|
|
uni.navigateTo({ |
|
|
|
url: '../productDetails/index' + goodid + '&img=1' |
|
|
|
}) |
|
|
|
} else { |
|
|
|
uni.navigateTo({ |
|
|
|
url: '../productDetails/index'+goodid+'&img=1' |
|
|
|
}) |
|
|
|
console.log(22222) |
|
|
|
} |
|
|
|
|
|
|
|
@ -1257,4 +1320,152 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.spike1 { |
|
|
|
white-space: nowrap; |
|
|
|
width: 100%; |
|
|
|
padding-right: 16rpx; |
|
|
|
padding-left: 16rpx; |
|
|
|
margin-bottom: 47.67rpx; |
|
|
|
|
|
|
|
::-webkit-scrollbar { |
|
|
|
width: 0; |
|
|
|
height: 0; |
|
|
|
background-color: transparent; |
|
|
|
} |
|
|
|
|
|
|
|
.spike1_item { |
|
|
|
// color: #191919; |
|
|
|
color: #fff; |
|
|
|
font-size: 26.67rpx; |
|
|
|
// margin-right: 16.67rpx; |
|
|
|
// width: 200rpx; |
|
|
|
// margin-left: 16rpx; |
|
|
|
padding-right: 20rpx; |
|
|
|
display: inline-block; |
|
|
|
font-weight: 500; |
|
|
|
|
|
|
|
&:last-child { |
|
|
|
margin-right: 37rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.spike1_item_img { |
|
|
|
width: 180rpx; |
|
|
|
height: 180rpx; |
|
|
|
background-color: #999999; |
|
|
|
|
|
|
|
padding-right: 16rpx; |
|
|
|
|
|
|
|
image { |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// .padding_honlist2{ |
|
|
|
// margin-right: 280rpx !important; |
|
|
|
// } |
|
|
|
.spike1_item_bottom { |
|
|
|
padding-left: 9.33rpx; |
|
|
|
margin-top: 7.67rpx; |
|
|
|
|
|
|
|
.spike1_item_text { |
|
|
|
// color: #9D9D9D; |
|
|
|
color: #fff; |
|
|
|
font-size: 21.33rpx; |
|
|
|
text-decoration: line-through; |
|
|
|
} |
|
|
|
|
|
|
|
.spike1_item_text1 { |
|
|
|
// color: #9D9D9D; |
|
|
|
color: #fff; |
|
|
|
font-size: 21.33rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.spike1_item_bottom1 { |
|
|
|
padding-left: 9.33rpx; |
|
|
|
margin-top: 19.33rpx; |
|
|
|
font-weight: bold; |
|
|
|
|
|
|
|
.spike1_item_text { |
|
|
|
// color: #000000; |
|
|
|
color: #fff; |
|
|
|
font-size: 16rpx; |
|
|
|
font-weight: 400; |
|
|
|
margin-bottom: 20.67rpx; |
|
|
|
white-space: break-spaces; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.spike1_item:last-child { |
|
|
|
margin-right: 0; |
|
|
|
} |
|
|
|
} |
|
|
|
.swiper-items { |
|
|
|
border-radius: 30rpx; |
|
|
|
overflow: hidden; |
|
|
|
// 像这种多张轮播图同时出现在一屏的情况下就不要指定width了,不然你会发现previous-margin和 next-margin会出现想不到的效果 |
|
|
|
// 如果想要设置宽每一张轮播图的宽度,只需要设置previous-margin和next-margin就可以了,想要设置高度直接改下面的height就可以了 |
|
|
|
// width: 450rpx; |
|
|
|
height: 100%; |
|
|
|
transform: scale(0.8); |
|
|
|
transition: all 0.5s ease; |
|
|
|
text-align: center; |
|
|
|
transition: all 0.5s ease-in-out; |
|
|
|
|
|
|
|
&.active { |
|
|
|
transform: scale(1); |
|
|
|
} |
|
|
|
|
|
|
|
/deep/ .uni-swiper-dots { |
|
|
|
display: none !important; |
|
|
|
} |
|
|
|
uni-swiper .uni-swiper-dots { |
|
|
|
display: none !important; |
|
|
|
z-index: -1 !important; |
|
|
|
} |
|
|
|
/deep/ .uni-swiper .uni-swiper-dots-horizontal { |
|
|
|
display: none !important; |
|
|
|
} |
|
|
|
uni-swiper .uni-swiper-dot { |
|
|
|
z-index: -1 !important; |
|
|
|
display: none !important; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
@keyframes scaleDraw { |
|
|
|
/*定义关键帧、scaleDrew是需要绑定到选择器的关键帧名称*/ |
|
|
|
|
|
|
|
0% { |
|
|
|
|
|
|
|
transform: scale(1); |
|
|
|
/*开始为原始大小*/ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
25% { |
|
|
|
|
|
|
|
transform: scale(1.1); |
|
|
|
/*放大1.1倍*/ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
50% { |
|
|
|
|
|
|
|
transform: scale(1); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
75% { |
|
|
|
|
|
|
|
transform: scale(1.1); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
</style> |
|
|
|
|