|
|
@ -36,6 +36,73 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
$(function () { |
|
|
|
// 请求拿到所有 未接单 的订单 |
|
|
|
$.ajax({ |
|
|
|
url:"/order/all", |
|
|
|
success:function (data) { |
|
|
|
for(var order of data){ |
|
|
|
var node = document.createElement("div"); |
|
|
|
node.setAttribute("class","col-sm-4 col-md-3"); |
|
|
|
|
|
|
|
var node2 = document.createElement("div"); |
|
|
|
node2.setAttribute("class","thumbnail"); |
|
|
|
|
|
|
|
|
|
|
|
// 订单描述 |
|
|
|
var desc = document.createElement("div"); |
|
|
|
desc.setAttribute("class","alert alert-warning"); |
|
|
|
desc.setAttribute("role","alert"); |
|
|
|
desc.setAttribute("style","height:62.55px; overflow-y: auto;"); |
|
|
|
desc.innerText = order.description; |
|
|
|
node2.append(desc); |
|
|
|
|
|
|
|
var others = document.createElement("div"); |
|
|
|
others.setAttribute("class","caption center"); |
|
|
|
|
|
|
|
|
|
|
|
// 订单提交者 |
|
|
|
var sender = document.createElement("p"); |
|
|
|
sender.innerText = "发布者:"+order.sender; |
|
|
|
others.append(sender); |
|
|
|
|
|
|
|
// 订单价格 |
|
|
|
var price = document.createElement("p"); |
|
|
|
price.innerText = "价格:"+order.price; |
|
|
|
others.append(price); |
|
|
|
|
|
|
|
|
|
|
|
// 订单配送时间 |
|
|
|
var when = document.createElement("p"); |
|
|
|
when.innerText = "指定收件时间:"+order.when.substring(0,19).replace("T"," "); |
|
|
|
others.append(when); |
|
|
|
|
|
|
|
// 订单配送地点 |
|
|
|
var location = document.createElement("p"); |
|
|
|
location.innerText = "收件地点:"+order.location |
|
|
|
location.setAttribute("style","height:61.09px; overflow-y: auto;"); |
|
|
|
others.append(location); |
|
|
|
|
|
|
|
|
|
|
|
var detail = document.createElement("a"); |
|
|
|
detail.setAttribute("class","btn btn-primary btn-block"); |
|
|
|
detail.setAttribute("role","button"); |
|
|
|
detail.setAttribute("href","OrderInfo.html?"+order.id); |
|
|
|
detail.innerText = "查看详情"; |
|
|
|
others.append(detail); |
|
|
|
|
|
|
|
|
|
|
|
node2.append(others); |
|
|
|
|
|
|
|
node.append(node2); |
|
|
|
$("#all-order").append(node); |
|
|
|
} |
|
|
|
}, |
|
|
|
error: function () { |
|
|
|
alert("获取全部订单失败,请联系开发者wyz解决问题") |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// 发一个请求给后端, 让后端看看有没有session |
|
|
|
$.ajax({ |
|
|
|
url:"/user/check", |
|
|
@ -85,9 +152,10 @@ |
|
|
|
<div class="navbar-collapse collapse"> |
|
|
|
<ul class="nav navbar-nav"> |
|
|
|
<li class="active"><a href="Index.html">首页</a></li> |
|
|
|
<li><a href="NewOrder.html">发起订单</a></li> |
|
|
|
<li><a href="Order.html">我的订单</a></li> |
|
|
|
<li><a href="PickedOrder.html">我的接单</a></li> |
|
|
|
<li><a href="UserInfo.html">个人中心</a></li> |
|
|
|
<li><a href="NewOrder.html">发起订单</a></li> |
|
|
|
<li><a href="FriendLink.html">友情链接</a></li> |
|
|
|
</ul> |
|
|
|
<ul class="nav navbar-nav navbar-right hidden-sm"> |
|
|
@ -127,39 +195,52 @@ |
|
|
|
|
|
|
|
<!-- 订单详情页, 包含了所有用户待接单, 供人选择 --> |
|
|
|
<div id="all-order" class="row"> |
|
|
|
<div class="col-sm-4 col-md-3"> |
|
|
|
<div class="thumbnail"> |
|
|
|
<a href="OrderInfo.html"> |
|
|
|
<img style="width: 100%; height: 200px; display: block;" alt="100%x200" |
|
|
|
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNDggMjAwIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIG1lZXQiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIj48ZGVmcyAvPjxyZWN0IGZpbGw9IiNlZWVlZWUiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIiAvPjxnPjx0ZXh0IHN0eWxlPSJmb250LWZhbWlseTogQXJpYWwsIEhlbHZldGljYSwgT3BlbiBTYW5zLCBzYW5zLXNlcmlmLCBtb25vc3BhY2U7IGZvbnQtc2l6ZTogMjJweDsgZm9udC13ZWlnaHQ6IGJvbGQ7IGRvbWluYW50LWJhc2VsaW5lOiBjZW50cmFsOyBmaWxsOiAjYWFhYWFhOyIgeD0iMTMxLjE2IiB5PSIxMDAiPjM0OHgyMDA8L3RleHQ+PC9nPjwvc3ZnPg==" |
|
|
|
data-src="holder.js/100%x200" data-holder-rendered="true"> |
|
|
|
</a> |
|
|
|
<!-- <div class="col-sm-4 col-md-3">--> |
|
|
|
<!-- <div class="thumbnail">--> |
|
|
|
<!-- <a href="OrderInfo.html">--> |
|
|
|
<!-- <img style="width: 100%; height: 200px; display: block;" alt="100%x200"--> |
|
|
|
<!-- src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNDggMjAwIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIG1lZXQiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIj48ZGVmcyAvPjxyZWN0IGZpbGw9IiNlZWVlZWUiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIiAvPjxnPjx0ZXh0IHN0eWxlPSJmb250LWZhbWlseTogQXJpYWwsIEhlbHZldGljYSwgT3BlbiBTYW5zLCBzYW5zLXNlcmlmLCBtb25vc3BhY2U7IGZvbnQtc2l6ZTogMjJweDsgZm9udC13ZWlnaHQ6IGJvbGQ7IGRvbWluYW50LWJhc2VsaW5lOiBjZW50cmFsOyBmaWxsOiAjYWFhYWFhOyIgeD0iMTMxLjE2IiB5PSIxMDAiPjM0OHgyMDA8L3RleHQ+PC9nPjwvc3ZnPg=="--> |
|
|
|
<!-- data-src="holder.js/100%x200" data-holder-rendered="true">--> |
|
|
|
<!-- </a>--> |
|
|
|
<!-- <div class="alert alert-warning" role="alert" style="overflow-y: auto; height: 62.55px;">--> |
|
|
|
<!-- Better check yourself, you're not looking too good.--> |
|
|
|
<!-- </div>--> |
|
|
|
|
|
|
|
<div class="caption center"> |
|
|
|
<h3>书名</h3> |
|
|
|
<p> |
|
|
|
<span>价格:</span> |
|
|
|
<span>100.00</span> |
|
|
|
</p> |
|
|
|
<p><a class="btn btn-primary btn-block" role="button" href="OrderInfo.html">查看详情</a></p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- <div class="caption center">--> |
|
|
|
<!-- <p>--> |
|
|
|
<!-- 发布者:tony--> |
|
|
|
<!-- </p>--> |
|
|
|
<!-- <p>--> |
|
|
|
<!-- <span>价格:</span>--> |
|
|
|
<!-- <span>5</span>--> |
|
|
|
<!-- </p>--> |
|
|
|
<!-- <p>--> |
|
|
|
<!-- <span>时间:</span>--> |
|
|
|
<!-- <span>2021-2-2</span>--> |
|
|
|
<!-- </p>--> |
|
|
|
<!-- <p>--> |
|
|
|
<!-- <span>地点:</span>--> |
|
|
|
<!-- <span>第八宿舍</span>--> |
|
|
|
<!-- </p>--> |
|
|
|
<!-- <a class="btn btn-primary btn-block" role="button" href="OrderInfo.html">查看详情</a>--> |
|
|
|
<!-- </div>--> |
|
|
|
<!-- </div>--> |
|
|
|
<!-- </div>--> |
|
|
|
|
|
|
|
<div class="col-sm-4 col-md-3"> |
|
|
|
<div class="thumbnail"> |
|
|
|
<a href="OrderInfo.html"> |
|
|
|
<img style="width: 100%; height: 200px; display: block;" alt="100%x200" |
|
|
|
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNDggMjAwIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIG1lZXQiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIj48ZGVmcyAvPjxyZWN0IGZpbGw9IiNlZWVlZWUiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIiAvPjxnPjx0ZXh0IHN0eWxlPSJmb250LWZhbWlseTogQXJpYWwsIEhlbHZldGljYSwgT3BlbiBTYW5zLCBzYW5zLXNlcmlmLCBtb25vc3BhY2U7IGZvbnQtc2l6ZTogMjJweDsgZm9udC13ZWlnaHQ6IGJvbGQ7IGRvbWluYW50LWJhc2VsaW5lOiBjZW50cmFsOyBmaWxsOiAjYWFhYWFhOyIgeD0iMTMxLjE2IiB5PSIxMDAiPjM0OHgyMDA8L3RleHQ+PC9nPjwvc3ZnPg==" |
|
|
|
data-src="holder.js/100%x200" data-holder-rendered="true"> |
|
|
|
</a> |
|
|
|
<div class="caption center"> |
|
|
|
<h3>书名</h3> |
|
|
|
<p><span>价格:</span><span>100.00</span></p> |
|
|
|
<p><a class="btn btn-primary btn-block" role="button" href="OrderInfo.html">查看详情</a></p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- <div class="col-sm-4 col-md-3">--> |
|
|
|
<!-- <div class="thumbnail">--> |
|
|
|
<!-- <a href="OrderInfo.html">--> |
|
|
|
<!-- <img style="width: 100%; height: 200px; display: block;" alt="100%x200"--> |
|
|
|
<!-- src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNDggMjAwIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIG1lZXQiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIj48ZGVmcyAvPjxyZWN0IGZpbGw9IiNlZWVlZWUiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIiAvPjxnPjx0ZXh0IHN0eWxlPSJmb250LWZhbWlseTogQXJpYWwsIEhlbHZldGljYSwgT3BlbiBTYW5zLCBzYW5zLXNlcmlmLCBtb25vc3BhY2U7IGZvbnQtc2l6ZTogMjJweDsgZm9udC13ZWlnaHQ6IGJvbGQ7IGRvbWluYW50LWJhc2VsaW5lOiBjZW50cmFsOyBmaWxsOiAjYWFhYWFhOyIgeD0iMTMxLjE2IiB5PSIxMDAiPjM0OHgyMDA8L3RleHQ+PC9nPjwvc3ZnPg=="--> |
|
|
|
<!-- data-src="holder.js/100%x200" data-holder-rendered="true">--> |
|
|
|
<!-- </a>--> |
|
|
|
<!-- <div class="caption center">--> |
|
|
|
<!-- <h3>书名</h3>--> |
|
|
|
<!-- <p><span>价格:</span><span>100.00</span></p>--> |
|
|
|
<!-- <p><a class="btn btn-primary btn-block" role="button" href="OrderInfo.html">查看详情</a></p>--> |
|
|
|
<!-- </div>--> |
|
|
|
<!-- </div>--> |
|
|
|
<!-- </div>--> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|