wpfw_ewei_wxapp/pages/diy/template/tpl_detail_swipe.wxml
2023-02-26 08:10:18 +08:00

39 lines
3.6 KiB
Plaintext

<block wx:if="{{goods.video_type!=0||!goods.video_type}}">
<view style="height:{{advHeight}}rpx;position:relative;display:{{showvideo?'block':'none'}}" wx:if="{{goods.video||goods.end_video_url}}">
<view wx:if="{{cover}}">
<image class="bg" src="{{goods.video_cut}}" style="height:100%;width:100%" wx:if="{{goods.video_cut}}"></image>
<image class="bg" src="{{goods.thumb}}" style="height:100%;width:100%" wx:else></image>
<image bindtap="startplay" class="play" src="{{play}}" style="width:150rpx;height:140rpx"></image>
<view class="mc">
<view bindtap="showvideo" class="video_btn active">视频</view>
<view bindtap="showpic" class="pic_btn">图片</view>
</view>
</view>
<video controls bindfullscreenchange="bindfullscreenchange" bindpause="bindpause" class="video {{showpic||cover?'none':'block'}}" id="myVideo" muted="{{soundpic}}" showMuteBtn="{{true}}" src="{{goods.video}}" style="width:100%;height:{{advHeight}}rpx;margin-left:{{diyitem.style.leftright-2}}rpx;margin-right:{{diyitem.style.leftright-2}}rpx;margin-top:{{diyitem.style.bottom-2}}rpx;margin-bottom:{{diyitem.style.bottom-2}}rpx" wx:if="{{goods.video_type==1||!goods.video_type}}">
<cover-image bindtap="changevoice" class="voice" src="{{sound?voice:mute}}"></cover-image>
<cover-view class="mc" wx:if="{{success}}">
<cover-view class="video_btn active">视频</cover-view>
<cover-view bindtap="showpic" class="pic_btn">图片</cover-view>
</cover-view>
</video>
<video controls bindfullscreenchange="bindfullscreenchange" bindpause="bindpause" class="video {{showpic||cover?'none':'block'}}" id="myVideo" muted="{{soundpic}}" showMuteBtn="{{true}}" src="{{goods.end_video_url}}" style="width:100%;height:{{advHeight}}rpx;margin-left:{{diyitem.style.leftright-2}}rpx;margin-right:{{diyitem.style.leftright-2}}rpx;margin-top:{{diyitem.style.bottom-2}}rpx;margin-bottom:{{diyitem.style.bottom-2}}rpx" wx:if="{{goods.video_type==2}}">
<cover-image bindtap="changevoice" class="voice" src="{{sound?voice:mute}}"></cover-image>
<cover-view class="mc" wx:if="{{success}}">
<cover-view class="video_btn active">视频</cover-view>
<cover-view bindtap="showpic" class="pic_btn">图片</cover-view>
</cover-view>
</video>
</view>
</block>
<view class="goods-advs {{showpic||!goods.video_type||goods.video_type==0?'block':'none'}}" style="width:100%;height:auto;position:relative;margin:0;">
<swiper autoplay circular="{{circular}}" class=" index-banner-sqiper {{diyitem.style.dotstyle}} {{diyitem.style.dotalign}};" duration="{{duration}}" indicatorActiveColor="{{diyitem.style.background}}" indicatorDots="{{indicatorDots}}" interval="{{interval}}" style="width:auto;height:{{advHeight}}rpx;margin-left:{{diyitem.style.leftright-2}}rpx;margin-right:{{diyitem.style.leftright-2}}rpx;margin-top:{{diyitem.style.bottom-2}}rpx;margin-bottom:{{diyitem.style.bottom-2}}rpx;">
<swiper-item wx:for="{{goods.thumbs}}" wx:for-index="idx">
<image bindload="{{idx==0?'imageLoad':''}}" bindtap="previewImage" class="goodsadvimg" data-list="{{goods.thumbs}}" data-src="{{item}}" src="{{item}}"></image>
</swiper-item>
</swiper>
<view class="mc" wx:if="{{goods.video_type!=0||!goods.video_type&&goods.video}}">
<view bindtap="showvideo" class="video_btn" wx:if="{{goods.video||goods.end_video_url}}">视频</view>
<view bindtap="showpic" class="pic_btn active" wx:if="{{goods.video||goods.end_video_url}}">图片</view>
</view>
</view>