paySuccess.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <template>
  2. <view :class="['qn-page-' + theme]" class="content">
  3. <text class="success-icon ibonfont ibonxuanze_xuanzhong"></text>
  4. <text class="tit">支付成功</text>
  5. <view class="btn-group">
  6. <navigator url="/pagesT/order/order?state=0" open-type="redirect" class="mix-btn primary-btn">查看订单</navigator>
  7. <navigator url="/pages/index/index" open-type="switchTab" class="mix-btn hollow">返回首页</navigator>
  8. </view>
  9. <view class="coupon-view" v-if="get_coupon">
  10. <image class="coupon-bg" src="https://onlineimg.qianniao.vip/getcoupon-bg.png" mode="aspectFit"></image>
  11. <text class="close-icon ibonfont ibonguanbi1"></text>
  12. <view class="coupon-btn" @click="goPage('/pagesT/user/DiscountCoupon', 'redirectTo')">立即查看</view>
  13. </view>
  14. </view>
  15. </template>
  16. <script>
  17. export default {
  18. data() {
  19. return {
  20. get_coupon: false,
  21. price: 0
  22. };
  23. },
  24. onLoad(options) {
  25. this.price=options.price
  26. console.log(this.price)
  27. // this.price = 10;
  28. this.getData();
  29. },
  30. methods: {
  31. getData() {
  32. this.$u.api.couponList({
  33. grantType: '40',
  34. payAmount: this.price
  35. }).then(data=>{
  36. if (data.data && data.data.length) {
  37. this.get_coupon = true;
  38. }
  39. });
  40. }
  41. }
  42. };
  43. </script>
  44. <style lang="scss">
  45. .content {
  46. display: flex;
  47. flex-direction: column;
  48. justify-content: center;
  49. align-items: center;
  50. }
  51. .success-icon {
  52. font-size: 160upx;
  53. color: #ff4724;
  54. margin-top: 100upx;
  55. }
  56. .tit {
  57. font-size: 38upx;
  58. color: #303133;
  59. }
  60. .btn-group {
  61. padding-top: 100upx;
  62. }
  63. .mix-btn {
  64. margin-top: 30upx;
  65. display: flex;
  66. align-items: center;
  67. justify-content: center;
  68. width: 600upx;
  69. height: 80upx;
  70. font-size: $font-lg;
  71. color: #fff;
  72. background-color: $base-color;
  73. border-radius: 10upx;
  74. &.hollow {
  75. background: #fff;
  76. color: #303133;
  77. border: 1px solid #ccc;
  78. }
  79. }
  80. .coupon-view {
  81. position: fixed;
  82. top: 40%;
  83. left: 50%;
  84. width: 400upx;
  85. height: 452upx;
  86. transform: translate(-50%, -50%);
  87. .coupon-bg {
  88. width: 400upx;
  89. height: 452upx;
  90. }
  91. .coupon-btn {
  92. position: absolute;
  93. bottom: 12upx;
  94. left: 50%;
  95. width: 240upx;
  96. transform: translateX(-50%);
  97. height: 60upx;
  98. font-size: 26upx;
  99. color: #fff;
  100. background: linear-gradient(#ff7f00, #ff6500);
  101. border-radius: 60upx;
  102. text-align: center;
  103. line-height: 60upx;
  104. }
  105. .close-icon {
  106. position: absolute;
  107. top: 0upx;
  108. right: 0;
  109. font-size: 32rpx;
  110. display: block;
  111. width: 32rpx;
  112. height: 32rpx;
  113. color: #999999;
  114. }
  115. }
  116. </style>