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