首页轮播图去掉隐藏时不显示问题,开屏广告跳转了一个小程序

This commit is contained in:
DESKTOP-RQ919RC\Pc 2025-03-10 14:25:40 +08:00
parent 808efb9bb4
commit 6a13c23b19
3 changed files with 12 additions and 2 deletions

View File

@ -73,6 +73,14 @@ Component({
skip() {
let url = this.data.openDate['url']
let appid = this.data.openDate['appid'] || ''
if (appid) {
wx.navigateToMiniProgram({
appId: appid,
path: url,
})
return
}
if (url.indexOf('http') == 0) url = `/pages/webview/webview?url=${url}`
else url = url
wx.navigateTo({

View File

@ -350,6 +350,7 @@ Page({
getIndexHeight() {
const query = wx.createSelectorQuery();
query.select('.head-box').boundingClientRect(rect => {
if (!rect) return
this.setData({
headHeight: rect.height,
})

View File

@ -3,12 +3,13 @@
<block wx:if="{{ banner.length != 0 }}">
<header-nav bgcolor="{{ isFirstPattern ? 'transparent' : '#f5f5f5' }}" user="{{ user }}" isIndexPage="{{ true }}">港校项目库</header-nav>
<view class="slideshow-box">
<swiper wx:if="{{ isShow }}" class="swiper" autoplay="{{ true }}" circular style="height: {{(swiperHeightList[swiperCurrent] + 5) || 124 }}px;" current="{{ swiperCurrent || 0 }}" bindanimationfinish="bindchangeSwiper">
<!-- <swiper wx:if="{{ isShow }}" class="swiper" autoplay="{{ true }}" circular style="height: {{(swiperHeightList[swiperCurrent] + 5) || 124 }}px;" current="{{ swiperCurrent || 0 }}" bindanimationfinish="bindchangeSwiper"> -->
<swiper class="swiper" autoplay="{{ true }}" circular style="height: {{(swiperHeightList[swiperCurrent] + 5) || 124 }}px;" current="{{ swiperCurrent || 0 }}" bindanimationfinish="bindchangeSwiper">
<swiper-item class="swiper-item" wx:for="{{ banner }}" wx:key="index">
<image class="slideshow-img" src="{{ item.imageurl }}" mode="widthFix" bindload="loadHeadSwiper" bind:tap="handleSwiper" data-index="{{ index }}" show-menu-by-longpress="{{ true }}"></image>
</swiper-item>
</swiper>
<view wx:else class="" style="height: {{(swiperHeightList[swiperCurrent] + 5) || 124 }}px;"></view>
<!-- <view wx:else class="" style="height: {{(swiperHeightList[swiperCurrent] + 5) || 124 }}px;"></view> -->
<view class="indication-point flexcenter" wx:if="{{ banner.length > 1 }}">
<view class="indication-point-item {{ index == swiperCurrent ? 'pitch' : '' }}" wx:for="{{ banner }}" wx:key="index"></view>
</view>