voteSuccess.vue 3.0 KB

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