activityDetail.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <template>
  2. <view>
  3. <video class="works-video" :src="activity.videoUrl"></video>
  4. <view style="padding: 20rpx 30rpx 50rpx 30rpx;background: white;">
  5. <view class="title" style="border-bottom: 1rpx solid #EEEEEE ;">
  6. <span class="bg-red work-no"> {{activity.productNo}}号</span>
  7. <span class="work-title">{{activity.title}}</span>
  8. <view class="work-info-box">
  9. <image class="remen-icon" src="../../static/icon/remen.png"></image>
  10. <span class="vote-count">{{activity.voteCount}}</span>
  11. <span class="work-rank">排行榜第{{activity.rank}}名</span>
  12. </view>
  13. </view>
  14. <view style="font-size: 24rpx;color: #888888;padding: 30rpx 10rpx 20rpx 10rpx;">
  15. <u-parse :html="content"></u-parse>
  16. </view>
  17. </view>
  18. <view class="bg-white padding-30 margin-top-30 flex">
  19. <view class="basis-xs">
  20. <image style="width: 84rpx;height: 84rpx;" src="../../static/icon/ic_zhuanfa.png"></image>
  21. </view>
  22. <view class="basis-lg flex flex-direction">
  23. <view style="font-size: 28rpx;color: #353535;">转发邀请投票</view>
  24. <view style="font-size: 22rpx;color: #AEACAF;padding-top: 10rpx;">成功邀请一位好友投票,获得{{vuex_active_setting.voteAndHeatRate}}热力值</view>
  25. </view>
  26. <view class="flex justify-center align-center" style="color: #666666;flex-basis: 20%;">去邀请 ></view>
  27. </view>
  28. <view class="footer-bar">
  29. <u-button @click="showVote()" shape="circle" :custom-style="customStyle">给ta投票</u-button>
  30. </view>
  31. <vote-popup ref="votePopup"></vote-popup>
  32. </view>
  33. </template>
  34. <script>
  35. import votePopup from '../../components/alert/votePopup.vue'
  36. export default {
  37. components:{ votePopup },
  38. onLoad(props) {
  39. const { id } = props;
  40. this.$api.activity.getWorksDetail(id).then(res=> {
  41. this.activity = res.data.data;
  42. console.log(this.activity);
  43. })
  44. },
  45. computed:{
  46. content(){
  47. return decodeURIComponent(this.activity.content)
  48. }
  49. },
  50. data() {
  51. return {
  52. activity: {},
  53. customStyle: {
  54. color: 'white',
  55. background: "#E72226",
  56. fontSize: '32rpx',
  57. width: '500rpx',
  58. margin: '25rpx auto'
  59. }
  60. }
  61. },
  62. methods: {
  63. async showVote(){
  64. this.$refs.votePopup.showVote();
  65. }
  66. }
  67. }
  68. </script>
  69. <style lang="scss" scoped>
  70. .works-video{
  71. width: 100%;
  72. height: 422rpx;
  73. }
  74. .title{
  75. padding: 20rpx;
  76. .work-no{
  77. padding: 5rpx 10rpx 5rpx 10rpx;
  78. border-radius: 7rpx;
  79. }
  80. .work-title{
  81. padding: 0 0 0 20rpx ;
  82. color: #353535;
  83. font-size: 32rpx;
  84. font-weight: 800;
  85. }
  86. }
  87. .work-info-box{
  88. padding: 30rpx 0 15rpx 10rpx;
  89. .remen-icon{
  90. width: 30rpx;
  91. height: 30rpx;
  92. }
  93. .vote-count{
  94. padding: 0 40rpx 0 20rpx;
  95. font-size: 40rpx;
  96. color: #353535;
  97. font-weight: 800;
  98. }
  99. .work-rank{
  100. color: #353535;
  101. background: #FDEBEC;
  102. border-radius: 21px 21px 21px 21px;
  103. font-size: 22rpx;
  104. padding: 8rpx 15rpx 8rpx 15rpx;
  105. }
  106. }
  107. .footer-bar{
  108. position: absolute;
  109. bottom: 0;
  110. left: 0;
  111. width: 100%;
  112. height: 170rpx;
  113. background-color: white;
  114. }
  115. </style>