轮播图,安卓真机测第一个图加载完全,后续数据加载显示不全,需做翻操作才能正常显示
发布于 5 年前 作者 xiuyinggong 4803 次浏览 来自 官方Issues

<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" circular="{{circular}}" class=‘wei’ previous-margin=‘40.5px’ next-margin=‘40.5px’ bindchange=‘swiperChange’ current=’{{currenttable}}’>

<block wx:for="{{gamereds}}" wx:key=“openid”>

<swiper-item>

<!-- 开奖牌 -->

<view class=“kj” wx:if="{{item.state == 0 && item.display ==2 }}">

<image src="{{item.cardsurl}}" class=“slide-image” mode=‘scaleToFill’ data-cardstype="{{item.cardstype}}" data-cardsindex="{{item.cardsindex}}" data-spare="{{item.spare}}" lazy-load="{{true}}" />

<view class=“kjlogo”>

<image class=“kjlogoseize” src="{{item.logourl}}"></image>

</view>

<view class=“kjtips”>

<image class=“diansize” src="…/img/dain.png"></image>

{{item.spare}}

<image class=“diansize” src="…/img/dain.png"></image>

</view>

<view class=“kjby”>

{{item.logowz}}

</view>

<view class=“kjan”>

<image class=“kjsize” src="…/img/daoshijian_kaijiang.png" bindtap=“kaijiang”></image>

</view>

<view class=“kjsj”>

9月21日22:00准时开奖

</view>

</view>

<!-- 奖励牌 -->

<view class=“jl” wx:if="{{item.state == 0 && item.display ==3 }}">

<image src="{{item.cardsurl}}" class=“slide-image” mode=‘scaleToFill’ data-cardstype="{{item.cardstype}}" data-cardsindex="{{item.cardsindex}}" data-spare="{{item.spare}}" lazy-load="{{true}}" />

<view class=“jllogo”>

<image class=“jllogosize” src="{{item.logourl}}"></image>

</view>

<view class=“jllogowz”>

{{item.logowz}}

</view>

<view class=“jlgx”>

恭喜你

</view>

<view class=“jljuan”>

获得888元优惠券

</view>

<view class=“jlanniu”>

<image class=“jlsize” src="…/img/lijilingqu_huojiang.png" bindtap=“receive”></image>

</view>

<view class=“jltips”>

仅限中国好邻居app商城使用

</view>

</view>

<!-- 翻牌默认显示牌 -->

<view wx:if="{{item.state == 0 && item.cardstype == 0 || item.display ==1 && item.state == 0 }}" data-type="{{item.cardstype}}">

<!-- <navigator url="{{item.link}}" hover-1class=“navigator-hover”> -->

<image src="{{item.cardsurl}}" class=“slide-image” mode=‘scaleToFill’ bindtap=“showDialogBtn” data-cardstype="{{item.cardstype}}" data-cardsindex="{{item.cardsindex}}" data-spare="{{item.spare}}" lazy-load="{{true}}" data-display="{{display}}" />

<view wx:if="{{item.cardstype>0}}">

<view class=‘logo’>

<image class=‘size’ src=’{{item.logourl}}’ mode=‘scaleToFill’ lazy-load="{{true}}" />

</view>

<view class=“logowz”>

<text>{{item.logowz}}</text>

</view>

<!-- <view class=“anniu” > -->

<!-- <text>{{item.anniu}}</text> -->

<button class=“anniu” open-type=‘share’>{{item.anniu}}</button>

<!-- </view> -->

</view>

<!-- </navigator> -->

</view>

<view class=‘main’ wx:if="{{item.state == 0 && item.cardstype != 0 && item.display !=1 }}">

<!–正面的框  -->

<view class=“box b1” animation="{{animationMain}}" data-id=“1”>

<image src="{{item.advertisement}}" class=‘lunboadvertisement’  />

<view>

<image class=‘lunbologo’ src="{{item.logourl}}" mode=‘scaleToFill’  />

</view>

<image src="{{item.cardsurl}}" class=‘lunbocards’  />

<view class=‘lunbologoby’>

{{item.logowz}}

</view>

<image class=“tips” src="…/img/duihuakuang.png" mode=‘scaleToFill’></image>

<view class=‘lunbofananniu’>

<image class=“lunbologoye” src="…/img/21.png"></image>

<!-- <image class=‘lunboanniu’ src=’…/img/shouxia_anniu.png’ lazy-load="{{true}}"></image> -->

<image class=“zuo” src="…/img/zuo.png"></image>

<button class=“lunboanniu” open-type=‘share’ data-cardsindex="{{item.cardsindex}}" data-cardstype="{{item.cardstype}}" >{{item.anniu}}</button>

<image class=“you” src="…/img/you.png"></image>

<!-- <text class=‘lunboanniunr’ open-type=‘share’ data-cardsindex="{{item.cardsindex}}">{{item.anniu}}</text> -->

<image class=“lunbofan” src="…/img/fan_icon.png"  bindtap=‘rotateFn’ data-id=“1” data-cardsindex="{{item.cardsindex}}" ></image>

</view>

</view>

<!–背面的框  -->

<view class=“box b2” animation="{{animationBack}}" data-id=“2”>

<image src="{{item.advertisement}}" class=‘lunboadvertisement’ />

<view>

<image class=‘lunbologo’ src="{{item.logourl}}" mode=‘scaleToFill’  />

</view>

<image src="{{item.cardsurl}}" class=‘lunbocards’  />

<view class=‘lunbologoby’>

<image class=“lunbofanjs” src="…/img/paizi_youhuiquan.png"></image>

<view class=“fanmc”>{{item.sort}}</view>

<view class=“fanmcc”>{{item.spare}}</view>

<view class=“fanmccc” bindtap=“shopxq” data-goodsid="{{item.goodsid}}">{{item.fananniu}}</view>

</view>

<view class=‘lunbofananniu’>

<image class=“lunbologofanye” src="…/img/22.png"></image>

<!-- <image class=‘lunboanniu’ src=’…/img/shouxia_anniu.png’ lazy-load="{{true}}"></image>

             <text class=‘lunboanniunr’ bindtap=“onCancel”>{{item.anniu}}</text> -->

<image class=“lunbofans” src="…/img/fan_icon.png"  bindtap=‘rotateFn’ data-id=“2” data-cardsindex="{{item.cardsindex}}"></image>

</view>

</view>

</view>

</swiper-item>

直接加载第一张数据,后续数据只显示部分,点击后才会加载,ios正常

2 回复

能否写个 能跑的 代码片段。不报错那种

回到顶部