index.wxml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  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="previewImage" 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="previewImage" 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="previewImage" 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="previewImage" data-index="{{index}}" class="image" wx:for="{{images}}" src="{{item}}"> </image>
  163. </view>
  164. <!-- 1张图片 -->
  165. <view class="picture3" wx:if="{{images.length==1}}">
  166. <image mode="scaleToFill" bindtap="previewImage" data-index="{{index}}" class="{{imageclass}}" wx:for="{{images}}" src="{{item}}" bindload="onImageLoad"> </image>
  167. </view>
  168. <view class="addbox">
  169. <van-icon name="location-o" size='28rpx' />
  170. <view class="add-tex">南昌市</view>
  171. </view>
  172. <view class="timebox">
  173. <!-- 点赞 -->
  174. <view class="dianzan" wx:if="{{!isclick}}" bindtap="isclick" data-id="{{cicleList[0].objectId}}">
  175. <van-icon name="good-job-o" size='32rpx' />
  176. {{chickList.length}}
  177. </view>
  178. <view class="dianzan" wx:if="{{isclick}}" bindtap="isclick">
  179. <van-icon name="good-job-o" size='32rpx' color='#FF6C00' />
  180. {{chickList.length}}
  181. </view>
  182. <view class="time-box">
  183. <!-- <view class="time">{{time}}</view> -->
  184. <!-- 删除 -->
  185. <van-icon wx:if="{{ permission=='delete'}}" color='#1a1abd' bind:click='showconfirm' name="delete-o" size='32rpx' />
  186. <van-dialog id="van-dialog" showCancelButton message='你确认要删除吗' show="{{ showconfirm }}" bind:cancel='cancleconfirm' bind:confirm='clickconfirm' />
  187. <!-- 评论 -->
  188. <!-- 没有回复的评论的数量 -->
  189. <view class="pinlunbox" bindtap="showPopup">
  190. <van-icon name="chat-o" size='32rpx' />
  191. {{noCommentCount}}
  192. </view>
  193. <!-- 转发 -->
  194. <view class="pinlunbox" style="margin-left: 10rpx;">
  195. <van-icon name="share-o" size='32rpx' />
  196. 0
  197. </view>
  198. </view>
  199. <!-- 点赞评论 -->
  200. <!-- <view class="functionbox" wx:if="{{isgood}}">
  201. <view class="function">
  202. <view class="function1" wx:if="{{!isclick}}" bindtap="isclick" data-id="{{cicleList[0].objectId}}">
  203. <van-icon name="like-o" />
  204. <view class="text2">赞</view>
  205. </view>
  206. <view class="function1" wx:if="{{isclick}}" bindtap="isclick">
  207. <van-icon name="like" color='red' />
  208. <view class="text2">取消</view>
  209. </view>
  210. |
  211. <view class="function1" bindtap="showPopup">
  212. <van-icon name="chat-o" />
  213. <view class="text2">评论</view>
  214. </view>
  215. </view>
  216. </view> -->
  217. <!-- 输入框 -->
  218. <!-- <view class="point" bindtap="showgood"> ·· </view> -->
  219. <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;'>
  220. <view class='sending' style="height: {{textareaHeight+40}}rpx;">
  221. <textarea placeholder="{{commenttext}}" class="textarea" style="height: {{textareaHeight}}rpx;" bindinput="onInput" value="{{inputValue}}"></textarea>
  222. <view class="button2" wx:if="{{!inputValue}}">发送</view>
  223. <view class="button" wx:if="{{inputValue}}" bindtap="sendComment">发送</view>
  224. </view>
  225. </van-popup>
  226. </view>
  227. <!-- 点赞人 -->
  228. <!-- <view class="chinkinbox" wx:if="{{chickList.length!=0}}">
  229. <van-icon name="like-o" size='18' />
  230. <block wx:for="{{chickList}}">
  231. <view class="chickname" wx:if="{{index!=chickList.length-1}}">{{item.user.nickname}} ,</view>
  232. <view class="chickname" wx:if="{{index==chickList.length-1}}">{{item.user.nickname}}</view>
  233. </block>
  234. </view> -->
  235. <!-- 评论 -->
  236. <view class="{{chickList.length !=0? 'commentbox' :'commentbox2' }}" wx:if="{{commentList.length!=0}}">
  237. <block wx:for="{{commentList}}">
  238. <view class="{{item.showdeletid?'comment2':'comment'}}" wx:if="{{!item.comment}}" bindtap="showpop" data-id="{{item.objectId}}">
  239. <span style="color: #4896FB;margin-right:10rpx">{{item.user.nickname}}:</span>
  240. <span>{{item.content}}</span>
  241. <view wx:if="{{item.showdeletid}}" class="delete" bindtap="deletecomment" data-id="{{item.objectId}}">删除</view>
  242. </view>
  243. <view class="{{item.showdeletid?'comment2':'comment'}}" wx:if="{{item.comment&&!item.comment.isDeleted}}" bindtap="showpop" data-id="{{item.objectId}}">
  244. <span style="color: #4896FB;">{{item.user.nickname}}</span>
  245. 回复
  246. <span style="color: #4896FB;margin-right:10rpx">{{item.comment.user.nickname}}:</span>
  247. <span>{{item.content}}</span>
  248. <view wx:if="{{item.showdeletid}}" class="delete" bindtap="deletecomment" data-id="{{item.objectId}}">删除</view>
  249. </view>
  250. </block>
  251. </view>
  252. </view>