paySuccess.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <view class="content">
  3. <text class="success-icon iconfont iconroundcheck"></text>
  4. <text class="tit">{{ type == 1 ? '抢购成功' : '支付成功' }}</text>
  5. <view class="btn-group">
  6. <navigator v-if="type == '1'" :url="'/pages/order/order'" open-type="redirect" class="mix-btn">查看订单</navigator>
  7. <navigator v-else :url="'/pages/order/orderDetail?id=' + orderId" open-type="redirect" class="mix-btn">查看订单</navigator>
  8. <navigator v-if="type == '1'" :url="'/pages/hall/hallinfo?id=' + id + '&name=' + name + '&peoplename=' + peoplename" open-type="redirect" class="mix-btn hollow">
  9. 返回抢货列表
  10. </navigator>
  11. <navigator v-else url="/pages/index/index" open-type="switchTab" class="mix-btn hollow">返回首页</navigator>
  12. </view>
  13. </view>
  14. </template>
  15. <script>
  16. export default {
  17. data() {
  18. return {
  19. orderId: '',
  20. type: '',
  21. id: '',
  22. name: '',
  23. peoplename: ''
  24. };
  25. },
  26. onLoad(opt) {
  27. if (opt.type) {
  28. this.type = opt.type;
  29. }
  30. if (opt.uid) {
  31. this.id = opt.uid;
  32. }
  33. if (opt.name) {
  34. this.name = opt.name;
  35. }
  36. if (opt.peoplename) {
  37. this.peoplename = opt.peoplename;
  38. }
  39. // 保存订单号
  40. this.orderId = opt.orderid;
  41. },
  42. methods: {}
  43. };
  44. </script>
  45. <style lang="scss">
  46. .content {
  47. display: flex;
  48. flex-direction: column;
  49. justify-content: center;
  50. align-items: center;
  51. }
  52. .success-icon {
  53. font-size: 160upx;
  54. color: #d13737;
  55. margin-top: 100upx;
  56. }
  57. .tit {
  58. font-size: 38upx;
  59. color: #303133;
  60. }
  61. .btn-group {
  62. padding-top: 100upx;
  63. }
  64. .mix-btn {
  65. margin-top: 30upx;
  66. display: flex;
  67. align-items: center;
  68. justify-content: center;
  69. width: 600upx;
  70. height: 80upx;
  71. font-size: $font-lg;
  72. color: #fff;
  73. background-color: $base-color;
  74. border-radius: 10upx;
  75. &.hollow {
  76. background: #fff;
  77. color: #303133;
  78. border: 1px solid #ccc;
  79. }
  80. }
  81. </style>