paySuccess.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <template>
  2. <view class="content">
  3. <view class="box">
  4. <image class="img" src="../../../static/image/success.png" mode="widthFix"></image>
  5. <text class="tit">支付成功</text>
  6. <view class="tip" >
  7. </view>
  8. <view class="btn-group flex">
  9. <navigator v-if="type==0" :url="'/pages/order/orderDetail?id='+orderId" open-type="redirect"
  10. class="mix-btn hollow">查看订单</navigator>
  11. <view v-if="type==1" class="mix-btn hollow" @click="navBack">返回</view>
  12. <navigator url="/pages/home/index" open-type="switchTab" class="mix-btn ">返回首页</navigator>
  13. </view>
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. export default {
  19. data() {
  20. return {
  21. orderId: '',
  22. type: 0 //0为订单1为充值
  23. }
  24. },
  25. onLoad(opt) {
  26. // 保存订单号
  27. if (opt.orderid) {
  28. this.orderId = opt.orderid;
  29. }
  30. // 分类
  31. if (opt.type) {
  32. this.type = opt.type;
  33. }
  34. },
  35. methods: {
  36. // 返回上一页
  37. navBack() {
  38. uni.navigateBack()
  39. }
  40. }
  41. }
  42. </script>
  43. <style lang='scss'>
  44. .content {
  45. padding-top: 30rpx;
  46. }
  47. .box {
  48. margin: 0 $page-row-spacing;
  49. display: flex;
  50. flex-direction: column;
  51. justify-content: center;
  52. align-items: center;
  53. background-color: #FFFFFF;
  54. border-radius: 20rpx;
  55. padding: 50rpx;
  56. padding-top: 80rpx;
  57. }
  58. .tip {
  59. color: $font-color-disabled;
  60. font-size: 24rpx;
  61. margin-top: 30rpx;
  62. padding-bottom: 30rpx;
  63. }
  64. .img {
  65. width: 200rpx;
  66. }
  67. .tit {
  68. font-size: 38rpx;
  69. font-weight: bold;
  70. color: #303133;
  71. margin-top: 30rpx;
  72. }
  73. .btn-group {
  74. padding-top: 100rpx;
  75. width: 100%;
  76. justify-content: space-around;
  77. padding: 0 10rpx;
  78. }
  79. .mix-btn {
  80. margin-top: 30upx;
  81. display: flex;
  82. align-items: center;
  83. font-size: $font-lg;
  84. color: #fff;
  85. background-color: $base-color;
  86. padding: 20rpx 50rpx;
  87. border-radius: 100rpx;
  88. line-height: 1;
  89. &.hollow {
  90. background: #fff;
  91. color: #303133;
  92. border: 1px solid #ccc;
  93. }
  94. }
  95. </style>