view_logistics.html 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>查看物流</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
  7. <meta name="apple-mobile-web-app-capable" content="yes">
  8. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  9. <link rel="stylesheet" type="text/css" href="//css.iamberry.com/wateroPF/css/mui.min.css">
  10. <link rel="stylesheet" type="text/css" href="//css.iamberry.com/wateroPF/css/iconfont.css" />
  11. <link rel="stylesheet" type="text/css" href="//css.iamberry.com/wateroPF/css/style.css" />
  12. <style>
  13. body{ text-align:center}
  14. article, section, time, aside {
  15. display: block;
  16. }
  17. .point-time {
  18. content: "";
  19. position: absolute;
  20. width: 13px;
  21. height: 13px;
  22. top: 12px;
  23. left: 30%;
  24. background: #1c87bf;
  25. margin-left: -4px;
  26. border-radius: 50%;
  27. box-shadow: 0 0 0 2px #fff;
  28. }
  29. .text-red {
  30. color: #ff5b5b;
  31. }
  32. .text-blue {
  33. color: #1c87bf;
  34. }
  35. .text-green {
  36. color: #95c91e;
  37. }
  38. .text-yellow {
  39. color: #ffb902;
  40. }
  41. .text-purple {
  42. color: #d32d93;
  43. }
  44. .point-red {
  45. background-color: #ff5b5b;
  46. }
  47. .point-blue {
  48. background-color: #38d1f7;
  49. }
  50. .point-green {
  51. background-color: #95c91e;
  52. }
  53. .point-yellow {
  54. background-color: #ffb902;
  55. }
  56. .point-purple {
  57. background-color: #d32d93;
  58. }
  59. .content {
  60. width: 100%;
  61. margin: 0 auto;
  62. }
  63. .content article {
  64. position: relative;
  65. }
  66. .content article > h3 {
  67. width: 100%;
  68. height: 20px;
  69. line-height: 20px;
  70. text-align: left;
  71. text-indent: 3%;
  72. font-size: 1.4em;
  73. color: #fff;
  74. padding: 10px 0 20px;
  75. background-color: #dd6d01;
  76. }
  77. .content article section {
  78. padding: 0 10px 10px;
  79. position: relative;
  80. }
  81. .content article section:before {
  82. content: "";
  83. width: 2px;
  84. top: 17px;
  85. bottom: -17px;
  86. left: 30.54%;
  87. background: #73dff9;
  88. position: absolute;
  89. -webkit-transform: scaleX(.5);
  90. }
  91. .content article section:last-child:before {
  92. display: none;
  93. }
  94. .content article section time {
  95. width: 25%;
  96. display: block;
  97. position: absolute;
  98. padding: 8px 0;
  99. }
  100. .content article section time > span {
  101. display: block;
  102. text-align: center;
  103. }
  104. .content article section aside {
  105. color: #3a3a38;
  106. margin-left: 42%;
  107. padding-bottom: 15px;
  108. text-align: left;
  109. }
  110. .content article section .brief {
  111. color: #9f9f9f;
  112. }
  113. .my-box-w{position: absolute;left: 50%;top: 50%;background: rgba(255,255,255,.1);width: 100px;height: 100px;border-radius: 50%;margin-left: -50px;margin-top: -60px;padding: 8px;}
  114. .my-box-n{background: rgba(255,255,255,.2);position: relative;height: 100%;width: 100%;border-radius: 50%;}
  115. .my-box-machine{position: absolute;left: 50%;top: 50%;width: auto;color: #fff;-webkit-transform:translateX(-50%) translateY(-20%);}
  116. .machine-num{position: absolute;left: 50%;top: 50%;margin-top:40px;-webkit-transform: translateX(-50%);color: #fff;}
  117. </style>
  118. <script>
  119. // 屏蔽分享
  120. window.hiddenAllWechatMenu = true;
  121. </script>
  122. </head>
  123. <body style="background: #fff;">
  124. <!-- <div class="loading-bg">
  125. <div class="mui-loading">
  126. <div class="mui-spinner">
  127. </div>
  128. &nbsp;&nbsp;加载中...
  129. </div>
  130. </div> -->
  131. <div class="mui-content" style="background: #fff;">
  132. <div style="position: relative;height: 100px;padding:20px 15px;background: #6bc5e3;">
  133. <img style="float: left;" width="60px" src="//s.iamberry.com/wateroPF/new/images/logistics.png">
  134. <ul style="display: inline-block;float: left;text-align: left;color: #fff;line-height: 30px;padding: 0 0 0 10px;">
  135. <li id="billName"></li>
  136. <li>单号:<span id="billCode"></span></li>
  137. </ul>
  138. </div>
  139. <div id="pullrefresh" class="content">
  140. <article class="my-tab-view-pull">
  141. </article>
  142. </div>
  143. <div id="orderlist" class="content" style="display:none;padding: 10px 0;">
  144. 暂无物流信息
  145. </div>
  146. </div>
  147. <script src="//s.iamberry.com/wateroPF/js/mui.min.js"></script>
  148. <script src="//s.iamberry.com/wateroPF/js/jquery-2.1.1.min.js"></script>
  149. <script src="//s.iamberry.com/wateroPF/js/shop/main.js"></script>
  150. <!-- <script src="//s.iamberry.com/wateroPF/js/shop/wechat-utils-1.0.js"></script> -->
  151. <script type="text/javascript">
  152. function pullupRefresh() {
  153. var billCode = getParam("billCode"),billName = getParam("billName");
  154. mui.ajax(domanUrl + '/wateroPF/logistics/getExpressInfo?dates=' + new Date().getTime(), {
  155. data: {
  156. "com": billName,
  157. "nu": billCode
  158. },
  159. dataType: 'json',
  160. type: 'post',
  161. timeout: 15000,
  162. success: function(dt) {
  163. console.log(dt);
  164. if(dt.status) {
  165. var name='';
  166. switch (billName){
  167. case "sto":
  168. name= "申通快递";
  169. break;
  170. case "yto":
  171. name= "圆通快递";
  172. break;
  173. case "zto":
  174. name= "中通速递";
  175. break;
  176. case "sf":
  177. name= "顺丰快递";
  178. break;
  179. case "ems":
  180. name= "邮政EMS";
  181. break;
  182. case "eyb":
  183. name= "E邮宝";
  184. break;
  185. case "zjs":
  186. name= "宅急送";
  187. break;
  188. case "yunda":
  189. name= "韵达快递";
  190. break;
  191. case "cces":
  192. name= "cces快递";
  193. break;
  194. case "pick":
  195. name= "上门提货";
  196. break;
  197. case "htky":
  198. name= "汇通快递";
  199. break;
  200. case "ttkdex":
  201. name= "天天快递";
  202. break;
  203. case "stars":
  204. name= "星晨急便";
  205. break;
  206. case "jd":
  207. name= "京东快递";
  208. break;
  209. case "01":
  210. name= "其他";
  211. break;
  212. case "02":
  213. name= "上门送货";
  214. break;
  215. case "longbanwuliu":
  216. name= "龙邦快递";
  217. break;
  218. default:
  219. break;
  220. }
  221. $("#billName").text(name);
  222. $("#billCode").text(billCode);
  223. if(dt.data.status=="1"){
  224. var renewal_data = [];
  225. renewal_data = dt.data.data;
  226. var table = document.body.querySelector('.my-tab-view-pull');
  227. mui(renewal_data).each(function(index) {
  228. var li = document.createElement('section');
  229. var color='point-blue',text='';
  230. if(index==0){
  231. color='point-red';
  232. //text="text-red";
  233. }
  234. li.innerHTML = ' <span class="point-time '+color+'"></span><time class="'+text+'">'+this.time+'</time><aside><p class="things">'+this.location+'</p><p class="brief" style="padding-top: 4%;">'+this.context+'</p></aside>';
  235. table.appendChild(li);
  236. })
  237. }else{
  238. $("#orderlist").show();
  239. }
  240. }else{
  241. $("#pullrefresh").hide();
  242. $("#orderlist").show();
  243. }
  244. },
  245. error: function(xhr, type, errorThrown) {
  246. console.log(xhr)
  247. }
  248. });
  249. }
  250. mui.ready(function(){
  251. //页面首次加载时拉取一次数据
  252. pullupRefresh();
  253. });
  254. function format(now) {
  255. now = new Date(now);
  256. var year=now.getFullYear();
  257. var month=now.getMonth()+1;
  258. var date=now.getDate();
  259. var hour=now.getHours();
  260. var minute=now.getMinutes();
  261. var second=now.getSeconds();
  262. if(month <10 && month > 0){
  263. month = "0"+month;
  264. }
  265. if(date <10 && date > 0){
  266. date = "0"+date;
  267. }
  268. return year+"-"+month+"-"+date;
  269. }
  270. </script>
  271. </body>
  272. </html>