success.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <template>
  2. <view class="">
  3. <view class="content">
  4. <view class="content-top">恭喜您!兑换成功!</view>
  5. <image src="../../static/gift/success.png" mode="widthFix" style="width: 310rpx;212rpx"></image>
  6. <text style="font-size: 28rpx;color: #999;margin-top: 54rpx">感觉你对大卫博士的支持,欢迎你继续兑换</text>
  7. <view class="content-middle">
  8. 消耗金额:<text style="color: #EA4A41;margin-left: 20rpx;">{{totalPrice}}奖学金</text>
  9. </view>
  10. <view class="content-bottom">
  11. <view class="goon" @click="goon">
  12. 继续兑换
  13. </view>
  14. <view class="check" @click="check">
  15. 查看兑换记录
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. data() {
  24. return {
  25. totalPrice: ''
  26. }
  27. },
  28. computed: {
  29. userServerInfo() {
  30. //用户服务器信息
  31. return this.$store.state.userServerInfo;
  32. },
  33. },
  34. onLoad: function (option) { //option为object类型,会序列化上个页面传递的参数
  35. this.totalPrice = option.totalPrice
  36. },
  37. methods: {
  38. //继续兑换
  39. goon(){
  40. uni.reLaunch({
  41. url: '../exchange/exchange'
  42. })
  43. },
  44. //兑换记录
  45. check(){
  46. if (this.userServerInfo.type === 1) {
  47. uni.navigateTo({ url: '../exchangerecord/exchangerecord' })
  48. } else if (this.userServerInfo.type === 2) {
  49. uni.navigateTo({ url: '../mygift/mygift' })
  50. } else {
  51. uni.showModal({
  52. content: '无兑换记录',
  53. showCancel: false
  54. })
  55. }
  56. }
  57. }
  58. }
  59. </script>
  60. <style lang="scss">
  61. // page{
  62. // background-color: #fff;
  63. // }
  64. .content {
  65. display: flex;
  66. flex-direction: column;
  67. align-items: center;
  68. justify-content: center;
  69. &-top{
  70. margin-top: 150rpx;
  71. color: #333;
  72. font-weight: bold;
  73. font-size: 36rpx;
  74. }
  75. image{
  76. margin-top: 30rpx;
  77. }
  78. &-middle{
  79. margin-top: 54rpx;
  80. font-size: 36rpx;
  81. color: #333;
  82. font-weight: bold;
  83. }
  84. &-bottom{
  85. display: flex;
  86. margin-top: 72rpx;
  87. .goon{
  88. width: 300rpx;
  89. line-height: 88rpx;
  90. color: #FB231F;
  91. border-radius: 44rpx;
  92. border: 2rpx #FB231F solid;
  93. background-color: #FFF4F3;
  94. text-align: center;
  95. }
  96. .check{
  97. width: 300rpx;
  98. color: #fff;
  99. line-height: 88rpx;
  100. margin-left: 40rpx;
  101. border-radius: 44rpx;
  102. background: linear-gradient(93deg, #F97C55 0%, #F44545 100%);
  103. text-align: center;
  104. }
  105. }
  106. }
  107. </style>