result.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <template>
  2. <view class="container">
  3. <view class="success">
  4. <i></i>
  5. <p><view>使用成功!</view></p>
  6. <view class="mark">核销1张端午节优惠券</view>
  7. <view class="price"><b>¥</b>100</view>
  8. <view class="mark">流水号:29283723200</view>
  9. </view>
  10. <view v-if="false" class="attention">
  11. <i></i>
  12. <p><view>使用失败!</view></p>
  13. <view class="mark">不对</view>
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. import * as UserApi from '@/api/user'
  19. import store from '@/store'
  20. export default {
  21. data() {
  22. return {
  23. //当前页面参数
  24. options: {},
  25. // 正在加载
  26. isLoading: true,
  27. userInfo: {},
  28. }
  29. },
  30. /**
  31. * 生命周期函数--监听页面加载
  32. */
  33. onLoad(options) {
  34. // 当前页面参数
  35. this.options = options
  36. this.getUserInfo()
  37. },
  38. methods: {
  39. /**
  40. * 用户信息
  41. * */
  42. getUserInfo() {
  43. const app = this
  44. app.isLoading = true
  45. UserApi.info()
  46. .then(result => {
  47. app.userInfo = result.data.userInfo
  48. app.isLoading = false
  49. })
  50. },
  51. /**
  52. * 退出
  53. */
  54. logout() {
  55. store.dispatch('Logout')
  56. this.$navTo('pages/user/index')
  57. }
  58. }
  59. }
  60. </script>
  61. <style lang="scss" scoped>
  62. .success{
  63. width: 100%;
  64. text-align: center;
  65. margin-top: 200rpx;
  66. i{
  67. display: block;
  68. width: 174rpx;
  69. height: 174rpx;
  70. margin: 0 auto;
  71. background-size: contain;
  72. }
  73. }
  74. .attention{
  75. width: 100%;
  76. text-align: center;
  77. margin-top: 14rpx;
  78. i{
  79. display: block;
  80. width: 174rpx;
  81. height: 174rpx;
  82. margin: 0 auto;
  83. background-size: contain;
  84. }
  85. }
  86. // 底部操作栏
  87. .footer-fixed {
  88. height: 180rpx;
  89. z-index: 11;
  90. box-shadow: 0 -4rpx 40rpx 0 rgba(144, 52, 52, 0.1);
  91. padding-bottom: 40rpx;
  92. .btn-wrapper {
  93. height: 100%;
  94. display: flex;
  95. align-items: center;
  96. padding: 0 20rpx;
  97. }
  98. .btn-item {
  99. flex: 1;
  100. font-size: 28rpx;
  101. height: 80rpx;
  102. line-height: 80rpx;
  103. text-align: center;
  104. color: #fff;
  105. border-radius: 40rpx;
  106. }
  107. .btn-item-main {
  108. background: linear-gradient(to right, #f9211c, #ff6335);
  109. }
  110. }
  111. </style>