detail.wxml 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <import src="/assets/libs/towxml/entry.wxml" />
  2. <import src="/assets/libs/zanui/loadmore/index.wxml" />
  3. <import src="/assets/libs/zanui/toast/index.wxml" />
  4. <view class="container">
  5. <!-- S 封面 -->
  6. <view class="cover" style="background-image:url({{ postInfo.image }})">
  7. <view class="overlay">
  8. <button data-name="shareBtn" class='share' open-type="share">
  9. <i class="fa fa-share-alt"></i>
  10. </button>
  11. </view>
  12. </view>
  13. <!-- E 封面 -->
  14. <!-- S 标题 -->
  15. <view class="title">
  16. <view class="h1">{{ postInfo.title }}</view>
  17. <view class="date">{{ postInfo.create_date }}</view>
  18. </view>
  19. <!-- E 标题 -->
  20. <!-- S 正文 -->
  21. <view class="content">
  22. <template is="entry" data="{{...postInfo.article}}" />
  23. </view>
  24. <!-- E 正文 -->
  25. <!-- S 发表评论 -->
  26. <view class="postcomment zan-panel">
  27. <view class="zan-panel-title">发表评论</view>
  28. <form bindsubmit="formSubmit">
  29. <view class="zan-cell zan-field">
  30. <textarea placeholder="请输入评论内容" focus="{{form.focus}}" name="content" class="zan-field__input zan-cell__bd " value="{{ form.message }}" />
  31. </view>
  32. <view class="zan-btns">
  33. <button wx:if="{{ userInfo }}" formType="submit" class='zan-btn zan-btn--small zan-btn--primary'>提交</button>
  34. <button wx:if="{{ !userInfo }}" bindgetuserinfo="login" open-type='getUserInfo' class='zan-btn zan-btn--small zan-btn--primary'>立即登录</button>
  35. </view>
  36. </form>
  37. </view>
  38. <!-- E 发表评论 -->
  39. <!-- S 回复列表 -->
  40. <view class="commentlist zan-panel">
  41. <view class="zan-panel-title">回复列表</view>
  42. <view style="padding:15px 0;">
  43. <block wx:for="{{ commentList }}" wx:index="index" wx:key="pid">
  44. <view class="zan-card">
  45. <view class="zan-card__thumb">
  46. <image class="zan-card__img" src="{{ item.avatar }}" mode="aspectFit"></image>
  47. </view>
  48. <view class="zan-card__detail">
  49. <view class="zan-card__detail-row zan-c-gray">
  50. <view class="zan-card__left-col" style='margin-right:0'>
  51. <view class="comment-author">
  52. <i class="fa fa-user"></i> {{ item.username }}
  53. </view>
  54. <view class="comment-date" style='margin-right:auto;'>
  55. {{ item.create_date }}
  56. </view>
  57. <view class="comment-reply" bindtap="reply" data-pid="{{ item.pid }}" data-username="{{ item.username }}">
  58. <i class="fa fa-reply"></i>
  59. </view>
  60. </view>
  61. </view>
  62. <view class="zan-card__detail-row">
  63. <view class="zan-card__left-col zan-font-12" style="margin-right:0;">
  64. <template is="entry" data="{{...item.article}}" />
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. </block>
  70. </view>
  71. </view>
  72. <!-- E 回复列表 -->
  73. <!-- S 加载更多 -->
  74. <template is="zan-loadmore" data="{{ loading: loading }}" />
  75. <template is="zan-loadmore" data="{{ nodata: nodata }}" />
  76. <template is="zan-loadmore" data="{{ nomore: nomore }}" />
  77. <!-- E 加载更多 -->
  78. <template is="zan-toast" data="{{ zanToast }}"></template>
  79. </view>