paySuccess.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <template>
  2. <view class="content">
  3. <image class="success-icon" src="../../static/img/paySuccess.png" mode=""></image>
  4. <text class="tit" v-if="type == 1">订单支付成功</text>
  5. <text class="tit" v-else>订单预约成功</text>
  6. <view class="btn-group">
  7. <navigator url="/pages/user/fulilist" open-type="redirect" class="mix-btn" v-if="type == 1">继续兑换</navigator>
  8. <navigator url="/pages/assets/myPing" open-type="redirect" class="mix-btn" v-else>我的拼购</navigator>
  9. <navigator url="/pages/index/index" open-type="switchTab" class="mix-btn hollow">返回首页</navigator>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. export default {
  15. data() {
  16. return {
  17. type: 2//1为兑换支付成功2为预购成功
  18. }
  19. },
  20. onLoad(opt) {
  21. // 保存订单号
  22. if('type' in opt){
  23. this.type = opt.type;
  24. }
  25. if (this.type == 1){
  26. uni.setNavigationBarTitle({
  27.   title:"兑换成功"
  28. })
  29. }
  30. if (this.type == 2) {
  31. uni.setNavigationBarTitle({
  32.   title:"预约成功"
  33. })
  34. }
  35. },
  36. methods: {
  37. }
  38. }
  39. </script>
  40. <style lang='scss'>
  41. .content{
  42. display: flex;
  43. flex-direction: column;
  44. justify-content: center;
  45. align-items: center;
  46. }
  47. .success-icon{
  48. margin-top: 100rpx;
  49. width: 302rpx;
  50. height: 320rpx;
  51. }
  52. .tit{
  53. margin-top: 40rpx;
  54. font-size: 32rpx;
  55. font-family: PingFang SC;
  56. font-weight: bold;
  57. color: #333333;
  58. }
  59. .btn-group{
  60. padding-top: 130rpx;
  61. display: flex;
  62. justify-content: flex-start;
  63. }
  64. .mix-btn {
  65. margin-top: 30upx;
  66. display: flex;
  67. align-items: center;
  68. justify-content: center;
  69. width: 301rpx;
  70. height: 78rpx;
  71. background: #59BAB0;
  72. border-radius: 10rpx;
  73. font-size: $font-lg;
  74. font-size: 30rpx;
  75. font-family: PingFang SC;
  76. font-weight: 500;
  77. color: #FFFFFF;
  78. &.hollow{
  79. margin-left: 36rpx;
  80. background: #fff;
  81. color: #59BAB0;
  82. border: 1px solid #59BAB0;
  83. }
  84. }
  85. </style>