voteSuccess.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <template>
  2. <view>
  3. <u-mask :show="show" @click="show = false">
  4. <view class="u-flex" style="flex-direction: column; height: 100vh; justify-content: center; align-items: center;">
  5. <view class="auth-bg">
  6. <view class="auth-arc"></view>
  7. <image style="width: 70%; position: absolute; top: 64rpx;" src="../../static/poster/votesuccess.png" mode="widthFix"></image>
  8. <view class="avatar-vote flex justify-center align-center">
  9. <u-avatar size="159" :src="avatar"></u-avatar>
  10. </view>
  11. <view class="info-box">
  12. <view class="main-info">成功为该作品助力{{activeVote}}票</view>
  13. <view class="sub-info" style="padding: 0 20rpx;">
  14. 你已获得{{vuex_active_setting.voteAndPointRate * activeVote}}个平台积分,可用于"积分换礼"兑换礼品哦
  15. </view>
  16. <view class="flex justify-center" style="margin-top: 30rpx;">
  17. <u-button @click="show=false" shape="circle" :custom-style="customStyle">继续投票</u-button>
  18. <u-button shape="circle" :custom-style="customStyle" @click="support">花积分</u-button>
  19. </view>
  20. </view>
  21. </view>
  22. <view style="width: 65%; margin: 60rpx auto 0;" v-if="list.length > 0">
  23. <u-swiper :list="list" name="url" @click="click"></u-swiper>
  24. </view>
  25. </view>
  26. </u-mask>
  27. </view>
  28. </template>
  29. <script>
  30. export default {
  31. name:"voteSuccess",
  32. data() {
  33. return {
  34. show: false,
  35. activeVote: 1,
  36. avatar: 'https://thirdwx.qlogo.cn/mmopen/vi_32/9UQvP3rrVDeMwwjSaaeXIJ2NBdKAB1SpVP8ozRxWiaDDHGJFSp0iaibclAlBeSKGMSOEVvGTia404po8yQ4ibDutO3A/132',
  37. popupStyle: {
  38. 'u-mode-center-box': 'red'
  39. },
  40. customStyle: {
  41. color: 'white',
  42. background: "#E72226",
  43. width: '200rpx',
  44. margin: '10rpx',
  45. height:"60rpx",
  46. fontSize:"26rpx"
  47. },
  48. list: []
  49. };
  50. },
  51. created() {
  52. this.customStyle.background = this.vuex_theme.bgColor;
  53. },
  54. methods: {
  55. click(index){
  56. let url = this.list[index].path;
  57. if( !!url && (url.indexOf('http://') > -1 || url.indexOf('https://') > -1) ){
  58. window.location.href = url;
  59. }
  60. },
  61. toIndex(){
  62. uni.switchTab({
  63. url:"/pages/index/home"
  64. })
  65. },
  66. showSuccess(avatar,activeVote){
  67. this.avatar = avatar;
  68. this.activeVote = activeVote;
  69. this.show = true;
  70. },
  71. hide(){
  72. this.show = false;
  73. },
  74. support(){
  75. this.hide()
  76. this.$emit('support')
  77. }
  78. }
  79. }
  80. </script>
  81. <style lang="scss" scoped>
  82. .auth-bg{
  83. width: 65%;
  84. background: #fff;
  85. display: flex;
  86. flex-direction: column;
  87. justify-content: center;
  88. align-items: center;
  89. min-height: 620rpx;
  90. position: relative;
  91. overflow: hidden;
  92. border-radius: 20rpx;
  93. margin: 0 auto;
  94. .auth-arc{
  95. position: absolute;
  96. width: 140%;
  97. height: 220rpx;
  98. left: 50%;
  99. top: 0;
  100. transform: translateX(-50%);
  101. background: var(--bgColor);
  102. border-radius: 0 0 50% 50%;
  103. }
  104. }
  105. .auth-msg{
  106. padding: 40rpx 40rpx 20rpx 40rpx;
  107. display: flex;
  108. align-items: center;
  109. justify-content: left;
  110. }
  111. .avatar-vote{
  112. position: absolute;
  113. width: 200rpx;
  114. height: 200rpx;
  115. top: 100rpx;
  116. left: calc(50% - 100rpx);
  117. border: 2px dashed #E8E8E8;
  118. border-radius: 50%;
  119. }
  120. .info-box{
  121. position: absolute;
  122. width: 100%;
  123. height: auto;
  124. top: 360rpx;
  125. left: 0;
  126. .main-info{
  127. margin: 10rpx;
  128. font-size: 30rpx;
  129. color: #353535;
  130. font-weight: 800;
  131. text-align: center;
  132. }
  133. .sub-info{
  134. margin: 15rpx auto 40rpx auto;
  135. text-align: center;
  136. color: #AAAAAA;
  137. font-size: 24rpx;
  138. font-weight: 400;
  139. }
  140. }
  141. </style>