activityDetail.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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="login" shape="circle" :custom-style="customStyle">给ta投票</u-button>
  30. </view>
  31. <login ref="login" @signIn="signIn" @phoneSuccess="showVote"></login>
  32. <vote-popup ref="votePopup"></vote-popup>
  33. </view>
  34. </template>
  35. <script>
  36. import votePopup from '../../components/alert/votePopup.vue'
  37. export default {
  38. components:{ votePopup },
  39. onLoad(props) {
  40. const { id } = props;
  41. this.$api.activity.getWorksDetail(id).then(res=> {
  42. this.activity = res.data.data;
  43. console.log(this.activity);
  44. })
  45. },
  46. computed:{
  47. content(){
  48. return decodeURIComponent(this.activity.content)
  49. }
  50. },
  51. data() {
  52. return {
  53. activity: {},
  54. customStyle: {
  55. color: 'white',
  56. background: "#E72226",
  57. fontSize: '32rpx',
  58. width: '500rpx',
  59. margin: '25rpx auto'
  60. }
  61. }
  62. },
  63. methods: {
  64. async showVote(){
  65. this.$refs.votePopup.showVote();
  66. },
  67. init(){
  68. if (this.vuex_phone) {
  69. this.showVote()
  70. }
  71. }
  72. }
  73. }
  74. </script>
  75. <style lang="scss" scoped>
  76. .works-video{
  77. width: 100%;
  78. height: 422rpx;
  79. }
  80. .title{
  81. padding: 20rpx;
  82. .work-no{
  83. padding: 5rpx 10rpx 5rpx 10rpx;
  84. border-radius: 7rpx;
  85. }
  86. .work-title{
  87. padding: 0 0 0 20rpx ;
  88. color: #353535;
  89. font-size: 32rpx;
  90. font-weight: 800;
  91. }
  92. }
  93. .work-info-box{
  94. padding: 30rpx 0 15rpx 10rpx;
  95. .remen-icon{
  96. width: 30rpx;
  97. height: 30rpx;
  98. }
  99. .vote-count{
  100. padding: 0 40rpx 0 20rpx;
  101. font-size: 40rpx;
  102. color: #353535;
  103. font-weight: 800;
  104. }
  105. .work-rank{
  106. color: #353535;
  107. background: #FDEBEC;
  108. border-radius: 21px 21px 21px 21px;
  109. font-size: 22rpx;
  110. padding: 8rpx 15rpx 8rpx 15rpx;
  111. }
  112. }
  113. .footer-bar{
  114. position: absolute;
  115. bottom: 0;
  116. left: 0;
  117. width: 100%;
  118. height: 170rpx;
  119. background-color: white;
  120. }
  121. </style>