detail.wxml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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="content">
  20. <mp-html content="{{archivesInfo.content}}" />
  21. </view>
  22. <!-- E 正文 -->
  23. <!-- S 支付 -->
  24. <view class="paynow zan-panel" wx:if="{{ archivesInfo.price>0 && !archivesInfo.ispaid }}">
  25. <button wx:if="{{ userInfo && archivesInfo.price>0 && !archivesInfo.ispaid }}" bindtap="pay" data-id="{{ archivesInfo.id }}" class='zan-btn zan-btn--small zan-btn--primary'>立即支付</button>
  26. <button wx:if="{{ !userInfo }}" bindgetuserinfo="login" open-type="getUserInfo" class='zan-btn zan-btn--small zan-btn--danger'>请登录后再进行付费</button>
  27. </view>
  28. <!-- E 支付 -->
  29. <!-- S 赞踩 -->
  30. <view class="thumbs zan-panel" wx:if="{{ archivesInfo.price==0 || (archivesInfo.price>0 && archivesInfo.ispaid) }}">
  31. <view class="like" bindtap="vote" data-type="like" data-id="{{ archivesInfo.id }}">
  32. <i class="fa fa-thumbs-up"></i>
  33. </view>
  34. <view class="progress">
  35. <view class="bar">
  36. <view class="current" style="width: {{ archivesInfo.likeratio }}%;"></view>
  37. </view>
  38. <view class="num">
  39. <i>{{archivesInfo.likes}}</i> :
  40. <span>{{archivesInfo.dislikes}}</span>
  41. </view>
  42. </view>
  43. <view class="dislike" bindtap="vote" data-type="dislike" data-id="{{ archivesInfo.id }}">
  44. <i class="fa fa-thumbs-down"></i>
  45. </view>
  46. </view>
  47. <!-- E 赞踩 -->
  48. <!-- S 发表评论 -->
  49. <view class="postcomment zan-panel">
  50. <view class="zan-panel-title">发表评论</view>
  51. <form bindsubmit="formSubmit">
  52. <view class="zan-cell zan-field">
  53. <textarea placeholder="请输入评论内容" focus="{{form.focus}}" name="content" class="zan-field__input zan-cell__bd " value="{{ form.message }}" />
  54. </view>
  55. <view class="zan-btns">
  56. <button wx:if="{{ userInfo }}" formType="submit" class='zan-btn zan-btn--small zan-btn--primary'>提交</button>
  57. <button wx:if="{{ !userInfo }}" bindgetuserinfo="login" open-type="getUserInfo" class='zan-btn zan-btn--small zan-btn--primary'>立即登录</button>
  58. </view>
  59. </form>
  60. </view>
  61. <!-- E 发表评论 -->
  62. <!-- S 回复列表 -->
  63. <view class="commentlist zan-panel">
  64. <view class="zan-panel-title">回复列表</view>
  65. <view style="padding:15px 0;">
  66. <view class="zan-center zan-c-gray" wx:if="{{ !commentList.length }}" >暂无评论</view>
  67. <block wx:for="{{ commentList }}" wx:index="index" wx:key="pid">
  68. <view class="zan-card">
  69. <view class="zan-card__thumb">
  70. <image class="zan-card__img" src="{{ item.user.avatar }}" mode="aspectFill"></image>
  71. </view>
  72. <view class="zan-card__detail">
  73. <view class="zan-card__detail-row zan-c-gray">
  74. <view class="zan-card__left-col" style='margin-right:0'>
  75. <view class="comment-author">
  76. <i class="fa fa-user"></i> {{ item.user.nickname }}
  77. </view>
  78. <view class="comment-date" style='margin-right:auto;'>
  79. {{ item.create_date }}
  80. </view>
  81. <view class="comment-reply" bindtap="reply" data-pid="{{ item.pid }}" data-nickname="{{ item.user.nickname }}">
  82. <i class="fa fa-reply"></i>
  83. </view>
  84. </view>
  85. </view>
  86. <view class="zan-card__detail-row">
  87. <view class="zan-card__left-col zan-font-12" style="margin-right:0;">
  88. <mp-html content="{{item.content}}" />
  89. </view>
  90. </view>
  91. </view>
  92. </view>
  93. </block>
  94. </view>
  95. </view>
  96. <!-- E 回复列表 -->
  97. <!-- S 加载更多 -->
  98. <template is="zan-loadmore" data="{{ loading: loading }}" />
  99. <template is="zan-loadmore" data="{{ nodata: nodata }}" />
  100. <template is="zan-loadmore" data="{{ nomore: nomore }}" />
  101. <!-- E 加载更多 -->
  102. </view>