city_card/packagecard/moments/momentsdetail/momentsdetail.wxml
2023-07-15 14:25:28 +08:00

212 lines
16 KiB
Plaintext
Executable File

<view class="page-box">
<view class="top-box">
<view class="flex flex-direction">
<view style="background-color: #fff;border-radius: 5rpx;" wx:if="{{dataList.length>0}}">
<view class="{{child.value.length>0||child.valueList.length>0?'column-item':''}}" wx:for="{{dataList}}" wx:for-index="i" wx:for-item="child" wx:key="i">
<view class="align-center" wx:if="{{child.dataType=='1'}}">
<view class="bg-white">
<view class="cu-form-group">
<view class="news-title" wx:if="{{child.name=='bt'}}">
<text class="news-title-text">{{child.value}}</text>
<view class="news-title-desc-box">
<text class="news-title-desc">来源:网络</text>
<text class="news-title-desc">发布时间:{{publishTime}}</text>
</view>
</view>
<view class="text-lg text-black" id="content" style="line-height:40rpx;" wx:else> {{child.value}} </view>
</view>
</view>
</view>
<view wx:if="{{child.dataType=='2'&&child.valueList.length>0}}">
<view class="cu-form-group" wx:if="{{child.dataMode=='1'}}">
<view class="grid col-3 grid-square flex-sub">
<view catchtap="viewImg" class="bg-img" data-cur="{{photo.path}}" data-values="{{child.valueList}}" wx:for="{{child.valueList}}" wx:for-item="photo" wx:key="d">
<image mode="scaleToFill" src="{{photo.path}}"></image>
</view>
</view>
</view>
<view wx:elif="{{child.dataMode=='2'||child.dataMode=='3'}}">
<swiper autoplay="{{child.dataMode=='3'}}" indicatorDots="{{true}}" style="width:100%;height:400rpx;background-color:#fff">
<swiper-item catchtap="viewImg" data-cur="{{photo.path}}" data-values="{{child.valueList}}" style="width:100%;" wx:for="{{child.valueList}}" wx:for-index="pIndex" wx:for-item="photo" wx:key="pIndex">
<image mode="scaleToFill" src="{{photo.path}}" style="width:100%;border-radius:5rpx;height:400rpx;"></image>
</swiper-item>
</swiper>
</view>
<view style="background-color:#fff" wx:elif="{{child.dataMode=='4'}}">
<image catchtap="viewImg" data-cur="{{photo.path}}" data-values="{{child.valueList}}" mode="widthFix" src="{{photo.path}}" style="width:100%;border-radius:5rpx;" wx:for="{{child.valueList}}" wx:for-index="pIndex" wx:for-item="photo" wx:key="pIndex"></image>
</view>
</view>
<view wx:if="{{child.dataType=='4'&&child.valueList.length>0}}">
<view class="cu-form-group" style="border-radius:10rpx;">
<view catchtap="viewVideo" class="movie-box" data-url="{{video.path}}" wx:for="{{child.valueList}}" wx:for-index="d" wx:for-item="video" wx:key="d">
<image mode="scaleToFill" src="{{video.imgPath}}"></image>
<view class="play-box-arrow-flex">
<image mode="scaleToFill" src="/images/ic_video_play.png" style="width: 96rpx;height:96rpx;"></image>
</view>
</view>
</view>
</view>
<view style="width:100%;" wx:if="{{child.dataType=='3'&&child.valueList.length>0}}">
<view class="cu-form-group">
<view class="flex align-center shadow-box" style="width:100%;" wx:for="{{child.valueList}}" wx:for-index="a" wx:for-item="audio" wx:key="a">
<image mode="scaleToFill" src="/images/ic_user_default.png" 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 activeColor="#1296db" backgroundColor="#cacaca" bindchange="slider4change" blockColor="#1296db" blockSize="14" class="flex-sub" data-a="{{a}}" data-i="{{i}}" data-idx="{{idx}}" data-index="{{index}}" data-item="{{audio}}" max="{{audio.duration}}" min="{{0}}" value="{{audio.curDuration}}"></slider>
<text>{{audio.totalDurationStr}}</text>
</view>
<view class="flex justify-between" style="width:80%;">
<image catchtap="rewind" data-a="{{a}}" data-i="{{i}}" data-idx="{{idx}}" data-index="{{index}}" data-item="{{audio}}" mode="scaleToFill" src="/images/ic_audio_rewind.png"></image>
<image catchtap="play" data-a="{{a}}" data-i="{{i}}" data-idx="{{idx}}" data-index="{{index}}" data-item="{{audio}}" mode="scaleToFill" src="{{audio.isPlay?'/images/ic_audio_playing.png':'/images/ic_audio_play.png'}}"></image>
<image catchtap="speed" data-a="{{a}}" data-i="{{i}}" data-idx="{{idx}}" data-index="{{index}}" data-item="{{audio}}" mode="scaleToFill" src="/images/ic_audio_speed.png"></image>
</view>
</view>
</view>
</view>
</view>
<view wx:if="{{child.dataType=='6'&&child.valueList.length>0}}">
<view>
<view style="width:100%;" wx:for="{{child.valueList}}" wx:for-index="mindex" wx:for-item="m" wx:key="mindex">
<view class="flex justify-between">
<view></view>
<view></view>
</view>
<view style="border-radius:10rpx;overflow:hidden;">
<map enableRotate="{{false}}" enableScroll="{{false}}" enableTraffic="{{false}}" enableZoom="{{false}}" latitude="{{m.latitude}}" longitude="{{m.longitude}}" markers="{{[ {latitude:m.latitude,longitude:m.longitude} ]}}" scale="12" style="width:100%;height:300rpx;"></map>
</view>
</view>
</view>
</view>
<view wx:if="{{child.dataType=='7'&&child.value.length>0}}">
<view class="bg-white">
<view class="cu-form-group">
<view id="content" style="line-height:40rpx;">
<text class="news-content" decode="true" space="emsp">{{child.value}}</text>
</view>
</view>
</view>
</view>
<view wx:if="{{child.dataType=='8'}}">
<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'}}">
<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:for-index="ids" wx:for-item="ss" wx:key="ids">
<view class="cu-tag bg-blue radius padding-left-sm padding-right-sm" wx:if="{{ss.isSel}}"> {{ss.dataName}} </view>
</view>
</view>
</view>
</view>
<view style="margin-top:200rpx;width:100%;" wx:else>
<van-empty description="暂无数据"></van-empty>
</view>
</view>
</view>
<view class="comment-list-box" style="height: {{contentHeight}}px;">
<view class="comment-list-title">
<view>评论{{commentCount}}</view>
</view>
<block wx:if="{{commentList.length>0}}">
<view class="comment-list-item-box" wx:for="{{commentList}}" wx:key="index">
<view class="item-title-box">
<view class="comment-item-title">
<image src="{{item.contentCommentUserIcon}}"></image>
<view class="comment-user-name">{{item.contentCommentUserName}}</view>
</view>
<view catchtap="doLike" data-id="{{item.contentCommentId}}" data-idx="{{index}}" data-like="{{item.likeStatus}}" data-type="3">
<text style="margin-right: 15rpx;">{{item.contentCommentLike}}</text>
<text class="{{item.likeStatus?'cuIcon-appreciatefill line-yellowlight2':'cuIcon-appreciate text-gray'}}" style="font-size: 32rpx;"></text>
</view>
</view>
<view class="comment-list-item-content"> {{item.contentCommentContent}} </view>
<view class="restore-box">
<view catchtap="doCommentToComment" class="comment-count" data-id="{{item.contentCommentId}}" data-item="{{item}}"> {{item.contentCommentSubCount}} 回复 </view>
<text catchtap="delComment" class="cuIcon-close" data-id="{{item.contentCommentId}}" data-idx="{{index}}" style="font-size: 32rpx;color: #5d5d5d;" wx:if="{{curUserId==item.creator}}"></text>
</view>
</view>
</block>
<view style="margin-top:50rpx;width:100%;" wx:else>
<van-empty description="暂无评论"></van-empty>
</view>
</view>
<view class="foot bg-white" style="padding: 15rpx;" wx:if="{{isShowCommentInput}}">
<view class="comment-box">
<view catchtap="showComment" class="input" hoverClass="click-white" wx:if="{{commentSwitch!='1'&&commentSwitch!='2'}}">
<text class="cuIcon-write"></text>
<text>写评论...</text>
</view>
<text catchtap="doCollect" class="icon-comment {{collectStatus?'cuIcon-favorfill line-yellowlight2':'cuIcon-favor text-gray'}}" style="font-size: 50rpx;" wx:if="{{collectSwitch!='1'&&collectSwitch!='2'}}"></text>
<text catchtap="doLike" class="icon-comment {{likeStatus?'cuIcon-appreciatefill line-yellowlight2':'cuIcon-appreciate text-gray'}}" data-type="2" style="font-size: 50rpx;" wx:if="{{likeSwitch!='1'&&likeSwitch!='2'}}"></text>
<button class="icon-comment" style="width: 0rpx;padding: 0rpx;background-color: #fff;line-height: 50rpx;margin:0rpx;" wx:if="{{shareSwitch!='1'&&shareSwitch!='2'}}">
<text class="cuIcon-share text-gray" style="font-size: 50rpx;"></text>
</button>
</view>
</view>
<view class="foot bg-white" style="padding: 15rpx;z-index: 101;" wx:if="{{isShowRestore&&isShowCommentInput}}">
<view class="comment-box">
<view catchtap="showComment" class="input" hoverClass="click-white" wx:if="{{commentSwitch!='1'&&commentSwitch!='2'}}">
<text class="cuIcon-write"></text>
<text>写评论...</text>
</view>
<text catchtap="doLike" class="icon-comment {{currentCommentItem.likeStatus?'cuIcon-appreciatefill line-yellowlight2':'cuIcon-appreciate text-gray'}}" data-id="{{currentCommentItem.contentCommentId}}" data-like="{{currentCommentItem.likeStatus}}" data-type="4" style="font-size: 50rpx;" wx:if="{{likeSwitch!='1'&&likeSwitch!='2'}}"></text>
<button class="icon-comment" style="width: 0rpx;padding: 0rpx;background-color: #fff;line-height: 50rpx;margin:0rpx;" wx:if="{{shareSwitch!='1'&&shareSwitch!='2'}}">
<text class="cuIcon-share text-gray" style="font-size: 50rpx;"></text>
</button>
</view>
</view>
</view>
<van-action-sheet bind:close="onCloseDialog" round="{{false}}" show="{{isShowComment}}" zIndex="102">
<view class="comment-line-input-box">
<input bindinput="inputWatch" class="comment-input" cursorSpacing="100" placeholder="请输入评论内容" value="{{commentValue}}"></input>
<view catchtap="doSubmitComment" class="comment-line-btn" data-id="{{dataId}}"> 发布 </view>
</view>
</van-action-sheet>
<van-action-sheet bind:close="onCloseRestore" round="{{true}}" show="{{isShowRestore}}" title="{{restoreList.length}}条回复">
<view class="restore-content-box">
<view class="restore-content-title">
<image mode="scaleToFill" src="{{currentCommentItem.contentCommentUserIcon}}"></image>
<text>{{currentCommentItem.contentCommentUserName}}</text>
</view>
<view class="restore-content">{{currentCommentItem.contentCommentContent}}</view>
</view>
<scroll-view scrollY style="height: 600rpx;width: 100%;padding: 15rpx;margin-bottom: 100rpx;" wx:if="{{restoreList.length>0}}">
<view style="padding: 15rpx 15rpx 25rpx 15rpx;color: #000000;font-size: 32rpx;">全部回复</view>
<block wx:if="{{restoreList.length>0}}">
<view class="comment-list-item-box" wx:for="{{restoreList}}" wx:key="index">
<view class="item-title-box">
<view class="comment-item-title">
<image src="{{item.contentCommentUserIcon}}"></image>
<view class="comment-user-name">{{item.contentCommentUserName}}</view>
</view>
<view catchtap="doLike" data-id="{{item.contentCommentId}}" data-idx="{{index}}" data-like="{{item.likeStatus}}" data-type="3">
<text style="margin-right: 15rpx;">{{item.contentCommentLike}}</text>
<text class="{{item.likeStatus?'cuIcon-appreciatefill line-yellowlight2':'cuIcon-appreciate text-gray'}}" style="font-size: 32rpx;"></text>
</view>
</view>
<view class="comment-list-item-content"> {{item.contentCommentContent}} </view>
<view class="restore-box">
<view></view>
<text catchtap="delComment" class="cuIcon-close" data-id="{{item.contentCommentId}}" data-idx="{{index}}" style="font-size: 32rpx;color: #5d5d5d;" wx:if="{{curUserId==item.creator}}"></text>
</view>
</view>
</block>
</scroll-view>
<view style="height: 500rpx;width:100%;" wx:else>
<van-empty description="暂无回复"></van-empty>
</view>
</van-action-sheet>