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

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