voteSuccess.vue 2.5 KB

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