detail.wxml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <import src="/assets/libs/zanui/loadmore/index.wxml" />
  2. <view class="container">
  3. <!-- S 封面 -->
  4. <view class="cover" style="background-image:url({{ archivesInfo.image }})">
  5. <view class="overlay">
  6. <button data-name="shareBtn" class='share' open-type="share">
  7. <i class="fa fa-share-alt"></i>
  8. </button>
  9. </view>
  10. </view>
  11. <!-- E 封面 -->
  12. <!-- S 标题 -->
  13. <view class="title">
  14. <view class="h1">{{ archivesInfo.title }}</view>
  15. <view class="date">{{ archivesInfo.create_date }}</view>
  16. </view>
  17. <!-- E 标题 -->
  18. <!-- S 产品列表 -->
  19. <view class="product-list">
  20. <view class="products">
  21. <block wx:for="{{ archivesInfo.productlist }}" wx:key="*this">
  22. <view class="product">
  23. <view class="image" bindtap="preview" data-url="{{item}}" style="background-image:url('{{item}}')"></view>
  24. </view>
  25. </block>
  26. </view>
  27. </view>
  28. <!-- E 产品列表 -->
  29. <!-- S 正文 -->
  30. <view class="content">
  31. <mp-html content="{{archivesInfo.content}}" />
  32. </view>
  33. <!-- E 正文 -->
  34. <!-- S 赞踩 -->
  35. <view class="thumbs zan-panel">
  36. <view class="like" bindtap="vote" data-type="like" data-id="{{ archivesInfo.id }}">
  37. <i class="fa fa-thumbs-up"></i>
  38. </view>
  39. <view class="progress">
  40. <view class="bar">
  41. <view class="current" style="width: {{ archivesInfo.likeratio }}%;"></view>
  42. </view>
  43. <view class="num">
  44. <i>{{archivesInfo.likes}}</i> :
  45. <span>{{archivesInfo.dislikes}}</span>
  46. </view>
  47. </view>
  48. <view class="dislike" bindtap="vote" data-type="dislike" data-id="{{ archivesInfo.id }}">
  49. <i class="fa fa-thumbs-down"></i>
  50. </view>
  51. </view>
  52. <!-- E 赞踩 -->
  53. <!-- S 发表评论 -->
  54. <view class="postcomment zan-panel">
  55. <view class="zan-panel-title">发表评论</view>
  56. <form bindsubmit="formSubmit">
  57. <view class="zan-cell zan-field">
  58. <textarea placeholder="请输入评论内容" focus="{{form.focus}}" name="content" class="zan-field__input zan-cell__bd " value="{{ form.message }}" />
  59. </view>
  60. <view class="zan-btns">
  61. <button wx:if="{{ userInfo }}" formType="submit" class='zan-btn zan-btn--small zan-btn--primary'>提交</button>
  62. <button wx:if="{{ !userInfo }}" bindgetuserinfo="login" open-type="getUserInfo" class='zan-btn zan-btn--small zan-btn--primary'>立即登录</button>
  63. </view>
  64. </form>
  65. </view>
  66. <!-- E 发表评论 -->
  67. <!-- S 回复列表 -->
  68. <view class="commentlist zan-panel">
  69. <view class="zan-panel-title">回复列表</view>
  70. <view style="padding:15px 0;">
  71. <view class="zan-center zan-c-gray" wx:if="{{ !commentList.length }}" >暂无评论</view>
  72. <block wx:for="{{ commentList }}" wx:index="index" wx:key="pid">
  73. <view class="zan-card">
  74. <view class="zan-card__thumb">
  75. <image class="zan-card__img" src="{{ item.user.avatar }}" mode="aspectFill"></image>
  76. </view>
  77. <view class="zan-card__detail">
  78. <view class="zan-card__detail-row zan-c-gray">
  79. <view class="zan-card__left-col" style='margin-right:0'>
  80. <view class="comment-author">
  81. <i class="fa fa-user"></i> {{ item.user.nickname }}
  82. </view>
  83. <view class="comment-date" style='margin-right:auto;'>
  84. {{ item.create_date }}
  85. </view>
  86. <view class="comment-reply" bindtap="reply" data-pid="{{ item.pid }}" data-nickname="{{ item.user.nickname }}">
  87. <i class="fa fa-reply"></i>
  88. </view>
  89. </view>
  90. </view>
  91. <view class="zan-card__detail-row">
  92. <view class="zan-card__left-col zan-font-12" style="margin-right:0;">
  93. <mp-html content="{{item.content}}" />
  94. </view>
  95. </view>
  96. </view>
  97. </view>
  98. </block>
  99. </view>
  100. </view>
  101. <!-- E 回复列表 -->
  102. <!-- S 加载更多 -->
  103. <template is="zan-loadmore" data="{{ loading: loading }}" />
  104. <template is="zan-loadmore" data="{{ nodata: nodata }}" />
  105. <template is="zan-loadmore" data="{{ nomore: nomore }}" />
  106. <!-- E 加载更多 -->
  107. </view>