纸通宝小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

119 lines
7.0 KiB

<!--pages/moment/detail/index.wxml-->
<wxs module="moment" src="../index.wxs"></wxs>
<cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">帖子详情</view>
</cu-custom>
<scroll-view scroll-y style="height: {{height}}rpx;" bindscrolltolower="fetchCommentList" wx:if="{{momentDetail}}">
<view class="bg-white text-black text-bold text-lg" style="padding:32rpx">
<text>{{momentDetail.title}}</text>
</view>
<view class="bg-white flex flex-center" style="padding:8rpx 32rpx;justify-content: start">
<wux-image width="{{20}}" height="{{20}}" shape="circle" src="{{momentDetail.creatorAvatarUrl}}" mode="aspectFill">
<image class="image-load" slot="loading" style="width:20px;height:20px" src="/assets/image/ygImg.png"></image>
<image class="image-load" slot="error" style="width:20px;height:20px" src="/assets/image/ygImg.png"></image>
<image class="image-load" slot="empty" style="width:20px;height:20px" src="/assets/image/ygImg.png"></image>
</wux-image>
<view class="text-cut text-df" style="max-width:400rpx;margin-left:12rpx">{{momentDetail.creatorName || ''}}</view>
<view class="text-black" style="border-left:2rpx solid #999999;margin-left:12rpx;height:24rpx;"></view>
<view class="text-cut text-df text-gray" style="max-width:400rpx;margin-left:12rpx">{{momentDetail.createTime}}</view>
</view>
<view class="bg-white" wx:if="{{momentDetail.labelList.length}}" style="padding-left:30rpx">
<wux-tag wx:for="{{momentDetail.labelList}}" wx:key="index" color="blue">{{item}}</wux-tag>
</view>
<view class="bg-white cu-card dynamic no-card" style="padding-top:30rpx">
<view class="cu-item shadow">
<view class="text-content">
<text>{{momentDetail.content}}</text>
</view>
<view style="padding:0rpx 32rpx 20rpx 32rpx">
<sudoku-image image-list="{{momentDetail.imageUrlList}}" clickable="{{true}}" listed="{{true}}"></sudoku-image>
</view>
<view wx:if="{{momentDetail.millPaperId}}" style="padding: 0rpx 32rpx 20rpx 32rpx">
<wux-tag bind:click="toMill">
<text style="background-color:#ddd;border-radius: 32rpx;text-align: center;width:32rpx;height:32rpx;line-height:32rpx">#</text>
<text class="text-df" style="margin-left:16rpx">{{momentDetail.millPaperName}}</text>
<text class="cuIcon-right text-balck" style="font-size:24rpx;margin-left:32rpx;padding-top:2rpx"></text>
</wux-tag>
</view>
<view style="height:20rpx;width:750rpx;background-color:#f3f3f3"></view>
<view class="text-bold text-lg" style="padding:36rpx 30rpx 10rpx 30rpx">评论</view>
<view class="bg-white list-empty" style="height:400rpx" wx:if="{{!commentList.length}}">
<view class="load-spinner text-gray" wx:if="{{requesting}}" />
<image style="width:84rpx;height:68rpx" src="/assets/image/message_black.png"></image>
<view class="text-empty" style="margin-top:32rpx">{{requesting? '正在加载' : '暂无评论'}}</view>
</view>
<view wx:else>
<view wx:for-item="pageItem" class="cu-list menu-avatar comment" wx:for-index="pageIndex" wx:for="{{commentList}}" wx:key="pageIndex">
<view wx:for="{{pageItem}}" wx:key="index" class="cu-item" style="padding:30rpx;align-items: flex-start">
<wux-image width="{{40}}" height="{{40}}" shape="circle" src="{{item.replierAvatarUrl}}" mode="aspectFill">
<image class="image-load" style="width:40px;height:40px" slot="loading" src="/assets/image/ygImg.png"></image>
<image class="image-load" style="width:40px;height:40px" slot="error" src="/assets/image/ygImg.png"></image>
<image class="image-load" style="width:40px;height:40px" slot="empty" src="/assets/image/ygImg.png"></image>
</wux-image>
<view class="content" style="padding-left:20rpx">
<view class="flex flex-justify text-black">
<view class="text-gray text-cut" style="width: 160px">{{item.replierNickname}}</view>
<view data-page="{{pageIndex}}" data-index="{{index}}" bindtap="postLikeComment">
<text class="text-df text-black" style="margin-right:4rpx">{{item.likeQuantity || '赞'}}</text>
<text class="cuIcon-appreciate{{item.isLiked ? 'fill' : ''}} text-{{item.isLiked ? 'blue' : 'gray'}}"></text>
</view>
</view>
<view class="text-black text-content text-df">{{item.content}}</view>
<view class="margin-top-sm flex justify-between">
<view class="text-gray text-df">{{moment.formatMTime(item.createTime)}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
<view class="cu-bar foot input" style="bottom:{{inputBottom}}px" wx:if="{{momentDetail}}">
<view class="flex flex-center" style="height:{{100 + safeBottom}}rpx;padding-bottom: {{safeBottom}}rpx;" wx:if="{{!focus}}">
<view class="search-form" style="border-radius: 12rpx;width:440rpx;margin-left: 32rpx" bindtap="showComment">
<input placeholder="点击输入评论" disabled="true" adjust-position="{{false}}" focus="{{false}}"></input>
</view>
<view class="action" style="margin-right:24rpx">
<wux-badge count="{{momentDetail.replyQuantity}}" top="-8" right="-8" overflowCount="999">
<image style="width:42rpx;height:34rpx" src="/assets/image/message_black.png"></image>
</wux-badge>
</view>
<view class="action" bindtap="likePost" style="margin-right:24rpx">
<wux-badge count="{{momentDetail.likeQuantity}}" top="-8" right="-8" overflowCount="999">
<image style="width:40rpx;height:38rpx" src="/assets/image/prase_blue.png" wx:if="{{momentDetail.isLiked}}"></image>
<image style="width:40rpx;height:38rpx" src="/assets/image/prase_black.png" wx:else></image>
</wux-badge>
</view>
<view class="roder-add flex flex-center">
<button open-type="share" class="share-btn">
<text class="cuIcon-share text-black" style="font-size:22px;"></text>
</button>
</view>
<!-- 生成海报点击图标 -->
<!-- <view class="roder-add flex flex-center">
<button bindtap="createNewImg" class="share-btn">
<text class="cuIcon-news text-black" style="font-size:27px;"></text>
</button>
</view> -->
</view>
<view style="padding:30rpx 10rpx 30rpx 30rpx;width:100%" wx:else>
<textarea id="content" maxlength="180" style="height:160rpx;width:100%" focus="{{focus}}" cursor-spacing="40" show-confirm-bar="{{false}}" adjust-position="{{false}}" bindinput="bindInput" placeholder="输入评论,最多180字" placeholder-style="color:#aaa" bindfocus="inputFocus" bindblur="inputBlur"></textarea>
<view class="flex" style="justify-content: flex-end;">
<button class="cu-btn offer-btn" style="background-color: #008AFF" bindtap="submitComment">发表</button>
</view>
</view>
<!--生成海报 -->
<!-- <view class='imagePathBox' hidden="{{maskHidden == false}}">
<image src="{{imagePath}}" class='shengcheng'></image>
<button class='baocun' bindtap='baocun'>保存相册,分享到朋友圈</button>
</view>
<view hidden="{{maskHidden == false}}" class="mask"></view>
<view class="canvas-box">
<canvas style="width: 375px;height: 667px;position:fixed;top:9999px" canvas-id="mycanvas"/>
</view> -->
</view>