WeChat Mini Programs uses the swiper broadcast picture, how to judge that when the fourth picture is taken, a button appears at the bottom of the broadcast picture.

problem description

the environmental background of the problems and what methods you have tried

related codes

/ / Please paste the code text below (do not replace the code with pictures)

    <swiper indicator-dots="{{indicatorDots}}" current="{{current}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}">
        <block wx:for="{{imgUrls}}"  wx:for-index="index">
          <swiper-item>
            <image src="{{item.url}}" class="slide-image" />
          </swiper-item>
        </block>
    </swiper>

what result do you expect? What is the error message actually seen?


bindchange . Add this event to the swiper component. When triggered, the index to which you are currently scrolling will be returned, and the button will be set to display

when it is judged to be the fourth.

Mini Program swiper component

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e53ff3-43fb0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e53ff3-43fb0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?