newDetail.wxml 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <!--pages/newDetail/newDetail.wxml-->
  2. <view class="new-detail">
  3. <block wx:if="{{!isFullScreen}}">
  4. <nav-bar class="nav-bar" title="留学daily"></nav-bar>
  5. </block>
  6. <view id="contentID">
  7. <view wx:if="{{detailData && detailData.videoUrl && detailData.videoUrl.length}}">
  8. <view class="video-placeholder" hidden="{{videoLoad}}">加载中...</view>
  9. <video hidden="{{!videoLoad}}" id="myVideo" class="video" src="{{ detailData.videoUrl || '' }}" controls
  10. object-fit="contain" poster="{{ detailData.videoCoverImgUrl }}" bind:loadedmetadata="loadedVideoMetaData"
  11. bind:fullscreenchange="fullscreenVideochange"></video>
  12. </view>
  13. <view class="continer" wx:if="{{detailData}}">
  14. <block wx:if="{{ detailData.type !== 1 }}">
  15. <user-card layout-type="{{detailData.type == 3 ? 1 : 3}}" author-info="{{detailData.authorInfo}}"
  16. time="{{detailData.createTimeText}}" is-like="{{detailData.isAttention}}" is-author="{{detailData.isAuthor}}">
  17. </user-card>
  18. <text class="video-title">{{ detailData.title || detailData.content }}</text>
  19. <block wx:if="{{detailData.type == 3 && detailData.imgsUrl && detailData.imgsUrl.length}}">
  20. <view class="imgs-wrap">
  21. <image class="img" wx:for="{{detailData.imgsUrl}}" wx:key="index" mode="widthFix" src="{{item}}"
  22. data-current-item="{{item}}" bind:tap="tapPreviewImage"></image>
  23. </view>
  24. </block>
  25. </block>
  26. <block wx:else>
  27. <text class="title">{{ detailData.title }}</text>
  28. <user-card layout-type="{{detailData.type == 3 ? 1 : 3}}" author-info="{{detailData.authorInfo}}"
  29. time="{{detailData.createTimeText}}" is-like="{{detailData.isAttention}}" is-author="{{detailData.isAuthor}}">
  30. </user-card>
  31. <block wx:if="{{ detailData.content && detailData.content.length}}">
  32. <!-- bind:parse="htmlParser" bind:load="htmlParserLoad" -->
  33. <parser class="parser" html="{{ detailData.content }}">
  34. </parser>
  35. </block>
  36. </block>
  37. <tags-card tag-list="{{detailData.tagList}}"></tags-card>
  38. </view>
  39. </view>
  40. <message-headline wx:if="{{detailData}}" id="messageID" num="{{totalCount}}">
  41. </message-headline>
  42. <block wx:if="{{commentList.length}}">
  43. <comment-cell bind:reply="tapReplyAction" bind:delete="tapDeleteAction" wx:for="{{commentList}}"
  44. showLine="{{index != commentList.length - 1}}" data="{{item}}" data-current-index="{{index}}" wx:key="index">
  45. </comment-cell>
  46. </block>
  47. <empty wx:if="{{isEmpty}}" tips="还没有任何人评论哦" is-fixed="{{false}}"></empty>
  48. <message-textarea wx:if="{{showInput}}" reply-name="{{replyName}}" is-author="{{isAuthor}}" autofocus="{{showInput}}"
  49. inputValue="{{inputValue}}" bindblur="onBlur" bind:send="sendCommentAction">
  50. </message-textarea>
  51. <bottom-tabs wx:if="{{!isFullScreen && detailData}}" sub-id="{{newId}}" like-num="{{likeNum}}"
  52. comment-num="{{ totalCount }}" is-like="{{detailData.isLike}}" is-author="{{detailData.isAuthor}}"
  53. bind:like="handleLikeAction" bind:reply="tapReplyAction" bind:message="tapMessageAction"
  54. bind:poster="handleGeneratePoster">
  55. </bottom-tabs>
  56. <cover-view wx:if="{{isShowPostMask}}" catchtouchmove="true" class='mask'>
  57. <cover-view class="mask-container">
  58. <cover-image class="post-img" bind:load="shareQRImgLoad" src='{{shareQRImgSrc}}'></cover-image>
  59. <cover-view wx:if="{{shareQRImgLoad}}" class="save-btn">已保存到相册,快去分享吧</cover-view>
  60. </cover-view>
  61. <cover-image class="pose-close-img" bindtap='postMaskHide' src="../../images/close.png"></cover-image>
  62. </cover-view>
  63. <poster wx:if="{{isShowQRPoster}}" obj="{{extendObj}}" barcodeImgUrl="{{postImgSrc}}"></poster>
  64. <view wx:if="{{isShowCanvas}}" class="canvas-conatiner">
  65. <painter palette="{{template}}" bind:imgOK="onImgOK" />
  66. </view>
  67. </view>