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
106 lines
3.5 KiB
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
<title>抢单大厅</title>
|
|
<script type="text/javascript">
|
|
(function (doc, win) {
|
|
var docEl = doc.documentElement,
|
|
resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
|
|
recalc = function () {
|
|
var clientWidth = docEl.clientWidth;
|
|
if (!clientWidth) return;
|
|
docEl.style.fontSize = 100 * (clientWidth / 750) + 'px';
|
|
};
|
|
|
|
if (!doc.addEventListener) return;
|
|
win.addEventListener(resizeEvt, recalc, false);
|
|
doc.addEventListener('DOMContentLoaded', recalc, false);
|
|
})(document, window);
|
|
</script>
|
|
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
|
|
<style>
|
|
*{margin:0;padding:0;}
|
|
body {
|
|
font-size: .28rem;
|
|
padding: .2rem;
|
|
}
|
|
#grab {
|
|
width: 2.4rem;
|
|
padding: 1.2rem 0;
|
|
line-height: 0;
|
|
display: block;
|
|
margin: .5rem auto .7rem;
|
|
border: 0;
|
|
border-radius: 50%;
|
|
background-color: #009bed;
|
|
color: #fff;
|
|
font-size: .36rem;
|
|
outline: 0;
|
|
}
|
|
.order-info {
|
|
font-size: .3rem;
|
|
}
|
|
.order-info li {
|
|
margin: .2rem 0;
|
|
}
|
|
h2.msg {
|
|
font-size: .36rem;
|
|
color: #f00;
|
|
text-align: center;
|
|
margin-bottom: 1rem;
|
|
}
|
|
h2#error:before {
|
|
content: '😭';
|
|
}
|
|
h2#success:before {
|
|
content: '😄';
|
|
}
|
|
h2.msg:before {
|
|
display: block;
|
|
font-size: 2rem;
|
|
line-height: 1.4;
|
|
margin: .4rem auto .6rem;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
@if($error_msg)
|
|
<h2 class="msg" id="error">{{ $error_msg }}</h2>
|
|
@elseif($success_msg)
|
|
<h2 class="msg" id="success">{{ $success_msg }}</h2>
|
|
@else
|
|
<button id="grab">立即抢单</button>
|
|
@endif
|
|
|
|
@php($pay_type = [1 => '微信支付', 2 => '余额支付', 3 => '积分支付', 4 => '货到付款'])
|
|
@if($order)
|
|
<ul class="order-info">
|
|
<li><b>订单编号:</b>{{ $order->order_num }}</li>
|
|
<li><b>客户姓名:</b>{{ $order->name }}</li>
|
|
<li><b>客户电话:</b>{{ substr_replace($order->tel, '****', 3, 4) }}</li>
|
|
<li><b>客户地址:</b>{{ $order->address }}</li>
|
|
<li><b>订单备注:</b>{{ $order->note }}</li>
|
|
<li><b>付款金额:</b>{{ $order->money }}</li>
|
|
<li><b>订单金额:</b>{{ $order->total_money }}(不含配送费)</li>
|
|
<li><b>支付方式:</b>{{ $pay_type[$order->pay_type] ?? '' }}</li>
|
|
<li><b>下单时间:</b>{{ date('Y-m-d H:i:s', $order->created_at) }}</li>
|
|
<li><b>付款时间:</b>{{ $order->pay_time ? date('Y-m-d H:i:s', $order->pay_time) : '' }}</li>
|
|
</ul>
|
|
<script>
|
|
$(function () {
|
|
$('#grab').click(function () {
|
|
$.post('{{ request()->url() }}', {
|
|
_token: '{{ csrf_token() }}',
|
|
}, function (res) {
|
|
alert(res.message);
|
|
window.location.reload();
|
|
});
|
|
});
|
|
})
|
|
</script>
|
|
@endif
|
|
</body>
|
|
</html>
|