链街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.

109 lines
3.6 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. li {
  30. list-style: none;
  31. }
  32. #grab {
  33. width: 2.4rem;
  34. padding: 1.2rem 0;
  35. line-height: 0;
  36. display: block;
  37. margin: .5rem auto .7rem;
  38. border: 0;
  39. border-radius: 50%;
  40. background-color: #009bed;
  41. color: #fff;
  42. font-size: .36rem;
  43. outline: 0;
  44. }
  45. .order-info {
  46. font-size: .3rem;
  47. }
  48. .order-info li {
  49. margin: .2rem 0;
  50. }
  51. h2.msg {
  52. font-size: .36rem;
  53. color: #f00;
  54. text-align: center;
  55. margin-bottom: 1rem;
  56. }
  57. h2#error:before {
  58. content: '😭';
  59. }
  60. h2#success:before {
  61. content: '😄';
  62. }
  63. h2.msg:before {
  64. display: block;
  65. font-size: 2rem;
  66. line-height: 1.4;
  67. margin: .4rem auto .6rem;
  68. }
  69. </style>
  70. </head>
  71. <body>
  72. @if($error_msg)
  73. <h2 class="msg" id="error">{{ $error_msg }}</h2>
  74. @elseif($success_msg)
  75. <h2 class="msg" id="success">{{ $success_msg }}</h2>
  76. @else
  77. <button id="grab">立即抢单</button>
  78. @endif
  79. @php($pay_type = [1 => '微信支付', 2 => '余额支付', 3 => '积分支付', 4 => '货到付款'])
  80. @if($order)
  81. <ul class="order-info">
  82. <li><b>订单编号:</b>{{ $order->order_num }}</li>
  83. <li><b>客户姓名:</b>{{ $order->name }}</li>
  84. <li><b>客户电话:</b>{{ substr_replace($order->tel, '****', 3, 4) }}</li>
  85. <li><b>客户地址:</b>{{ $order->address }}</li>
  86. <li><b>订单备注:</b>{{ $order->note }}</li>
  87. <li><b>付款金额:</b>{{ $order->money }}</li>
  88. <li><b>订单金额:</b>{{ $order->total_money }}(不含配送费)</li>
  89. <li><b>支付方式:</b>{{ $pay_type[$order->pay_type] ?? '' }}</li>
  90. <li><b>下单时间:</b>{{ date('Y-m-d H:i:s', $order->created_at) }}</li>
  91. <li><b>付款时间:</b>{{ $order->pay_time ? date('Y-m-d H:i:s', $order->pay_time) : '' }}</li>
  92. </ul>
  93. <script>
  94. $(function () {
  95. $('#grab').click(function () {
  96. $.post('{{ request()->url() }}', {
  97. _token: '{{ csrf_token() }}',
  98. }, function (res) {
  99. alert(res.message);
  100. window.location.reload();
  101. });
  102. });
  103. })
  104. </script>
  105. @endif
  106. </body>
  107. </html>