voteSuccess.vue 2.4 KB

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