detail.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <template>
  2. <view class="infoDetail">
  3. <!-- <video :src="videoUrl" class="myVideo" controls='true'
  4. :vslide-gesture-in-fullscreen='true' show-fullscreen-btn='true' direction="-90">
  5. </video> -->
  6. <view class="infoTitle">专家:就地过年要将科学,低风险地区没必要倡导低风险地区没必要倡导</view>
  7. <view class="timeBox">
  8. <text class="time">
  9. 3分钟前
  10. </text>
  11. <text class="playCount">
  12. 1万次播放量
  13. </text>
  14. </view>
  15. <!-- 底部评论、收藏量、转发-->
  16. <view class="bottom">
  17. <!-- 收藏、评论量 -->
  18. <view class="count">
  19. <view class="collect">
  20. <i class="custom-icon custom-icon-collected"></i>
  21. 2145
  22. </view>
  23. <view class="comment" @click="handleComment">
  24. <i class="custom-icon custom-icon-comment"></i>
  25. 543
  26. </view>
  27. </view>
  28. <!-- 转发 -->
  29. <u-button type="primary" color="linear-gradient(to top, #f8551d, #f69e36)" @click="handleShare"><i
  30. class="custom-icon custom-icon-share"></i></u-button>
  31. </view>
  32. <!-- 分享弹出组件 -->
  33. <Share :show="shareShow" @close="closeShare" />
  34. <!-- 评论弹出组件 -->
  35. <Comment :show="commentShow" @close="closeComment" />
  36. </view>
  37. </template>
  38. <script>
  39. import Share from '@/components/Share/index.vue'
  40. import Comment from '@/components/Comment/index.vue'
  41. export default {
  42. components: {
  43. Share,
  44. Comment
  45. },
  46. data() {
  47. return {
  48. shareShow: false,
  49. commentShow: false,
  50. videoUrl:"../../static/bg2.mp4"
  51. };
  52. },
  53. methods: {
  54. // 点击弹出分享框
  55. handleShare() {
  56. this.shareShow = true
  57. },
  58. // 关闭分享弹出窗
  59. closeShare() {
  60. this.shareShow = false
  61. },
  62. // 点击弹出评论列表
  63. handleComment() {
  64. this.commentShow = true
  65. },
  66. // 关闭分享弹出窗
  67. closeComment() {
  68. this.commentShow = false
  69. },
  70. }
  71. }
  72. </script>
  73. <style lang="scss" scoped>
  74. page{
  75. height: 100%;
  76. }
  77. .infoDetail {
  78. height:100%;
  79. padding: 40rpx;
  80. background-color: #f9f9f9;
  81. .custom-icon-collected,
  82. .custom-icon-comment {
  83. &::before {
  84. background: -webkit-linear-gradient(left, #f84a1a, #ffa53e);
  85. -webkit-background-clip: text;
  86. -webkit-text-fill-color: transparent;
  87. font-weight: bold;
  88. }
  89. }
  90. .myVideo{
  91. width:100%;
  92. border-radius: 20rpx;
  93. }
  94. .infoTitle {
  95. font-size: 32rpx;
  96. font-weight: 600;
  97. margin-top:30rpx;
  98. }
  99. .timeBox {
  100. color: #aaa;
  101. margin: 40rpx 0;
  102. font-size: 24rpx;
  103. .time{
  104. margin-right: 20rpx;
  105. }
  106. }
  107. .bottom {
  108. display: flex;
  109. align-items: center;
  110. justify-content: space-between;
  111. width: 100%;
  112. height: 90rpx;
  113. .count {
  114. width: 36%;
  115. height: 100%;
  116. background-color: #fff;
  117. display: flex;
  118. justify-content: space-between;
  119. align-items: center;
  120. border-radius: 10rpx;
  121. padding: 0 30rpx;
  122. font-size: 20rpx;
  123. .custom-icon {
  124. margin-right: 10rpx;
  125. }
  126. .collect,
  127. .comment {
  128. display: flex;
  129. align-items: center;
  130. }
  131. }
  132. .u-button {
  133. width: 12%;
  134. height: 100%;
  135. margin: 0;
  136. .custom-icon-share {
  137. font-size: 20rpx;
  138. }
  139. }
  140. }
  141. }
  142. </style>