success.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <template>
  2. <view class="container">
  3. <view class="re-succ-box">
  4. <image class="re-succ-img" src="../../static/img/success.png"></image>
  5. <view class="re-succ-tit">{{type ==2? '挂售成功' : '提交成功'}}</view>
  6. <view class="btn-box flex">
  7. <view class="re-succ-btn" @click="goBack()">返回首页</view>
  8. <view class="go-btn " @click="go()">{{ type == 2? '返回挂售' : '返回支付'}}</view>
  9. </view>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. export default {
  15. data() {
  16. return{
  17. type:1,
  18. }
  19. },
  20. onLoad(option) {
  21. if(option.type) {
  22. this.type = option.type
  23. }
  24. },
  25. methods: {
  26. goBack() {
  27. uni.switchTab({
  28. url: '/pages/index/index'
  29. })
  30. },
  31. go() {
  32. let url
  33. if(this.type == 1){
  34. url = '/pages/order/order?state=1'
  35. uni.navigateTo({
  36. url: url
  37. })
  38. }else if(this.type == 2) {
  39. url = '/pages/order/order?state=3'
  40. uni.switchTab({
  41. url
  42. })
  43. }
  44. }
  45. }
  46. }
  47. </script>
  48. <style lang="scss">
  49. page {
  50. height: 100%;
  51. }
  52. .container {
  53. height: 100%;
  54. background: #FFFFFF;
  55. .line-top {
  56. width: 750rpx;
  57. height: 20rpx;
  58. background: #F5F5F5;
  59. }
  60. .re-succ-box {
  61. padding-top: 170rpx;
  62. display: flex;
  63. flex-direction: column;
  64. align-items: center;
  65. .re-succ-img {
  66. margin-left: -30rpx;
  67. width: 362rpx;
  68. height: 267rpx;
  69. display: block;
  70. }
  71. .re-succ-tit {
  72. margin-top: -26rpx;
  73. font-size: 40rpx;
  74. font-family: PingFang SC;
  75. font-weight: 500;
  76. color: #333333;
  77. }
  78. .btn-box{
  79. width: 750rpx;
  80. margin-top: 80rpx;
  81. padding: 0 50rpx;
  82. }
  83. .re-succ-btn {
  84. width: 300rpx;
  85. height: 80rpx;
  86. background: linear-gradient(180deg, #FD4646, #FF3535);
  87. border-radius: 40rpx;
  88. font-size: 36rpx;
  89. font-family: PingFang SC;
  90. font-weight: bold;
  91. color: #FFFFFF;
  92. display: flex;
  93. align-items: center;
  94. justify-content: center;
  95. }
  96. .go-btn {
  97. width: 300rpx;
  98. height: 80rpx;
  99. border: 1px solid #FD4646;
  100. border-radius: 40rpx;
  101. font-size: 36rpx;
  102. font-family: PingFang SC;
  103. font-weight: bold;
  104. color: #FD4646;
  105. display: flex;
  106. align-items: center;
  107. justify-content: center;
  108. }
  109. }
  110. }
  111. </style>