-
Notifications
You must be signed in to change notification settings - Fork 2
/
order-express.html
100 lines (97 loc) · 3.85 KB
/
order-express.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<title>订单详情</title>
<link rel="stylesheet" href="css/rem-fix.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<!-- 主体 -->
<div class="container">
<!-- 地址选择 -->
<div class="address-pick-warp express-company-warp">
<div class="address-icon-warp"><img src="images/express-icon.png" alt=""></div>
<div class="address-content">
<div class="address-person-info">
<span>快递公司:</span>
<span id="expressCompany"></span>
</div>
<div class="address-specific">
<span>快递单号:</span>
<span id="expressNumber"></span>
</div>
</div>
</div>
<!-- 快递信息 -->
<div class="express-warp">
<div class="express-title">订单跟踪</div>
<div class="express-container">
<!--<div class="express-item">
<div class="express-detail">订单提交成功</div>
<div class="express-time">2016-09-10 17:47:39</div>
</div>
<div class="express-item">
<div class="express-detail">订单提交成功</div>
<div class="express-time">2016-09-10 17:47:39</div>
</div>
<div class="express-item">
<div class="express-detail">订单提交成功</div>
<div class="express-time">2016-09-10 17:47:39</div>
</div>
<div class="express-item">
<div class="express-detail">订单提交成功</div>
<div class="express-time">2016-09-10 17:47:39</div>
</div>
<div class="express-item">
<div class="express-detail">订单提交成功</div>
<div class="express-time">2016-09-10 17:47:39</div>
</div>-->
</div>
</div>
</div>
<script src="js/jquery-2.1.4.min.js"></script>
<script src="js/jquery-weui.min.js"></script>
<script src="js/swiper.min.js"></script>
<script>
// 初始化banner
function GetQueryString(name)
{
var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if(r!=null)return unescape(r[2]); return null;
}
var order = {
init:function(){
$.ajax({
url: "http://www.hejizhihe.com/TeamBuying/WechatApi/getOrderLogistics.do?OrderId="+GetQueryString('OrderId'),
type:'post',
dataType:'json',
success:function (data) {
if(data.resultCode!=1000){//get information error
console.log('正确码出错'+data.resultCode)
}else{//get information successfully
var returnObject=data.returnObject,html = '',detail=returnObject.Traces;
$("#expressCompany").html(returnObject.LogisticName);
$("#expressNumber").html(returnObject.LogisticCode);
for(var i=0;i<detail.length;i++){
html = '<div class="express-item">' +
'<div class="express-detail">'+detail[i].AcceptStation+'</div>' +
'<div class="express-time">'+detail[i].AcceptTime+'</div>' +
' </div>'+
html;
}
$(".express-container").append(html);
}
},
fail:function () {
console.log('获取信息失败')
}
});
}
};
order.init();
</script>
</body>
</html>