payResult.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <!-- 昵称(邮箱或者个人主页) -->
  2. <template>
  3. <view class="container">
  4. <view class="pay-result">
  5. <view class="success" v-if="status == true">
  6. <view class="msg">付款成功</view>
  7. <view class="btns">
  8. <navigator class="btn" url="/pages/ucenter/order/order" open-type="redirect">查看订单</navigator>
  9. <navigator class="btn" url="/pages/index/index" open-type="switchTab">继续逛</navigator>
  10. </view>
  11. </view>
  12. <view class="error" v-if="status != true">
  13. <view class="msg">付款失败</view>
  14. <view class="tips">
  15. <view class="p">请在
  16. <text class="time">1小时</text>
  17. 内完成付款
  18. </view>
  19. <view class="p">否则订单将会被系统取消</view>
  20. </view>
  21. <view class="btns">
  22. <navigator class="btn" url="/pages/ucenter/order/order" open-type="redirect">查看订单</navigator>
  23. <view class="btn" @tap='payOrder'>重新付款</view>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. const util = require("@/utils/util.js");
  31. export default {
  32. data() {
  33. return {
  34. status: false,
  35. orderId: 0
  36. }
  37. },
  38. methods: {
  39. updateSuccess: function() {
  40. let that = this
  41. },
  42. payOrder() {
  43. util.payOrder(parseInt(this.orderId)).then(res => {
  44. that.status = true
  45. }).catch(res => {
  46. util.toast('支付失败');
  47. });
  48. }
  49. },
  50. onLoad: function(options) {
  51. // 页面初始化 options为页面跳转所带来的参数
  52. this.orderId = options.orderId || 24
  53. this.status = options.status
  54. }
  55. }
  56. </script>
  57. <style lang="scss" scoped>
  58. page {
  59. min-height: 100%;
  60. width: 100%;
  61. background: #fff;
  62. }
  63. .container {
  64. height: 100%;
  65. background: #fff;
  66. }
  67. .pay-result {
  68. background: #fff;
  69. }
  70. .pay-result .msg {
  71. text-align: center;
  72. margin: 100rpx auto;
  73. color: #2bab25;
  74. font-size: 36rpx;
  75. }
  76. .pay-result .btns {
  77. display: flex;
  78. align-items: center;
  79. justify-content: center;
  80. }
  81. .pay-result .btn {
  82. text-align: center;
  83. height: 80rpx;
  84. margin: 0 20rpx;
  85. width: 200rpx;
  86. line-height: 78rpx;
  87. border: 1px solid #868686;
  88. color: #000000;
  89. border-radius: 5rpx;
  90. }
  91. .pay-result .error .msg {
  92. color: #b4282d;
  93. margin-bottom: 60rpx;
  94. }
  95. .pay-result .error .tips {
  96. color: #7f7f7f;
  97. margin-bottom: 70rpx;
  98. }
  99. .pay-result .error .tips .p {
  100. font-size: 24rpx;
  101. line-height: 42rpx;
  102. text-align: center;
  103. }
  104. .pay-result .error .tips .p {
  105. line-height: 42rpx;
  106. text-align: center;
  107. }
  108. </style>