链街Dcat后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

97 lines
3.2 KiB

  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  6. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  7. <title>抢单大厅</title>
  8. <script type="text/javascript">
  9. (function (doc, win) {
  10. var docEl = doc.documentElement,
  11. resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
  12. recalc = function () {
  13. var clientWidth = docEl.clientWidth;
  14. if (!clientWidth) return;
  15. docEl.style.fontSize = 100 * (clientWidth / 750) + 'px';
  16. };
  17. if (!doc.addEventListener) return;
  18. win.addEventListener(resizeEvt, recalc, false);
  19. doc.addEventListener('DOMContentLoaded', recalc, false);
  20. })(document, window);
  21. </script>
  22. <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
  23. <style>
  24. *{margin:0;padding:0;}
  25. body {
  26. font-size: .28rem;
  27. padding: .2rem;
  28. }
  29. #grab {
  30. width: 2.4rem;
  31. padding: 1.2rem 0;
  32. line-height: 0;
  33. display: block;
  34. margin: .5rem auto .7rem;
  35. border: 0;
  36. border-radius: 50%;
  37. background-color: #009bed;
  38. color: #fff;
  39. font-size: .36rem;
  40. outline: 0;
  41. }
  42. .order-info {
  43. font-size: .3rem;
  44. }
  45. .order-info li {
  46. margin: .2rem 0;
  47. }
  48. h2#error {
  49. font-size: .36rem;
  50. color: #f00;
  51. text-align: center;
  52. }
  53. h2#error:before {
  54. content: '😭';
  55. display: block;
  56. font-size: 2rem;
  57. line-height: 2;
  58. margin: 1rem auto .8rem;
  59. }
  60. </style>
  61. </head>
  62. <body>
  63. @if($error_msg)
  64. <h2 id="error">{{ $error_msg }}</h2>
  65. @else
  66. <button id="grab">立即抢单</button>
  67. @endif
  68. @php($pay_type = [1 => '微信支付', 2 => '余额支付', 3 => '积分支付', 4 => '货到付款'])
  69. @if($order)
  70. <ul class="order-info">
  71. <li><b>订单编号:</b>{{ $order->order_num }}</li>
  72. <li><b>客户姓名:</b>{{ $order->name }}</li>
  73. <li><b>客户电话:</b>{{ substr_replace($order->tel, '****', 3, 4) }}</li>
  74. <li><b>客户地址:</b>{{ $order->address }}</li>
  75. <li><b>订单备注:</b>{{ $order->note }}</li>
  76. <li><b>付款金额:</b>{{ $order->money }}</li>
  77. <li><b>订单金额:</b>{{ $order->total_money }}(不含配送费)</li>
  78. <li><b>支付方式:</b>{{ $pay_type[$order->pay_type] ?? '' }}</li>
  79. <li><b>下单时间:</b>{{ date('Y-m-d H:i:s', $order->created_at) }}</li>
  80. <li><b>付款时间:</b>{{ $order->pay_time ? date('Y-m-d H:i:s', $order->pay_time) : '' }}</li>
  81. </ul>
  82. <script>
  83. $(function () {
  84. $('#grab').click(function () {
  85. $.post('{{ request()->url() }}', {
  86. _token: '{{ csrf_token() }}',
  87. }, function (res) {
  88. alert(res.message);
  89. });
  90. });
  91. })
  92. </script>
  93. @endif
  94. </body>
  95. </html>