index.wxml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <wxs src="../../utils/filter.wxs" module="filters" />
  2. <view class="work">
  3. <view class="workHead">
  4. <view class="wH-left">
  5. <image src="{{videoInfoCopy.user.avatar}}" class="avatar" bindtap="jumpUserInfo" />
  6. <view class="wH-left-user">
  7. <view class="nickname textOver">{{videoInfoCopy.user.nickName||videoInfoCopy.user.eid}}</view>
  8. <view class="time">{{videoInfoCopy.userRead.day}}
  9. <image src="/static/play3.png" class="playNum" />
  10. {{filters.numFilter(videoInfo.userRead.playAmount)}}
  11. <image src="/static/pf.png" class="playNum" wx:if="{{videoInfo.userReadExtend.businessType!=2}}" />
  12. <text style="color:#00C657"
  13. wx:if="{{videoInfo.userReadExtend.businessType!=2}}">{{videoInfo.userRead.score>0?videoInfo.userRead.score:'0'}}分</text>
  14. </view>
  15. </view>
  16. </view>
  17. <!-- 用户本人作品的右侧 -->
  18. <view class="wH-right" wx:if="{{videoType=='my'}}">
  19. <view class="wH-right-btn" bindtap="download" wx:if="{{videoInfoCopy.userRead.status!='CHECK'}}">
  20. <image class="img" src="/static/down.png" mode="" />
  21. <view class="text">下载</view>
  22. </view>
  23. <view class="wH-right-btn" bindtap="delete">
  24. <image class=" img" style="width:24rpx" src="/static/delete.png" mode="" />
  25. <view class="text">删除</view>
  26. </view>
  27. <view class="wH-right-btn" bindtap="setVideoPublic" wx:if="{{videoInfoCopy.userRead.status!='CHECK'}}">
  28. <image class="img" style="width:30rpx"
  29. src="{{videoInfoCopy.userRead.status==='NORMAL'? '/static/unlock.png': '/static/lock.png'}}" />
  30. <view class="text">
  31. {{videoInfoCopy.userRead.status==='NORMAL'? '公开': '私密'}}
  32. </view>
  33. </view>
  34. </view>
  35. <view class="wH-right" wx:elif="{{videoType=='public'&&!selfWork}}">
  36. <view class="follow {{videoInfoCopy.isFans?'isFans':''}}" bindtap="setFans">
  37. <image src="{{videoInfoCopy.isFans?'/static/follow_2.png':'/static/follow_3.png'}}" class="character"
  38. mode="" />
  39. <text class="text">{{videoInfoCopy.isFans?'已关注':'关注'}}</text>
  40. </view>
  41. </view>
  42. <view class="wH-right" wx:elif="{{videoType=='pk'&&isOfficial||videoType=='follow'&&isOfficial}}">
  43. <view class="pkNum" wx:if="{{videoInfo.userReadExtend.businessType!=2}}">
  44. {{videoInfoCopy.userRead.score>=0?videoInfoCopy.userRead.score+'分':''}}
  45. </view>
  46. </view>
  47. </view>
  48. <!-- 视频 -->
  49. <view class="workContent" wx:if="{{!videoInfoCopy.userReadExtend||videoInfoCopy.userReadExtend.resourcesType==0}}">
  50. <!-- 审核中遮罩 -->
  51. <view class="videoBox" wx:if="{{videoInfoCopy.userRead.status=='CHECK'&&videoInfoCopy.userRead.id!=currentId}}">
  52. <view class="maskBg"></view>
  53. <image class="maskImg" src="/static/checking.png" />
  54. <image class="cover" src="{{videoInfoCopy.userRead.coverImg}}" />
  55. </view>
  56. <!--未播放-->
  57. <view class="videoBox" wx:if="{{videoInfoCopy.userRead.status!='CHECK'&&videoInfoCopy.userRead.id!=currentId}}"
  58. bindtap="playVideo">
  59. <image class="play" src="/static/play-btn.png" />
  60. <image class="cover" src="{{videoInfoCopy.userRead.coverImg}}" />
  61. </view>
  62. <!-- 视频水印 -->
  63. <image src="{{videoInfoCopy.readMaskTemplate.imgPath}}" class="watermark"
  64. style="pointer-events:{{videoInfoCopy.userRead.status!='CHECK'&&videoInfoCopy.userRead.id!=currentId?'auto':'none'}}"
  65. bindtap="playVideo" wx:if="{{videoInfoCopy.userRead.status!='CHECK'}}" />
  66. <!-- 播放时渲染的video -->
  67. <video class="video" id="myVideo" wx:if="{{videoInfoCopy.userRead.id==currentId}}"
  68. src="{{workType=='videoPath'? videoInfoCopy.userRead.videoPath:videoInfoCopy.example.videoPath}}"
  69. autoplay="true" object-fit="contain">
  70. </video>
  71. </view>
  72. <!-- 音频 -->
  73. <view class="workContent" wx:else>
  74. <view class="audioBox" bindtap="audioPlay">
  75. <image src="{{videoInfoCopy.userReadExtend.backgroundVirtualImg}}" class="audioBg" mode="aspectFill" />
  76. <view class="titleBox">
  77. <view class="textOver" wx:for="{{videoInfoCopy.userRead.title}}" wx:key="index">
  78. {{item}}
  79. </view>
  80. </view>
  81. <view class="audioPlay">
  82. <image src="/static/audioBg.png"
  83. class="audioPlayBg {{videoInfoCopy.userRead.id==currentId?'circle':''}}" />
  84. <image src="/static/zhen.png" class="audioPlayZhen" />
  85. <image src="{{videoInfoCopy.userRead.coverImg}}"
  86. class="cover {{videoInfoCopy.userRead.id==currentId?'circle':''}}" />
  87. </view>
  88. <view class="progressBar">
  89. <image src="{{videoInfoCopy.userRead.id==currentId?'/static/aStop.png':'/static/aPlay.png'}}"
  90. class="audioSwitch" />
  91. <view class="time">{{currentId == videoInfoCopy.userRead.id?currentTime:'00:00'}}</view>
  92. <slider class="slider" value="{{currentId == videoInfoCopy.userRead.id?sliderValue:0}}" catchtap="false"
  93. disabled="{{currentId != videoInfoCopy.userRead.id}}" catchchange="slider" block-size='12'
  94. backgroundColor='#ffffff50' selected-color="#ffffff" />
  95. <view class="time">{{endTime}}</view>
  96. </view>
  97. </view>
  98. </view>
  99. <view class="workFooter" wx:if="{{videoInfoCopy.userRead.status!='CHECK'}}">
  100. <button class="resetBtn mangeL-box" open-type="share" data-info='{{videoInfo}}' bindtap="shareVideo"
  101. wx:if="{{shareBtn}}">
  102. <image src="/static/share.png" mode="" class="icon" />
  103. <view class="icon-name">分享</view>
  104. </button>
  105. <view class="resetBtn mangeL-box" wx:else>
  106. <image src="/static/share.png" mode="" class="icon" />
  107. <view class="icon-name">分享</view>
  108. </view>
  109. <view class="mangeL-box" bindtap="collect">
  110. <image src="{{videoInfoCopy.isFavorites ? '/static/star_colored.png' : '/static/star.png'}}" mode=""
  111. class="icon" />
  112. <view class="icon-name">{{videoInfoCopy.isFavorites?'已收藏':'收藏'}}</view>
  113. </view>
  114. <view class="mangeL-box" bindtap="openComment">
  115. <view class="noticeTips" wx:if="{{videoType=='my'&&videoInfoCopy.unReadPostsCount>0}}">
  116. +{{videoInfoCopy.unReadPostsCount}}</view>
  117. <image src="/static/comment.png" mode="" class="icon" />
  118. <view class="icon-name">{{filters.numFilter(videoInfoCopy.userRead.commentAmount)}}</view>
  119. </view>
  120. <view class="mangeL-box" bindtap="likeVideo">
  121. <image src="{{videoInfoCopy.isLike ? '/static/heart_colored.png' : '/static/heart.png'}}" mode=""
  122. class="icon" />
  123. <view class="icon-name">{{filters.numFilter(videoInfoCopy.userRead.likeAmount)}}</view>
  124. </view>
  125. </view>
  126. <view class="pkPageBtns" style="justify-content:{{videoType!='pk'?'center':'space-between'}}"
  127. wx:if="{{videoType!='my'&&!selfWork}}">
  128. <view class="toReading" style="background-color: #00C657;" bindtap="changeRead"
  129. wx:if="{{videoInfoCopy.userRead.type=='READ'&&videoType=='pk'}}">
  130. <image src="/static/aPlay.png" class="reading" />
  131. <view class="reading-text">{{workType=='videoPath'?'示范朗读':'TA的朗读'}}</view>
  132. </view>
  133. <view class="toReading {{videoType=='pk'?'pkToReading':''}}" bindtap="toPkPage">
  134. <image src="/static/reading.png" class="reading" />
  135. <view class="reading-text" wx:if="{{videoInfoCopy.userRead.type=='READ'}}">{{videoType!='pk'?'挑战PK':'开始挑战'}}
  136. </view>
  137. <view class="reading-text" wx:if="{{!isOfficial}}">去朗读</view>
  138. </view>
  139. </view>
  140. </view>