index.wxml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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='showconfirm' name="delete-o" size='20' />
  53. <van-dialog id="van-dialog" showCancelButton message='你确认要删除吗' show="{{ showconfirm }}" bind:cancel='cancleconfirm' bind:confirm='clickconfirm' />
  54. </view>
  55. <!-- 点赞评论 -->
  56. <view class="functionbox" wx:if="{{isgood}}">
  57. <view class="function">
  58. <view class="function1" wx:if="{{!isclick}}" bindtap="isclick" data-id="{{cicleList[0].objectId}}">
  59. <van-icon name="like-o" />
  60. <view class="text2">赞</view>
  61. </view>
  62. <view class="function1" wx:if="{{isclick}}" bindtap="isclick">
  63. <van-icon name="like" color='red' />
  64. <view class="text2">取消</view>
  65. </view>
  66. |
  67. <view class="function1" bindtap="showPopup">
  68. <van-icon name="chat-o" />
  69. <view class="text2">评论</view>
  70. </view>
  71. </view>
  72. </view>
  73. <!-- 输入框 -->
  74. <view class="point" bindtap="showgood"> ·· </view>
  75. <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;'>
  76. <view class='sending' style="height: {{textareaHeight+40}}rpx;">
  77. <textarea placeholder="{{commenttext}}" class="textarea" style="height: {{textareaHeight}}rpx;" bindinput="onInput" value="{{inputValue}}"></textarea>
  78. <view class="button2" wx:if="{{!inputValue}}">发送</view>
  79. <view class="button" wx:if="{{inputValue}}" bindtap="sendComment">发送</view>
  80. </view>
  81. </van-popup>
  82. </view>
  83. <!-- 点赞人 -->
  84. <view class="chinkinbox" wx:if="{{chickList.length!=0}}">
  85. <van-icon name="like-o" size='18' />
  86. <block wx:for="{{chickList}}">
  87. <view class="chickname" wx:if="{{index!=chickList.length-1}}">{{item.user.nickname}} ,</view>
  88. <view class="chickname" wx:if="{{index==chickList.length-1}}">{{item.user.nickname}}</view>
  89. </block>
  90. </view>
  91. <!-- 评论 -->
  92. <view class="{{chickList.length !=0? 'commentbox' :'commentbox2' }}" wx:if="{{commentList.length!=0}}">
  93. <block wx:for="{{commentList}}">
  94. <view class="{{item.showdeletid?'comment2':'comment'}}" wx:if="{{!item.comment}}" bindtap="showpop" data-id="{{item.objectId}}">
  95. <span style="color: #072d79;">{{item.user.nickname}}</span>
  96. :
  97. <span>{{item.content}}</span>
  98. <view wx:if="{{item.showdeletid}}" class="delete" bindtap="deletecomment" data-id="{{item.objectId}}">删除</view>
  99. </view>
  100. <view class="{{item.showdeletid?'comment2':'comment'}}" wx:if="{{item.comment&&!item.comment.isDeleted}}" bindtap="showpop" data-id="{{item.objectId}}">
  101. <span style="color: #072d79;">{{item.user.nickname}}</span>
  102. 回复
  103. <span style="color: #072d79;">{{item.comment.user.nickname}}</span>
  104. :
  105. <span>{{item.content}}</span>
  106. <view wx:if="{{item.showdeletid}}" class="delete" bindtap="deletecomment" data-id="{{item.objectId}}">删除</view>
  107. </view>
  108. </block>
  109. </view>
  110. </view>