index.wxml 14 KB

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