|
|
|
@ -3,6 +3,7 @@ |
|
|
|
|
<view class="page"> |
|
|
|
|
<!-- <view class="bg"></view> --> |
|
|
|
|
<view class="search-wrap" :style="{paddingRight: menuBtnInfo.width + 8 + 'px', paddingTop: menuBtnInfo.top + 'px'}"> |
|
|
|
|
<image class="logo" src="http://124.71.79.122/images/logo2.png" mode="widthFix"></image> |
|
|
|
|
<uni-search-bar class="search" radius="30" placeholder="请输入" v-model="keyword" clearButton="auto" cancelButton="none" @confirm="initList" /> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
@ -10,7 +11,7 @@ |
|
|
|
|
<uni-swiper-dot class="swiper" v-if="banners.length" :current="curBanner" :info="banners" field="id" mode="round" :dotsStyles="dotsStyles"> |
|
|
|
|
<swiper class="swiper-box" autoplay @change="bannerChange"> |
|
|
|
|
<swiper-item v-for="(item, i) in banners" :key="i"> |
|
|
|
|
<image class="pic" :src="item.coverUrl"></image> |
|
|
|
|
<image class="pic" :src="item.coverUrl" @click="toLink(item, 1)"></image> |
|
|
|
|
</swiper-item> |
|
|
|
|
</swiper> |
|
|
|
|
</uni-swiper-dot> |
|
|
|
@ -26,7 +27,7 @@ |
|
|
|
|
<uni-swiper-dot class="swiper" v-if="hots.length" :current="curHot" :info="hots" field="id" mode="round" :dotsStyles="dotsStyles1"> |
|
|
|
|
<swiper class="swiper-box" autoplay @change="hotChange"> |
|
|
|
|
<swiper-item v-for="(item, i) in hots" :key="i"> |
|
|
|
|
<image class="hot" :src="item.coverUrl" @click="toLink(item)"></image> |
|
|
|
|
<image class="hot" :src="item.coverUrl" @click="toLink(item, 0)"></image> |
|
|
|
|
</swiper-item> |
|
|
|
|
</swiper> |
|
|
|
|
</uni-swiper-dot> |
|
|
|
@ -134,7 +135,6 @@ |
|
|
|
|
}, |
|
|
|
|
onShow() { |
|
|
|
|
// #ifdef MP-WEIXIN |
|
|
|
|
console.log(33, uni.getMenuButtonBoundingClientRect()) |
|
|
|
|
this.menuBtnInfo = uni.getMenuButtonBoundingClientRect() |
|
|
|
|
// .top + 8 + 'px' |
|
|
|
|
// #endif |
|
|
|
@ -255,9 +255,9 @@ |
|
|
|
|
this.curHot = e.detail.current; |
|
|
|
|
}, |
|
|
|
|
// 跳转链接 |
|
|
|
|
toLink(item) { |
|
|
|
|
// details 1: 详情,2:链接 |
|
|
|
|
if (item.details === '1') { |
|
|
|
|
toLink(item, type) { |
|
|
|
|
// details 1: 详情,2:链接 (爆款才有详情,banner只有链接) |
|
|
|
|
if (item.details === '1' && !type) { |
|
|
|
|
this.$util.to('/other/hotDetail/hotDetail?id=' + item.id) |
|
|
|
|
} else { |
|
|
|
|
// link 1小程序内链接,2外连接 |
|
|
|
@ -355,6 +355,10 @@ |
|
|
|
|
/deep/.search-wrap { |
|
|
|
|
padding-bottom: 30rpx; |
|
|
|
|
background-color: $uni-primary; |
|
|
|
|
.logo { |
|
|
|
|
width: 70rpx; |
|
|
|
|
margin: 0 10rpx 0 10rpx; |
|
|
|
|
} |
|
|
|
|
.uni-searchbar { |
|
|
|
|
padding: 0 10rpx !important; |
|
|
|
|
} |
|
|
|
|