index.wxml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  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="timebox">
  30. <view class="time-box">
  31. <view class="time">{{time}}</view>
  32. <van-icon wx:if="{{ permission=='delete'}}" color='#1a1abd' bind:click='showconfirm' name="delete-o" size='20' />
  33. <van-dialog id="van-dialog" showCancelButton message='你确认要删除吗' show="{{ showconfirm }}" bind:cancel='cancleconfirm' bind:confirm='clickconfirm' />
  34. </view>
  35. <!-- 点赞评论 -->
  36. <view class="functionbox" wx:if="{{isgood}}">
  37. <view class="function">
  38. <view class="function1" wx:if="{{!isclick}}" bindtap="isclick" data-id="{{cicleList[0].objectId}}">
  39. <van-icon name="like-o" />
  40. <view class="text2">赞</view>
  41. </view>
  42. <view class="function1" wx:if="{{isclick}}" bindtap="isclick">
  43. <van-icon name="like" color='red' />
  44. <view class="text2">取消</view>
  45. </view>
  46. |
  47. <view class="function1" bindtap="showPopup">
  48. <van-icon name="chat-o" />
  49. <view class="text2">评论</view>
  50. </view>
  51. </view>
  52. </view>
  53. <!-- 输入框 -->
  54. <view class="point" bindtap="showgood"> ·· </view>
  55. <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;'>
  56. <view class='sending' style="height: {{textareaHeight+40}}rpx;">
  57. <textarea placeholder="{{commenttext}}" class="textarea" style="height: {{textareaHeight}}rpx;" bindinput="onInput" value="{{inputValue}}"></textarea>
  58. <view class="button2" wx:if="{{!inputValue}}">发送</view>
  59. <view class="button" wx:if="{{inputValue}}" bindtap="sendComment">发送</view>
  60. </view>
  61. </van-popup>
  62. </view>
  63. <!-- 点赞人 -->
  64. <view class="chinkinbox" wx:if="{{chickList.length!=0}}">
  65. <van-icon name="like-o" size='18' />
  66. <block wx:for="{{chickList}}">
  67. <view class="chickname" wx:if="{{index!=chickList.length-1}}">{{item.user.nickname}} ,</view>
  68. <view class="chickname" wx:if="{{index==chickList.length-1}}">{{item.user.nickname}}</view>
  69. </block>
  70. </view>
  71. <!-- 评论 -->
  72. <view class="{{chickList.length !=0? 'commentbox' :'commentbox2' }}" wx:if="{{commentList.length!=0}}">
  73. <block wx:for="{{commentList}}">
  74. <view class="{{item.showdeletid?'comment2':'comment'}}" wx:if="{{!item.comment}}" bindtap="showpop" data-id="{{item.objectId}}">
  75. <span style="color: #072d79;">{{item.user.nickname}}</span>
  76. :
  77. <span>{{item.content}}</span>
  78. <view wx:if="{{item.showdeletid}}" class="delete" bindtap="deletecomment" data-id="{{item.objectId}}">删除</view>
  79. </view>
  80. <view class="{{item.showdeletid?'comment2':'comment'}}" wx:if="{{item.comment&&!item.comment.isDeleted}}" bindtap="showpop" data-id="{{item.objectId}}">
  81. <span style="color: #072d79;">{{item.user.nickname}}</span>
  82. 回复
  83. <span style="color: #072d79;">{{item.comment.user.nickname}}</span>
  84. :
  85. <span>{{item.content}}</span>
  86. <view wx:if="{{item.showdeletid}}" class="delete" bindtap="deletecomment" data-id="{{item.objectId}}">删除</view>
  87. </view>
  88. </block>
  89. </view>
  90. </view>
  91. <view class="trends-two" bindtouchstart="onTouchStart" wx:if="{{objectId&&type=='surface'}}">
  92. <!--主页 -->
  93. <view class="namebax" wx:if="{{type=='surface'}}" bindtap="gourl" data-url="../../pages/circle/circle-detail/index" data-id="{{cicleList[0].objectId}}">
  94. <image src="{{cicleList[0].profile.user.avatar}}"></image>
  95. <view class="name">{{cicleList[0].profile.user.nickname}}</view>
  96. <view class="guanzhu">
  97. <van-icon name="plus" size='24rpx' />
  98. 关注
  99. </view>
  100. </view>
  101. <view wx:if="{{type=='surface'}}" class="text" bindtap="gourl" data-url="../../pages/circle/circle-detail/index" data-id="{{cicleList[0].objectId}}">{{cicleList[0].content}}
  102. <view class="quanwen">查看全文</view>
  103. </view>
  104. <!-- 图片 -->
  105. <!-- 4张图片 -->
  106. <view class="picture4" wx:if="{{images.length==4}}">
  107. <image mode="scaleToFill" bindtap="previewImage" data-index="{{index}}" class="image" wx:for="{{images}}" src="{{item}}"> </image>
  108. </view>
  109. <!-- 3张和4-9张图片 -->
  110. <block wx:if="{{ type=='surface'}}">
  111. <view class="picture" wx:if="{{images.length>4 && images.length<=9 || images.length==3 }}">
  112. <image mode="scaleToFill" bindtap="previewImage" data-index="{{index}}" class="image" wx:for="{{images}}" src="{{item}}"> </image>
  113. </view>
  114. </block>
  115. <!-- 9张以上图片 -->
  116. <view class="picture5" wx:if="{{images.length > 9 && type=='surface'}}">
  117. <view wx:for="{{images}}" wx:if="{{index < 9}}">
  118. <view class="image-wrapper">
  119. <image mode="scaleToFill" bindtap="previewImage" data-index="{{index}}" class="image" src="{{item}}"></image>
  120. <view class="more-images" wx:if="{{index==8}}" bindtap="gourl" data-id="{{cicleList[0].objectId}}" data-url="../../pages/circle-detail/index">+{{images.length - 9}}</view>
  121. </view>
  122. </view>
  123. </view>
  124. <!-- 2张图片 -->
  125. <view class="picture2" wx:if="{{images.length==2}}">
  126. <image mode="scaleToFill" bindtap="previewImage" data-index="{{index}}" class="image" wx:for="{{images}}" src="{{item}}"> </image>
  127. </view>
  128. <!-- 1张图片 -->
  129. <view class="picture3" wx:if="{{images.length==1}}">
  130. <image mode="scaleToFill" bindtap="previewImage" data-index="{{index}}" class="{{imageclass}}" wx:for="{{images}}" src="{{item}}" bindload="onImageLoad"> </image>
  131. </view>
  132. <view class="timebox">
  133. <!-- 展示时间 -->
  134. <view class="time-box">
  135. <!-- <view class="time">{{time}}</view> -->
  136. <van-icon wx:if="{{ permission=='delete'}}" color='#1a1abd' bind:click='showconfirm' name="delete-o" size='20' />
  137. <van-dialog id="van-dialog" showCancelButton message='你确认要删除吗' show="{{ showconfirm }}" bind:cancel='cancleconfirm' bind:confirm='clickconfirm' />
  138. </view>
  139. <!-- 点赞评论 -->
  140. <!-- <view class="functionbox" wx:if="{{isgood}}">
  141. <view class="function">
  142. <view class="function1" wx:if="{{!isclick}}" bindtap="isclick" data-id="{{cicleList[0].objectId}}">
  143. <van-icon name="like-o" />
  144. <view class="text2">赞</view>
  145. </view>
  146. <view class="function1" wx:if="{{isclick}}" bindtap="isclick">
  147. <van-icon name="like" color='red' />
  148. <view class="text2">取消</view>
  149. </view>
  150. |
  151. <view class="function1" bindtap="showPopup">
  152. <van-icon name="chat-o" />
  153. <view class="text2">评论</view>
  154. </view>
  155. </view>
  156. </view> -->
  157. <!-- 输入框 -->
  158. <!-- <view class="point" bindtap="showgood"> ·· </view> -->
  159. <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;'>
  160. <view class='sending' style="height: {{textareaHeight+40}}rpx;">
  161. <textarea placeholder="{{commenttext}}" class="textarea" style="height: {{textareaHeight}}rpx;" bindinput="onInput" value="{{inputValue}}"></textarea>
  162. <view class="button2" wx:if="{{!inputValue}}">发送</view>
  163. <view class="button" wx:if="{{inputValue}}" bindtap="sendComment">发送</view>
  164. </view>
  165. </van-popup>
  166. </view>
  167. <!-- 点赞人 -->
  168. <!-- <view class="chinkinbox" wx:if="{{chickList.length!=0}}">
  169. <van-icon name="like-o" size='18' />
  170. <block wx:for="{{chickList}}">
  171. <view class="chickname" wx:if="{{index!=chickList.length-1}}">{{item.user.nickname}} ,</view>
  172. <view class="chickname" wx:if="{{index==chickList.length-1}}">{{item.user.nickname}}</view>
  173. </block>
  174. </view> -->
  175. <!-- 评论 -->
  176. <view class="{{chickList.length !=0? 'commentbox' :'commentbox2' }}" wx:if="{{commentList.length!=0}}">
  177. <block wx:for="{{commentList}}">
  178. <view class="{{item.showdeletid?'comment2':'comment'}}" wx:if="{{!item.comment}}" bindtap="showpop" data-id="{{item.objectId}}">
  179. <span style="color: #072d79;">{{item.user.nickname}}</span>
  180. :
  181. <span>{{item.content}}</span>
  182. <view wx:if="{{item.showdeletid}}" class="delete" bindtap="deletecomment" data-id="{{item.objectId}}">删除</view>
  183. </view>
  184. <view class="{{item.showdeletid?'comment2':'comment'}}" wx:if="{{item.comment&&!item.comment.isDeleted}}" bindtap="showpop" data-id="{{item.objectId}}">
  185. <span style="color: #072d79;">{{item.user.nickname}}</span>
  186. 回复
  187. <span style="color: #072d79;">{{item.comment.user.nickname}}</span>
  188. :
  189. <span>{{item.content}}</span>
  190. <view wx:if="{{item.showdeletid}}" class="delete" bindtap="deletecomment" data-id="{{item.objectId}}">删除</view>
  191. </view>
  192. </block>
  193. </view>
  194. </view>