index.wxml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <!--nova-werun/components/circle-card/index.wxml-->
  2. <view class="trends-one" bindtouchstart="onTouchStart" wx:if="{{objectId}}">
  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. <view class="namebax" wx:if="{{type=='surface'}}" bindtap="gourl" data-url="../../pages/circle/circle-detail/index" data-id="{{cicleList[0].objectId}}">
  11. <image src="{{cicleList[0].profile.user.avatar}}"></image>
  12. <view class="name">{{cicleList[0].profile.user.nickname}}</view>
  13. </view>
  14. <view wx:if="{{type=='surface'}}" class="text" bindtap="gourl" data-url="../../pages/circle/circle-detail/index" data-id="{{cicleList[0].objectId}}">{{cicleList[0].content}}</view>
  15. <!-- 图片 -->
  16. <!-- 4张图片 -->
  17. <view class="picture4" wx:if="{{images.length==4}}">
  18. <image mode="scaleToFill" bindtap="previewImage" data-index="{{index}}" class="image" wx:for="{{images}}" src="{{item}}"> </image>
  19. </view>
  20. <!-- 3张和4-9张图片 -->
  21. <block wx:if="{{ type=='surface'}}">
  22. <view class="picture" wx:if="{{images.length>4 && images.length<=9 || images.length==3 }}">
  23. <image mode="scaleToFill" bindtap="previewImage" data-index="{{index}}" class="image" wx:for="{{images}}" src="{{item}}"> </image>
  24. </view>
  25. </block>
  26. <block wx:if="{{ type=='detail'}}">
  27. <view class="picture" wx:if="{{images.length>4 || images.length==3 }}">
  28. <image mode="scaleToFill" bindtap="previewImage" data-index="{{index}}" class="image" wx:for="{{images}}" src="{{item}}"> </image>
  29. </view>
  30. </block>
  31. <!-- 9张以上图片 -->
  32. <view class="picture5" wx:if="{{images.length > 9 && type=='surface'}}">
  33. <view wx:for="{{images}}" wx:if="{{index < 9}}">
  34. <view class="image-wrapper">
  35. <image mode="scaleToFill" bindtap="previewImage" data-index="{{index}}" class="image" src="{{item}}"></image>
  36. <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>
  37. </view>
  38. </view>
  39. </view>
  40. <!-- 2张图片 -->
  41. <view class="picture2" wx:if="{{images.length==2}}">
  42. <image mode="scaleToFill" bindtap="previewImage" data-index="{{index}}" class="image" wx:for="{{images}}" src="{{item}}"> </image>
  43. </view>
  44. <!-- 1张图片 -->
  45. <view class="picture3" wx:if="{{images.length==1}}">
  46. <image mode="scaleToFill" bindtap="previewImage" data-index="{{index}}" class="{{imageclass}}" wx:for="{{images}}" src="{{item}}" bindload="onImageLoad"> </image>
  47. </view>
  48. <!-- -->
  49. <view class="timebox">
  50. <view class="time-box">
  51. <view class="time">{{time}}</view>
  52. <van-icon wx:if="{{ permission=='delete'}}" color='#1a1abd' bind:click='deletecircle' name="delete-o" size='20' />
  53. </view>
  54. <!-- 点赞评论 -->
  55. <view class="functionbox" wx:if="{{isgood}}">
  56. <view class="function">
  57. <view class="function1" wx:if="{{!isclick}}" bindtap="isclick" data-id="{{cicleList[0].objectId}}">
  58. <van-icon name="like-o" />
  59. <view class="text2">赞</view>
  60. </view>
  61. <view class="function1" wx:if="{{isclick}}" bindtap="isclick">
  62. <van-icon name="like" color='red' />
  63. <view class="text2">取消</view>
  64. </view>
  65. |
  66. <view class="function1" bindtap="showPopup">
  67. <van-icon name="chat-o" />
  68. <view class="text2">评论</view>
  69. </view>
  70. </view>
  71. </view>
  72. <!-- 输入框 -->
  73. <view class="point" bindtap="showgood"> ·· </view>
  74. <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;'>
  75. <view class='sending' style="height: {{textareaHeight+40}}rpx;">
  76. <textarea placeholder="{{commenttext}}" class="textarea" style="height: {{textareaHeight}}rpx;" bindinput="onInput" value="{{inputValue}}"></textarea>
  77. <view class="button2" wx:if="{{!inputValue}}">发送</view>
  78. <view class="button" wx:if="{{inputValue}}" bindtap="sendComment">发送</view>
  79. </view>
  80. </van-popup>
  81. </view>
  82. <!-- 点赞人 -->
  83. <view class="chinkinbox" wx:if="{{chickList.length!=0}}">
  84. <van-icon name="like-o" size='18' />
  85. <block wx:for="{{chickList}}">
  86. <view class="chickname" wx:if="{{index!=chickList.length-1}}">{{item.user.nickname}} ,</view>
  87. <view class="chickname" wx:if="{{index==chickList.length-1}}">{{item.user.nickname}}</view>
  88. </block>
  89. </view>
  90. <!-- 评论 -->
  91. <view class="{{chickList.length !=0? 'commentbox' :'commentbox2' }}" wx:if="{{commentList.length!=0}}">
  92. <block wx:for="{{commentList}}">
  93. <view class="{{item.showdeletid?'comment2':'comment'}}" wx:if="{{!item.comment}}" bindtap="showpop" data-id="{{item.objectId}}">
  94. <span style="color: #072d79;">{{item.user.nickname}}</span>
  95. :
  96. <span>{{item.content}}</span>
  97. <view wx:if="{{item.showdeletid}}" class="delete" bindtap="deletecomment" data-id="{{item.objectId}}">删除</view>
  98. </view>
  99. <view class="{{item.showdeletid?'comment2':'comment'}}" wx:if="{{item.comment&&!item.comment.isDeleted}}" bindtap="showpop" data-id="{{item.objectId}}">
  100. <span style="color: #072d79;">{{item.user.nickname}}</span>
  101. 回复
  102. <span style="color: #072d79;">{{item.comment.user.nickname}}</span>
  103. :
  104. <span>{{item.content}}</span>
  105. <view wx:if="{{item.showdeletid}}" class="delete" bindtap="deletecomment" data-id="{{item.objectId}}">删除</view>
  106. </view>
  107. </block>
  108. </view>
  109. </view>