355 lines
21 KiB
Plaintext
355 lines
21 KiB
Plaintext
<cu-custom id="head" isCustom="{{false}}" isBack="{{true}}" isIndex="{{false}}">
|
|
<view slot="content">详情</view>
|
|
</cu-custom>
|
|
<view class="page-box">
|
|
<view class="top-box">
|
|
<view class="flex flex-direction">
|
|
<view wx:if="{{dataList.length>0}}" style="background-color: #fff;border-radius: 5rpx;">
|
|
<!-- 栏目数据 -->
|
|
<view wx:for="{{dataList}}" wx:for-index="i" wx:for-item="child" wx:key="i"
|
|
class="{{child.value.length>0 || child.valueList.length>0 ? 'column-item' : ''}}">
|
|
<!-- 具体数据 -->
|
|
<!-- 文本 -->
|
|
<view wx:if="{{child.dataType=='1'}}" class="align-center">
|
|
<view class="bg-white">
|
|
<view class="cu-form-group">
|
|
<!-- 新闻标题 -->
|
|
<view wx:if="{{child.name=='bt'}}" class="news-title">
|
|
<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 wx:else id="content" class="text-lg text-black" style="line-height:40rpx;">
|
|
{{child.value}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 图片 -->
|
|
<view wx:if="{{child.dataType=='2' && child.valueList.length>0}}">
|
|
<!-- 九宫格 -->
|
|
<view wx:if="{{child.dataMode == '1'}}" class="cu-form-group">
|
|
<view class="grid col-3 grid-square flex-sub">
|
|
<view class="bg-img" wx:for="{{child.valueList}}" wx:key="d" wx:for-item="photo"
|
|
catchtap="viewImg" data-url="{{photo.path}}">
|
|
<image src='{{photo.path}}' mode='scaleToFill'></image>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 左右滑动 -->
|
|
<view wx:elif="{{child.dataMode=='2' || child.dataMode=='3'}}">
|
|
<swiper style="width:100%;height:400rpx;background-color:#fff" indicator-dots="{{true}}"
|
|
autoplay="{{child.dataMode=='3'}}">
|
|
<block wx:for="{{child.valueList}}" wx:key="pIndex" wx:for-index="pIndex"
|
|
wx:for-item="photo">
|
|
<swiper-item style="width:100%;">
|
|
<image style="width:100%;border-radius:5rpx;height:400rpx;" src="{{photo.path}}"
|
|
mode="scaleToFill">
|
|
</image>
|
|
</swiper-item>
|
|
</block>
|
|
</swiper>
|
|
</view>
|
|
<!-- 上下 -->
|
|
<view wx:elif="{{child.dataMode=='4'}}" style="background-color:#fff">
|
|
<block wx:for="{{child.valueList}}" wx:key="pIndex" wx:for-index="pIndex"
|
|
wx:for-item="photo">
|
|
<image style="width:100%;border-radius:5rpx;" src="{{photo.path}}" mode="widthFix">
|
|
</image>
|
|
</block>
|
|
</view>
|
|
</view>
|
|
<!-- 视频 -->
|
|
<view wx:if="{{child.dataType=='4' && 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>
|
|
</view>
|
|
</view>
|
|
<!-- <view class="grid grid-square flex-sub">
|
|
<view class="bg-img movie-item" wx:for="{{child.valueList}}" wx:for-index="d" wx:key="d"
|
|
wx:for-item="video" catchtap="viewVideo" data-url="{{video.path}}">
|
|
<image style="width:100%;height:280rpx;" src='{{video.imgPath}}' mode='scaleToFill'>
|
|
</image>
|
|
<view class="{{count > 3 ? 'play-box-arrow-pos':'play-box-arrow-flex'}}">
|
|
<image src="/images/ic_video_play.png" mode="scaleToFill"
|
|
style="width: 96rpx;height: 96rpx;">
|
|
</image>
|
|
</view>
|
|
</view>
|
|
</view> -->
|
|
</view>
|
|
</view>
|
|
<!-- 音频 -->
|
|
<view wx:if="{{child.dataType=='3' && child.valueList.length>0}}" style="width:100%;">
|
|
<view class="cu-form-group">
|
|
<view class="flex align-center shadow-box" style="width:100%;" 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>
|
|
<!-- 地图定位 -->
|
|
<view wx:if="{{child.dataType=='6' && child.valueList.length>0}}">
|
|
<view>
|
|
<view wx:for="{{child.valueList}}" wx:key="mindex" wx:for-index="mindex" wx:for-item="m"
|
|
style="width:100%;">
|
|
<view class="flex justify-between">
|
|
<view>
|
|
</view>
|
|
<view></view>
|
|
</view>
|
|
<view style="border-radius:10rpx;overflow:hidden;">
|
|
<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>
|
|
<!-- 文本域 -->
|
|
<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" space="emsp" decode="true">{{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: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>
|
|
<view wx:else style="margin-top:200rpx;width:100%;">
|
|
<van-empty description="暂无数据" />
|
|
</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 wx:for="{{commentList}}" wx:key="index" class="comment-list-item-box">
|
|
<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-type="3"
|
|
data-like="{{item.likeStatus}}">
|
|
<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 class="comment-count" catchtap="doCommentToComment" data-id="{{item.contentCommentId}}"
|
|
data-item="{{item}}">
|
|
{{item.contentCommentSubCount}} 回复
|
|
</view>
|
|
<text class="cuIcon-close" style="font-size: 32rpx;color: #5d5d5d;" catchtap="delComment"
|
|
data-idx="{{index}}" data-id="{{item.contentCommentId}}"
|
|
wx:if="{{curUserId== item.creator}}"></text>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
<view wx:else style="margin-top:200rpx;width:100%;">
|
|
<van-empty description="暂无评论" />
|
|
</view>
|
|
</view>
|
|
<!-- 评论底部输入 -->
|
|
<view class="foot bg-white" style="padding: 15rpx;" wx:if="{{isShowCommentInput}}">
|
|
<view class="comment-box">
|
|
<view class="input" hover-class="click-white" catchtap="showComment"
|
|
wx:if="{{commentSwitch != '1' && commentSwitch !='2'}}">
|
|
<text class="cuIcon-write"></text>
|
|
<text>写评论...</text>
|
|
</view>
|
|
<text wx:if="{{collectSwitch != '1' && collectSwitch != '2'}}"
|
|
class="icon-comment {{collectStatus ? 'cuIcon-favorfill line-yellowlight2': 'cuIcon-favor text-gray'}}"
|
|
catchtap="doCollect" style="font-size: 50rpx;"></text>
|
|
<text wx:if="{{likeSwitch != '1' && likeSwitch != '2'}}"
|
|
class="icon-comment {{likeStatus ? 'cuIcon-appreciatefill line-yellowlight2' :'cuIcon-appreciate text-gray'}}"
|
|
catchtap="doLike" data-type="2" style="font-size: 50rpx;"></text>
|
|
<button class="icon-comment" wx:if="{{shareSwitch != '1' && shareSwitch != '2'}}"
|
|
style="width: 0rpx;padding: 0rpx;background-color: #fff;line-height: 50rpx;margin:0rpx;">
|
|
<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 class="input" hover-class="click-white" catchtap="showComment"
|
|
wx:if="{{commentSwitch != '1' && commentSwitch !='2'}}">
|
|
<text class="cuIcon-write"></text>
|
|
<text>写评论...</text>
|
|
</view>
|
|
<text wx:if="{{likeSwitch != '1' && likeSwitch != '2'}}"
|
|
class="icon-comment {{currentCommentItem.likeStatus ? 'cuIcon-appreciatefill line-yellowlight2' :'cuIcon-appreciate text-gray'}}"
|
|
style="font-size: 50rpx;" data-id="{{currentCommentItem.contentCommentId}}" data-type="4"
|
|
catchtap="doLike" data-like="{{currentCommentItem.likeStatus}}"></text>
|
|
<button class="icon-comment" wx:if="{{shareSwitch != '1' && shareSwitch != '2'}}"
|
|
style="width: 0rpx;padding: 0rpx;background-color: #fff;line-height: 50rpx;margin:0rpx;">
|
|
<text class="cuIcon-share text-gray" style="font-size: 50rpx;"></text>
|
|
</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<!-- 单文本内容评论 -->
|
|
<van-action-sheet show="{{isShowComment}}" round="{{false}}" bind:close="onCloseDialog" z-index="102">
|
|
<view class="comment-line-input-box">
|
|
<input placeholder="请输入评论内容" cursor-spacing="100" value="{{commentValue}}" class="comment-input"
|
|
bindinput="inputWatch" />
|
|
<view class="comment-line-btn" catchtap="doSubmitComment" data-id="{{dataId}}">
|
|
发布
|
|
</view>
|
|
</view>
|
|
</van-action-sheet>
|
|
|
|
<!-- 评论的回复 -->
|
|
<van-action-sheet show="{{isShowRestore}}" round="{{true}}" bind:close="onCloseRestore"
|
|
title="{{restoreList.length}}条回复">
|
|
<!-- 楼主 -->
|
|
<view class="restore-content-box">
|
|
<view class="restore-content-title">
|
|
<image src="{{currentCommentItem.contentCommentUserIcon}}" mode="scaleToFill"></image>
|
|
<text>{{currentCommentItem.contentCommentUserName}}</text>
|
|
</view>
|
|
<view class="restore-content">{{currentCommentItem.contentCommentContent}}</view>
|
|
</view>
|
|
<!-- 回复的内容 -->
|
|
<block wx:if="{{restoreList.length>0}}">
|
|
<scroll-view style="height: 600rpx;width: 100%;padding: 15rpx;margin-bottom: 100rpx;" scroll-y>
|
|
<view style="padding: 15rpx 15rpx 25rpx 15rpx;color: #000000;font-size: 32rpx;">全部回复</view>
|
|
<block wx:if="{{restoreList.length>0}}">
|
|
<view wx:for="{{restoreList}}" wx:key="index" class="comment-list-item-box">
|
|
<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-type="3"
|
|
data-like="{{item.likeStatus}}">
|
|
<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 class="cuIcon-close" style="font-size: 32rpx;color: #5d5d5d;" catchtap="delComment"
|
|
data-idx="{{index}}" data-id="{{item.contentCommentId}}"
|
|
wx:if="{{curUserId== item.creator}}"></text>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
</scroll-view>
|
|
</block>
|
|
<view wx:else style="height: 500rpx;width:100%;">
|
|
<van-empty description="暂无回复" />
|
|
</view>
|
|
</van-action-sheet>
|
|
|
|
<!-- 文本加多媒体评论内容 -->
|
|
<!-- <van-action-sheet show="{{isShowComment}}" round="{{false}}" bind:close="onCloseDialog">
|
|
<view class="comment-content-box">
|
|
<view class="comment-content-input">
|
|
<textarea placeholder="请输入评论内容" placeholder-style="font-size:28rpx;" cursor-spacing="200"
|
|
value="{{inputWatch}}" bindinput="inputWatch"></textarea>
|
|
<view wx:if="{{mediaBean != null}}"
|
|
style="display: flex;flex-direction: row;justify-content: center;align-items: center;width: 128rpx;height: 128rpx;position: relative;">
|
|
<image src="{{mediaBean.coverPath}}" mode="aspectFill" style="width: 100%;height: 100%;"></image>
|
|
<text class="cuIcon-close" catchtap="delMedia"
|
|
style="font-size: 38rpx;position: absolute;top:-15rpx;right:-15rpx;background:rgba(130,130,130, 0.8);border-radius: 50%;text-align: center;opacity: 0.8;color:#ffffff;"></text>
|
|
<image src="/images/ic_video_play.png" mode="scaleToFill" wx:if="{{mediaBean.type=='video'}}"
|
|
style="width: 30rpx;height: 30rpx;position: absolute;top: 40%;left: 40%;">
|
|
</image>
|
|
</view>
|
|
</view>
|
|
<view class="btn">
|
|
发布
|
|
</view>
|
|
</view>
|
|
<view class="comment-content-funcs">
|
|
<text class="cuIcon-pic" style="margin: 0rpx 30rpx;font-size: 50rpx;" catchtap="chooseImg"></text>
|
|
<text class="cuIcon-record" style="margin: 0rpx 30rpx;font-size: 50rpx;" catchtap="chooseVideo"></text>
|
|
</view>
|
|
</van-action-sheet> --> |