card-mini/packagecard/moments/showlist/showlist.wxml

276 lines
18 KiB
Plaintext
Raw Normal View History

2021-07-20 15:45:29 +08:00
<cu-custom isCustom="{{false}}" isBack="{{true}}">
<view slot="content">栏目</view>
</cu-custom>
<view class="tab">
<van-tabs active="{{ currentIndex }}" bind:change="onChange" ellipsis="{{false}}" z-index="{{100}}" sticky
color="#0054bd">
<block wx:for="{{tabList}}" wx:key="index">
<van-tab title="{{item.configColumnName}}">
</van-tab>
</block>
</van-tabs>
</view>
2021-08-12 09:22:40 +08:00
<view wx:if="{{dataList.length>0}}" style="margin:100rpx 15rpx 15rpx 15rpx;">
2021-07-20 15:45:29 +08:00
<!-- 栏目组 -->
<view wx:for="{{dataList}}" wx:key="index">
2021-08-12 09:22:40 +08:00
<view class="flex flex-direction" style="margin-top: 15rpx;">
2021-07-20 15:45:29 +08:00
<view class="column-content">
<!-- 栏目样式用来展示音频 -->
<view wx:if="{{item.type=='dbc15b23-a1a3-4cb6-b7fa-9b01c9416454'}}" class="flex flex-direction"
style="width:100%;">
<view wx:for="{{item.list}}" wx:for-index="idx" wx:key="idx" wx:for-item="it"
class="column-box-row">
<view wx:for="{{it.list}}" wx:for-index="i" wx:for-item="child" wx:key="i" bindtap="showDetail"
data-like="{{item.likeSwitch}}" data-share="{{item.shareSwitch}}"
data-collect="{{item.collectSwitch}}" data-comment="{{item.commentSwitch}}"
data-ctype="{{item.type}}" data-ctype="{{item.type}}" data-cid="{{item.cId}}"
data-id="{{it.uid}}">
<!-- 文本 -->
<view wx:if="{{child.dataType=='1' && child.displayList}}" class="align-center">
<view class="bg-white">
<view class="cu-form-group">
<view id="content"
class="padding-left-xs padding-right-xs margin-left-xs margin-right-xs"
style="line-height:40rpx;">
<text
class="{{currentTap.configColumnType=='dda5007c-5fb7-48f2-8537-3cb8ea298242' ? 'cuIcon-title' : ''}}">
</text>
<text style="color:#333333;">{{child.value}}</text>
</view>
</view>
</view>
</view>
<!-- 音频 -->
<view wx:if="{{child.dataType=='3' && child.displayList}}" style="width:100%;">
<view class="cu-form-group padding-sm">
<view class="flex align-center margin-left-sm" style="width:100%;"
wx:for="{{child.valueList}}" wx:for-index="a" wx:key="a" wx:for-item="audio">
<image
src="{{audio.isPlay? '/images/ic_pause_icon.png': '/images/ic_play_icon.png'}}"
mode="scaleToFill" style="width:64rpx;height:64rpx;margin-left:5rpx;"
data-index="{{index}}" data-i="{{i}}" data-idx="{{idx}}" data-a="{{a}}"
data-item="{{audio}}" catchtap="play">
</image>
</view>
</view>
</view>
</view>
</view>
</view>
2021-07-20 15:45:29 +08:00
<view class="column-box">
<!-- 栏目数据 -->
<view wx:for="{{item.list}}" wx:for-index="i" wx:for-item="child" wx:key="i" data-item="{{child}}"
data-uid="{{item.uid}}" bindtap="showDetail" data-like="{{item.likeSwitch}}"
data-share="{{item.shareSwitch}}" data-collect="{{item.collectSwitch}}"
data-comment="{{item.commentSwitch}}" data-ctype="{{item.type}}" data-ctype="{{item.type}}"
data-cid="{{item.cId}}" data-id="{{item.uid}}"
2021-08-12 09:22:40 +08:00
class="{{child.valueList.length>0 || child.value.length>0 ? 'column-item' : ''}}">
2021-07-20 15:45:29 +08:00
<!-- 具体数据 -->
<!-- 文本 -->
<view wx:if="{{child.dataType=='1' && child.displayList && child.value.length>0}}"
class="align-center">
2021-07-20 15:45:29 +08:00
<view class="bg-white">
<view class="cu-form-group">
2021-08-12 09:22:40 +08:00
<view id="content" style="line-height:40rpx;">
<text
class="{{currentTab.configColumnType=='dda5007c-5fb7-48f2-8537-3cb8ea298242' ? 'cuIcon-title' : ''}}">
</text>
2021-07-20 15:45:29 +08:00
{{child.value}}
</view>
</view>
</view>
</view>
<!-- 图片 -->
2021-08-12 09:22:40 +08:00
<view wx:if="{{child.dataType=='2' && child.displayList && child.valueList.length>0}}">
2021-07-20 15:45:29 +08:00
<!-- 九宫格 -->
2021-09-01 16:55:20 +08:00
<view wx:if="{{ child.dataMode == '1'}}" class="cu-form-group">
2021-07-20 15:45:29 +08:00
<view class="grid col-3 grid-square flex-sub">
<view class="bg-img" wx:for="{{child.valueList}}" wx:key="d" wx:for-item="photo"
2021-09-01 16:55:20 +08:00
data-values="{{child.valueList}}" catchtap="viewImg" data-cur="{{photo.path}}">
<image src='{{photo.path}}' mode='aspectFill'></image>
2021-07-20 15:45:29 +08:00
</view>
</view>
</view>
<!-- 左右滑动 -->
2021-09-01 16:55:20 +08:00
<view wx:elif="{{child.dataMode=='2' || child.dataMode=='3'}}">
2021-08-12 09:22:40 +08:00
<swiper style="width:100%;height:400rpx;" indicator-dots="{{true}}"
2021-09-01 16:55:20 +08:00
autoplay="{{child.dataMode=='3'}}">
2021-07-20 15:45:29 +08:00
<block wx:for="{{child.valueList}}" wx:key="pIndex" wx:for-index="pIndex"
wx:for-item="photo">
2021-09-01 16:55:20 +08:00
<swiper-item style="width:100%;" data-values="{{child.valueList}}"
catchtap="viewImg" data-cur="{{photo.path}}">
2021-08-12 09:22:40 +08:00
<image style="width:100%;border-radius:5rpx;height:400rpx;"
2021-09-01 16:55:20 +08:00
src="{{photo.path}}" mode="aspectFill">
2021-07-20 15:45:29 +08:00
</image>
</swiper-item>
</block>
</swiper>
</view>
<!-- 上下 -->
2021-09-01 16:55:20 +08:00
<view wx:elif="{{child.dataMode=='4'}}">
2021-07-20 15:45:29 +08:00
<block wx:for="{{child.valueList}}" wx:key="pIndex" wx:for-index="pIndex"
wx:for-item="photo">
2021-08-12 09:22:40 +08:00
<image style="width:100%;border-radius:5rpx;" src="{{photo.path}}" mode="widthFix">
2021-07-20 15:45:29 +08:00
</image>
</block>
</view>
</view>
<!-- 视频 -->
2021-08-12 09:22:40 +08:00
<view wx:if="{{child.dataType=='4' && child.displayList && child.valueList.length>0}}">
<view class="cu-form-group" style="border-radius:10rpx;">
<view class="movie-box" wx:for="{{child.valueList}}" wx:for-index="d" wx:key="d"
wx:for-item="video" catchtap="viewVideo" data-url="{{video.path}}">
<image src='{{video.imgPath}}' mode='scaleToFill'></image>
<view class="play-box-arrow-flex">
<image src="/images/ic_video_play.png" mode="scaleToFill"
style="width: 96rpx;height:96rpx;">
</image>
2021-07-20 15:45:29 +08:00
</view>
</view>
</view>
</view>
<!-- 音频 -->
2021-08-12 09:22:40 +08:00
<view wx:if="{{child.dataType=='3' && child.displayList && child.valueList.length>0}}"
style="width:100%;">
<view class="cu-form-group" style="flex-direction:column;">
<view class="flex align-center shadow-box" style="width:100%;"
2021-07-20 15:45:29 +08:00
wx:for="{{child.valueList}}" wx:for-index="a" wx:key="a" wx:for-item="audio">
<image src="/images/ic_user_default.png" mode="scaleToFill"
style="width:80rpx;height:80rpx;">
</image>
<view class="play-box">
<view class="flex justify-between align-center" style="width:80%;">
<text>{{audio.curDurationStr}}</text>
<slider class="flex-sub" bindchange="slider4change" min="{{0}}"
max="{{audio.duration}}" value="{{audio.curDuration}}"
backgroundColor="#cacaca" activeColor="#1296db" data-index="{{index}}"
data-idx="{{idx}}" data-i="{{i}}" data-item="{{audio}}" data-a="{{a}}"
block-size="14" block-color="#1296db" />
<text>{{audio.totalDurationStr}}</text>
</view>
<view class="flex justify-between" style="width:80%;">
<image src="/images/ic_audio_rewind.png" mode="scaleToFill"
data-index="{{index}}" data-idx="{{idx}}" data-a="{{a}}" data-i="{{i}}"
data-item="{{audio}}" catchtap="rewind">
</image>
<image
src="{{audio.isPlay ? '/images/ic_audio_playing.png':'/images/ic_audio_play.png'}}"
mode="scaleToFill" catchtap="play" data-index="{{index}}" data-i="{{i}}"
data-idx="{{idx}}" data-a="{{a}}" data-item="{{audio}}"></image>
<image src="/images/ic_audio_speed.png" mode="scaleToFill" catchtap="speed"
data-index="{{index}}" data-a="{{a}}" data-idx="{{idx}}" data-i="{{i}}"
data-item="{{audio}}">
</image>
</view>
</view>
</view>
</view>
</view>
<!-- 地图定位 -->
2021-08-12 09:22:40 +08:00
<view wx:if="{{child.dataType=='6' && child.displayList && child.valueList.length>0}}">
<view>
2021-07-20 15:45:29 +08:00
<view wx:for="{{child.valueList}}" wx:key="mindex" wx:for-index="mindex" wx:for-item="m"
2021-08-12 09:22:40 +08:00
style="width:100%;">
2021-07-20 15:45:29 +08:00
<view class="flex justify-between">
<view>
</view>
<view></view>
</view>
2021-08-12 09:22:40 +08:00
<view style="border-radius:10rpx;overflow:hidden;">
2021-07-20 15:45:29 +08:00
<map style="width:100%;height:300rpx;" longitude="{{m.longitude}}"
latitude="{{m.latitude}}" scale="12" enable-scroll="{{false}}"
enable-zoom="{{false}}" enable-rotate="{{false}}" enable-traffic="{{false}}"
markers="{{[{latitude:m.latitude,longitude:m.longitude}]}}"></map>
</view>
</view>
</view>
</view>
<!-- 文本域 -->
2021-08-12 09:22:40 +08:00
<view wx:if="{{child.dataType == '7' && child.displayList && child.value.length>0}}">
2021-07-20 15:45:29 +08:00
<view class="bg-white">
<view class="cu-form-group">
<view id="content"
2021-08-12 09:22:40 +08:00
style="line-height:40rpx;color:#333333;text-align: justify;width: 100%;">
2021-07-20 15:45:29 +08:00
{{child.value}}
</view>
</view>
</view>
</view>
<!-- 单选 -->
<view wx:if="{{child.dataType == '8' && child.displayList}}">
2021-07-20 15:45:29 +08:00
<view class="flex" style="flex-direction:row;">
<view class="cu-bar bg-white">
<view class="action">
<text class="cuIcon-vipcard"></text> <text
class="text-black">{{child.comment}}:</text><text
class="margin-left-sm">{{child.selValue}}</text>
</view>
</view>
</view>
</view>
<!-- 多选 -->
<view wx:if="{{child.dataType == '9'&& child.displayList}}">
2021-07-20 15:45:29 +08:00
<view class="cu-bar bg-white">
<view class="action">
<text class="cuIcon-vipcard"></text> <text>{{child.comment}}</text>
</view>
</view>
<view class="cu-capsule radius" wx:for="{{child.dictionariesList}}" wx:key="ids"
wx:for-index="ids" wx:for-item="ss">
<view wx:if="{{ss.isSel}}"
class="cu-tag bg-blue radius padding-left-sm padding-right-sm">
{{ss.dataName}}
</view>
</view>
</view>
</view>
<!-- 评论 收藏 点赞 -->
<view class="func-box" wx:if="{{item.funcSwitch}}">
<view class="line-gray-ssm">
</view>
<view class="func-items">
<!-- 转发 -->
<button class="func-item" open-type="share" data-sharetype="2" data-item="{{item}}"
data-index="{{index}}" wx:if="{{item.shareSwitch != '1' && item.shareSwitch != '3'}}"
style="font-size: 28rpx;font-weight: normal;text-align: center;background-color: #ffffff;width: 0rpx;margin: 0rpx;padding: 0rpx;border-radius: 0rpx;">
<text class="cuIcon-share text-gray" style="font-size: 38rpx;"></text>
<text style="text-align: center;line-height:28rpx;">转发</text>
</button>
<!-- 收藏 -->
<view class="func-item" wx:if="{{item.collectSwitch != '1' && item.collectSwitch != '3'}}"
data-item="{{item}}" data-index="{{index}}" catchtap="doCollect">
<text
class="{{item.collectStatus ? 'cuIcon-favorfill line-yellowlight2': 'cuIcon-favor text-gray'}}"
style="font-size: 38rpx;"></text>
<text>收藏</text>
</view>
<!-- 评论 -->
<view class="func-item" wx:if="{{item.commentSwitch != '1' && item.commentSwitch != '3'}}"
catchtap="showComment" data-uid="{{item.uid}}" data-cid="{{item.cId}}"
data-like="{{item.likeSwitch}}" data-share="{{item.shareSwitch}}"
data-collect="{{item.collectSwitch}}" data-comment="{{item.commentSwitch}}">
<text class="cuIcon-comment text-gray" style="font-size: 38rpx;"></text>
<text style="font-size: 30rpx;">{{item.commentCount>1000 ?
'1000+':item.commentCount}}</text>
</view>
<!-- 点赞 -->
<view class="func-item" wx:if="{{item.likeSwitch != '1' && item.likeSwitch != '3'}}"
catchtap="doLike" data-item="{{item}}" data-index="{{index}}">
<text
class="{{item.likeStatus ? 'cuIcon-appreciatefill line-yellowlight2' :'cuIcon-appreciate text-gray'}}"
style="font-size: 38rpx;"></text>
<text style="font-size:30rpx;">{{item.likeCount>1000? '1000+':item.likeCount}}</text>
</view>
</view>
</view>
2021-07-20 15:45:29 +08:00
</view>
</view>
</view>
</view>
</view>
<view wx:else style="margin-top:200rpx;width:100%;">
2021-08-12 09:22:40 +08:00
<van-empty description="暂无数据" />
2021-07-20 15:45:29 +08:00
</view>