index.wxml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. <!--nova-werun/components/circle-card/index.wxml-->
  2. <view class="trends-one" bindtouchstart="onTouchStart" wx:if="{{objectId&&type=='detail'}}">
  3. <!-- 详细-->
  4. <view wx:if="{{type=='detail'}}" class="namebax">
  5. <image src="{{cicleList[0].profile.user.avatar}}"></image>
  6. <view class="name">{{cicleList[0].profile.user.nickname}}</view>
  7. </view>
  8. <view class="text" wx:if="{{type=='detail'}}">{{cicleList[0].content}}</view>
  9. <!-- 图片 -->
  10. <!-- 4张图片 -->
  11. <view class="picture4" wx:if="{{images.length==4}}">
  12. <image mode="scaleToFill" bindtap="previewImage" data-index="{{index}}" class="image" wx:for="{{images}}" src="{{item}}"> </image>
  13. </view>
  14. <!-- 3张和4-9张图片 -->
  15. <block wx:if="{{ type=='detail'}}">
  16. <view class="picture" wx:if="{{images.length>4 || images.length==3 }}">
  17. <image mode="scaleToFill" bindtap="previewImage" data-index="{{index}}" class="image" wx:for="{{images}}" src="{{item}}"> </image>
  18. </view>
  19. </block>
  20. <!-- 2张图片 -->
  21. <view class="picture2" wx:if="{{images.length==2}}">
  22. <image mode="scaleToFill" bindtap="previewImage" data-index="{{index}}" class="image" wx:for="{{images}}" src="{{item}}"> </image>
  23. </view>
  24. <!-- 1张图片 -->
  25. <view class="picture3" wx:if="{{images.length==1}}">
  26. <image mode="scaleToFill" bindtap="previewImage" data-index="{{index}}" class="{{imageclass}}" wx:for="{{images}}" src="{{item}}" bindload="onImageLoad"> </image>
  27. </view>
  28. <!-- -->
  29. <view class="addbox">
  30. <van-icon name="location-o" size='28rpx' />
  31. <view class="add-tex">南昌市</view>
  32. </view>
  33. <view class="timebox">
  34. <!-- 点赞 -->
  35. <view class="dianzan" wx:if="{{!isclick}}" bindtap="isclick" data-id="{{cicleList[0].objectId}}">
  36. <van-icon name="good-job-o" size='32rpx' />
  37. {{chickList.length}}
  38. </view>
  39. <view class="dianzan" wx:if="{{isclick}}" bindtap="isclick">
  40. <van-icon name="good-job-o" size='32rpx' color='#FF6C00' />
  41. {{chickList.length}}
  42. </view>
  43. <view class="time-box">
  44. <!-- <view class="time">{{time}}</view> -->
  45. <!-- 删除 -->
  46. <van-icon wx:if="{{ permission=='delete'}}" color='#1a1abd' bind:click='showconfirm' name="delete-o" size='32rpx' />
  47. <van-dialog id="van-dialog" showCancelButton message='你确认要删除吗' show="{{ showconfirm }}" bind:cancel='cancleconfirm' bind:confirm='clickconfirm' />
  48. <!-- 评论 -->
  49. <!-- 没有回复的评论的数量 -->
  50. <view class="pinlunbox" bindtap="showPopup">
  51. <van-icon name="chat-o" size='32rpx' />
  52. {{noCommentCount}}
  53. </view>
  54. <!-- 转发 -->
  55. <view class="pinlunbox" style="margin-left: 10rpx;">
  56. <van-icon name="share-o" size='32rpx' />
  57. 0
  58. </view>
  59. </view>
  60. <!-- 点赞评论 -->
  61. <!-- <view class="functionbox" wx:if="{{isgood}}">
  62. <view class="function">
  63. <view class="function1" wx:if="{{!isclick}}" bindtap="isclick" data-id="{{cicleList[0].objectId}}">
  64. <van-icon name="like-o" />
  65. <view class="text2">赞</view>
  66. </view>
  67. <view class="function1" wx:if="{{isclick}}" bindtap="isclick">
  68. <van-icon name="like" color='red' />
  69. <view class="text2">取消</view>
  70. </view>
  71. |
  72. <view class="function1" bindtap="showPopup">
  73. <van-icon name="chat-o" />
  74. <view class="text2">评论</view>
  75. </view>
  76. </view>
  77. </view> -->
  78. <!-- 输入框 -->
  79. <!-- <view class="point" bindtap="showgood"> ·· </view> -->
  80. <van-popup show="{{ show }}" position="bottom" custom-style="height: {{bottomNavHeight+textareaHeight+70}}rpx;" bind:close="onClose" overlay-style='background-color: rgba(255, 255, 255, 0); ' custom-style='background-color: #efefef;'>
  81. <view class='sending' style="height: {{textareaHeight+40}}rpx;">
  82. <textarea placeholder="{{commenttext}}" class="textarea" style="height: {{textareaHeight}}rpx;" bindinput="onInput" value="{{inputValue}}"></textarea>
  83. <view class="button2" wx:if="{{!inputValue}}">发送</view>
  84. <view class="button" wx:if="{{inputValue}}" bindtap="sendComment">发送</view>
  85. </view>
  86. </van-popup>
  87. </view>
  88. <!-- 点赞人 -->
  89. <!-- <view class="chinkinbox" wx:if="{{chickList.length!=0}}">
  90. <van-icon name="like-o" size='18' />
  91. <block wx:for="{{chickList}}">
  92. <view class="chickname" wx:if="{{index!=chickList.length-1}}">{{item.user.nickname}} ,</view>
  93. <view class="chickname" wx:if="{{index==chickList.length-1}}">{{item.user.nickname}}</view>
  94. </block>
  95. </view> -->
  96. <!-- 评论 -->
  97. <view class="{{chickList.length !=0? 'commentbox' :'commentbox2' }}" wx:if="{{commentList.length!=0}}">
  98. <block wx:for="{{commentList}}">
  99. <view class="{{item.showdeletid?'comment2':'comment'}}" wx:if="{{!item.comment}}" bindtap="showpop" data-id="{{item.objectId}}">
  100. <span style="color: #4896FB;margin-right:10rpx">{{item.user.nickname}}:</span>
  101. <span>{{item.content}}</span>
  102. <view wx:if="{{item.showdeletid}}" class="delete" bindtap="deletecomment" data-id="{{item.objectId}}">删除</view>
  103. </view>
  104. <view class="{{item.showdeletid?'comment2':'comment'}}" wx:if="{{item.comment&&!item.comment.isDeleted}}" bindtap="showpop" data-id="{{item.objectId}}">
  105. <span style="color: #4896FB;">{{item.user.nickname}}</span>
  106. 回复
  107. <span style="color: #4896FB;margin-right:10rpx">{{item.comment.user.nickname}}:</span>
  108. <span>{{item.content}}</span>
  109. <view wx:if="{{item.showdeletid}}" class="delete" bindtap="deletecomment" data-id="{{item.objectId}}">删除</view>
  110. </view>
  111. </block>
  112. </view>
  113. </view>
  114. <view class="trends-two" bindtouchstart="onTouchStart" wx:if="{{objectId&&type=='surface'}}">
  115. <!--主页 -->
  116. <view class="namebax" wx:if="{{type=='surface'}}" bindtap="gourl" data-url="../../pages/circle/circle-detail/index" data-id="{{cicleList[0].objectId}}">
  117. <image src="{{cicleList[0].profile.user.avatar}}"></image>
  118. <view class="name">{{cicleList[0].profile.user.nickname}}</view>
  119. <view class="guanzhu">
  120. <van-icon name="plus" size='24rpx' />
  121. 关注
  122. </view>
  123. </view>
  124. <view wx:if="{{!showFull}}" class="text">
  125. <view wx:if="{{cicleList[0].content.length > maxLength}}">
  126. <view class="contentbox">{{cicleList[0].content}}</view>
  127. <text bindtap="showFullContent" class="quanwen">查看全文</text>
  128. </view>
  129. <view wx:if="{{cicleList[0].content.length <= maxLength}}">
  130. <view bindtap="gourl" style="max-height: 134rpx;" data-url="../../pages/circle/circle-detail/index" data-id="{{cicleList[0].objectId}}" class="contentbox">{{cicleList[0].content}}</view>
  131. </view>
  132. </view>
  133. <!-- 全文内容 -->
  134. <view wx:if="{{showFull}}" class="full-content">
  135. <view bindtap="gourl" data-url="../../pages/circle/circle-detail/index" data-id="{{cicleList[0].objectId}}">
  136. {{cicleList[0].content}}
  137. </view>
  138. <text bindtap="showLessContent" class="quanwen">收起</text>
  139. </view>
  140. <!-- 图片 -->
  141. <!-- 4张图片 -->
  142. <view class="picture4" wx:if="{{images.length==4}}">
  143. <image mode="scaleToFill" bindtap="openpreviewImg" data-index="{{index}}" class="image" wx:for="{{images}}" src="{{item}}"> </image>
  144. </view>
  145. <!-- 3张和5-9张图片 -->
  146. <block wx:if="{{ type=='surface'}}">
  147. <view class="picture" wx:if="{{images.length>4 && images.length<=9 || images.length==3 }}">
  148. <image mode="scaleToFill" bindtap="openpreviewImg" data-index="{{index}}" class="image" wx:for="{{images}}" src="{{item}}"> </image>
  149. </view>
  150. </block>
  151. <!-- 9张以上图片 -->
  152. <view class="picture5" wx:if="{{images.length > 9 && type=='surface'}}">
  153. <view wx:for="{{images}}" wx:if="{{index < 9}}">
  154. <view class="image-wrapper">
  155. <image mode="scaleToFill" bindtap="openpreviewImg" data-index="{{index}}" class="image" src="{{item}}"></image>
  156. <view class="more-images" wx:if="{{index==8}}" bindtap="gourl" data-url="../../pages/circle/circle-detail/index" data-id="{{cicleList[0].objectId}}">+{{images.length - 9}}</view>
  157. </view>
  158. </view>
  159. </view>
  160. <!-- 2张图片 -->
  161. <view class="picture2" wx:if="{{images.length==2}}">
  162. <image mode="scaleToFill" bindtap="openpreviewImg" data-index="{{index}}" class="image" wx:for="{{images}}" wx:key="{{index}}" src="{{item}}"> </image>
  163. </view>
  164. <!-- 1张图片 -->
  165. <view class="picture3" wx:if="{{images.length==1}}">
  166. <image mode="scaleToFill" class="{{imageclass}}" data-index="{{index}}" wx:for="{{images}}" wx:key="index" src="{{item}}" bindload="onImageLoad" bindtap="openpreviewImg"> </image>
  167. </view>
  168. <!-- 预览组件 -->
  169. <previewImg id="previewComponent" previewImgList = "{{imgList}}" previewImg = "{{currentImg}}" />
  170. <view class="addbox">
  171. <van-icon name="location-o" size='28rpx' />
  172. <view class="add-tex">南昌市</view>
  173. </view>
  174. <view class="timebox">
  175. <!-- 点赞 -->
  176. <view class="dianzan" wx:if="{{!isclick}}" bindtap="isclick" data-id="{{cicleList[0].objectId}}">
  177. <van-icon name="good-job-o" size='32rpx' />
  178. {{chickList.length}}
  179. </view>
  180. <view class="dianzan" wx:if="{{isclick}}" bindtap="isclick">
  181. <van-icon name="good-job-o" size='32rpx' color='#FF6C00' />
  182. {{chickList.length}}
  183. </view>
  184. <view class="time-box">
  185. <!-- <view class="time">{{time}}</view> -->
  186. <!-- 删除 -->
  187. <van-icon wx:if="{{ permission=='delete'}}" color='#1a1abd' bind:click='showconfirm' name="delete-o" size='32rpx' />
  188. <van-dialog id="van-dialog" showCancelButton message='你确认要删除吗' show="{{ showconfirm }}" bind:cancel='cancleconfirm' bind:confirm='clickconfirm' />
  189. <!-- 评论 -->
  190. <!-- 没有回复的评论的数量 -->
  191. <view class="pinlunbox" bindtap="showPopup">
  192. <van-icon name="chat-o" size='32rpx' />
  193. {{noCommentCount}}
  194. </view>
  195. <!-- 转发 -->
  196. <view class="pinlunbox" style="margin-left: 10rpx;">
  197. <van-icon name="share-o" size='32rpx' />
  198. 0
  199. </view>
  200. </view>
  201. <!-- 点赞评论 -->
  202. <!-- <view class="functionbox" wx:if="{{isgood}}">
  203. <view class="function">
  204. <view class="function1" wx:if="{{!isclick}}" bindtap="isclick" data-id="{{cicleList[0].objectId}}">
  205. <van-icon name="like-o" />
  206. <view class="text2">赞</view>
  207. </view>
  208. <view class="function1" wx:if="{{isclick}}" bindtap="isclick">
  209. <van-icon name="like" color='red' />
  210. <view class="text2">取消</view>
  211. </view>
  212. |
  213. <view class="function1" bindtap="showPopup">
  214. <van-icon name="chat-o" />
  215. <view class="text2">评论</view>
  216. </view>
  217. </view>
  218. </view> -->
  219. <!-- 输入框 -->
  220. <!-- <view class="point" bindtap="showgood"> ·· </view> -->
  221. <van-popup show="{{ show }}" position="bottom" custom-style="height: {{bottomNavHeight+textareaHeight+70}}rpx;" bind:close="onClose" overlay-style='background-color: rgba(255, 255, 255, 0); ' custom-style='background-color: #efefef;'>
  222. <view class='sending' style="height: {{textareaHeight+40}}rpx;">
  223. <textarea placeholder="{{commenttext}}" class="textarea" style="height: {{textareaHeight}}rpx;" bindinput="onInput" value="{{inputValue}}"></textarea>
  224. <view class="button2" wx:if="{{!inputValue}}">发送</view>
  225. <view class="button" wx:if="{{inputValue}}" bindtap="sendComment">发送</view>
  226. </view>
  227. </van-popup>
  228. </view>
  229. <!-- 点赞人 -->
  230. <!-- <view class="chinkinbox" wx:if="{{chickList.length!=0}}">
  231. <van-icon name="like-o" size='18' />
  232. <block wx:for="{{chickList}}">
  233. <view class="chickname" wx:if="{{index!=chickList.length-1}}">{{item.user.nickname}} ,</view>
  234. <view class="chickname" wx:if="{{index==chickList.length-1}}">{{item.user.nickname}}</view>
  235. </block>
  236. </view> -->
  237. <!-- 评论 -->
  238. <view class="{{chickList.length !=0? 'commentbox' :'commentbox2' }}" wx:if="{{commentList.length!=0}}">
  239. <block wx:for="{{commentList}}">
  240. <view class="{{item.showdeletid?'comment2':'comment'}}" wx:if="{{!item.comment}}" bindtap="showpop" data-id="{{item.objectId}}">
  241. <span style="color: #4896FB;margin-right:10rpx">{{item.user.nickname}}:</span>
  242. <span>{{item.content}}</span>
  243. <view wx:if="{{item.showdeletid}}" class="delete" bindtap="deletecomment" data-id="{{item.objectId}}">删除</view>
  244. </view>
  245. <view class="{{item.showdeletid?'comment2':'comment'}}" wx:if="{{item.comment&&!item.comment.isDeleted}}" bindtap="showpop" data-id="{{item.objectId}}">
  246. <span style="color: #4896FB;">{{item.user.nickname}}</span>
  247. 回复
  248. <span style="color: #4896FB;margin-right:10rpx">{{item.comment.user.nickname}}:</span>
  249. <span>{{item.content}}</span>
  250. <view wx:if="{{item.showdeletid}}" class="delete" bindtap="deletecomment" data-id="{{item.objectId}}">删除</view>
  251. </view>
  252. </block>
  253. </view>
  254. </view>