pay-success.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <template>
  2. <view class="pay-success">
  3. <view class="success-icon">
  4. <image src="../static/pay-success.png" mode="aspectFit"></image>
  5. </view>
  6. <view class="success-title">支付成功</view>
  7. <view class="success-desc">您的书籍将邮寄,请耐心等待</view>
  8. <view class="action-buttons">
  9. <button class="btn-return" @click="handleReturn">返回首页</button>
  10. <button class="btn-view" @click="handleViewOrder">查看订单</button>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. export default {
  16. data() {
  17. return {
  18. orderId:''
  19. }
  20. },
  21. onLoad(options){
  22. this.orderId = options.orderId
  23. },
  24. methods: {
  25. handleReturn() {
  26. uni.switchTab({
  27. url: '/pages/home/index'
  28. })
  29. },
  30. handleViewOrder() {
  31. uni.navigateTo({
  32. url: '/pages-mine/pages/return-detail?orderId=' + this.orderId
  33. })
  34. }
  35. }
  36. }
  37. </script>
  38. <style lang="scss" scoped>
  39. .pay-success {
  40. min-height: 100vh;
  41. background: #fff;
  42. display: flex;
  43. flex-direction: column;
  44. align-items: center;
  45. padding-top: 120rpx;
  46. .success-icon {
  47. width: 160rpx;
  48. height: 160rpx;
  49. margin-bottom: 40rpx;
  50. image {
  51. width: 100%;
  52. height: 100%;
  53. }
  54. }
  55. .success-title {
  56. font-size: 36rpx;
  57. font-weight: 500;
  58. color: #333;
  59. margin-bottom: 20rpx;
  60. }
  61. .success-desc {
  62. font-size: 28rpx;
  63. color: #999;
  64. margin-bottom: 80rpx;
  65. }
  66. .action-buttons {
  67. display: flex;
  68. gap: 30rpx;
  69. padding: 0 40rpx;
  70. width: 100%;
  71. box-sizing: border-box;
  72. button {
  73. flex: 1;
  74. height: 88rpx;
  75. border-radius: 10rpx;
  76. font-size: 32rpx;
  77. display: flex;
  78. align-items: center;
  79. justify-content: center;
  80. &.btn-return {
  81. background: #f5f5f5;
  82. color: #666;
  83. }
  84. &.btn-view {
  85. background: #07c160;
  86. color: #fff;
  87. }
  88. }
  89. }
  90. }
  91. </style>