waiting_payment.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <template>
  2. <view>
  3. <view class="waiting-container">
  4. <image src="../static/waiting_payment/payment.png" mode="widthFix" class="payment"></image>
  5. <view class="title">等待顾客付款</view>
  6. <view class="second">{{ i }}s</view>
  7. <button class="btn" @tap="checkPaymentHandle">未收到付款通知</button>
  8. </view>
  9. <view class="notice-container">
  10. <view class="notice-title">
  11. <u-icon name="error-circle-fill" top="2" color="#fea802" size="36"></u-icon>
  12. <text>注意事项</text>
  13. </view>
  14. <view class="desc">
  15. <text class="num">1.</text>
  16. 如果顾客已经成功付款,但是司机端未能收到付款成功的通知消息,可以点击“未收到顾客付款通知”的链接。系统将立即向微信支付平台查询顾客的付款结果;
  17. </view>
  18. <view class="desc">
  19. <text class="num">2.</text>
  20. 如果顾客已经成功付款,并且您的微信上面也收到了分账通知消息,但是本页面并没有接收到用户付款成功的通知消息。您可以点击已经收款按钮,系统将立即确认付款结果;
  21. </view>
  22. <view class="desc">
  23. <text class="num">3.</text>
  24. 如果顾客已经成功付款,并且本页面也接收到了付款成功的通知,但是您没有收到系统分账的通知。您可以耐心等待,因为本系统将会审核您在代驾中是否存在违规,并且扣除相关罚款,再给您分账。所以在顾客付款成功之后的2小时之内,您会收到本次代驾的分账收入,请您耐心等待,如有技术问题,请拨打400-264166678
  25. </view>
  26. </view>
  27. <u-top-tips ref="uTips"></u-top-tips>
  28. </view>
  29. </template>
  30. <script>
  31. export default {
  32. data() {
  33. return {
  34. i: 0,
  35. orderId: null,
  36. timer: null
  37. };
  38. },
  39. methods: {
  40. checkPaymentHandle: function() {
  41. let that = this;
  42. let data = {
  43. orderId: that.orderId
  44. };
  45. that.ajax(that.url.updateOrderAboutPayment, 'POST', data, function(resp) {
  46. let result = resp.data.result;
  47. if (result == '付款成功') {
  48. uni.showToast({
  49. title: '客户已付款'
  50. });
  51. uni.setStorageSync('workStatus', '停止接单');
  52. clearInterval(that.timer);
  53. that.i = 0;
  54. setTimeout(function() {
  55. uni.switchTab({
  56. url: '../../pages/workbench/workbench'
  57. });
  58. }, 2500);
  59. } else {
  60. uni.showToast({
  61. icon: '未检测到成功付款'
  62. });
  63. }
  64. });
  65. }
  66. },
  67. onLoad: function(options) {
  68. let that = this;
  69. that.orderId = options.orderId;
  70. that.timer = setInterval(function() {
  71. that.i++;
  72. if (that.i % 2 == 0) {
  73. let data = {
  74. orderId: that.orderId
  75. };
  76. that.ajax(
  77. that.url.searchOrderStatus,
  78. 'POST',
  79. data,
  80. function(resp) {
  81. if (!resp.data.hasOwnProperty('result')) {
  82. uni.showToast({
  83. icon: 'none',
  84. title: '没有找到订单'
  85. });
  86. clearInterval(that.timer);
  87. that.i = 0;
  88. } else {
  89. let result = resp.data.result;
  90. if (result == 7 || result == 8) {
  91. uni.showToast({
  92. title: '客户已付款'
  93. });
  94. uni.setStorageSync('workStatus', '停止接单');
  95. clearInterval(that.timer);
  96. that.i = 0;
  97. setTimeout(function() {
  98. uni.switchTab({
  99. url: '../../pages/workbench/workbench'
  100. });
  101. }, 2500);
  102. }
  103. }
  104. },
  105. false
  106. );
  107. }
  108. }, 1000);
  109. },
  110. onShow: function() {},
  111. onHide: function() {}
  112. };
  113. </script>
  114. <style lang="less">
  115. @import url('waiting_payment.less');
  116. </style>