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.
 
 
 
 
 

169 lines
5.8 KiB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
  6. <title>行前须知</title>
  7. <!-- 百度统计star -->
  8. <script>
  9. var _hmt = _hmt || [];
  10. (function() {
  11. var hm = document.createElement("script");
  12. hm.src = "//hm.baidu.com/hm.js?3d4ede42cef05a99fcd8bda849831ada";
  13. var s = document.getElementsByTagName("script")[0];
  14. s.parentNode.insertBefore(hm, s);
  15. })();
  16. </script>
  17. <script>
  18. /*======================网络请求的Ajax的代码=======================*/
  19. // 创建一个Ajax对象
  20. if (window.ActiveXObject) {
  21. var myreq = new ActiveXObject("Microsoft.XMLHTTP");
  22. } else {
  23. var myreq = new XMLHttpRequest();
  24. }
  25. window.onload = function() {
  26. var prod_code = getPar('prod_code');
  27. if (!prod_code) prod_code = 'dsnhz004';
  28. var url = "http://xmwxc.zhizhuchuxing.cn/core/detail.asp?prodcode=" + prod_code;
  29. // var url = "http://xmwxc.zhizhuchuxing.cn/core/detail.asp?prodcode=dsnhz004";
  30. get_virtual_user_list(url);
  31. }
  32. // 请求方法,传入URL
  33. function get_virtual_user_list(myURL) {
  34. myreq.open("get", myURL, true);
  35. // 接收的数据交给哪个函数处理
  36. myreq.onreadystatechange = function() {
  37. if (myreq.readyState == 4) {
  38. // newstr 就是接收到的数据
  39. var newstr = myreq.responseText;
  40. var httpData = JSON.parse(newstr);
  41. //取行前须知
  42. var circuitry_intro = httpData['station_intro'];
  43. if (circuitry_intro.trim().length>0) {
  44. var arr_lines = circuitry_intro.split('/br');
  45. var HTML = '';
  46. for (var i = 0; i < arr_lines.length; i++) {
  47. var tempHTML = '<div style="margin-bottom: 20px;font-size:14px;word-break: break-all;">' + arr_lines[i] + '</div>'
  48. HTML += tempHTML;
  49. }
  50. document.getElementById('xing_detail').innerHTML = HTML;
  51. document.getElementById('xing_detail').style.display='block';
  52. }
  53. //取退票说明
  54. var refund_intro=httpData['refund_intro'];
  55. if (refund_intro.trim().length>0) {
  56. if (refund_intro.indexOf('/br')==-1) {
  57. document.getElementById('tui_detail').innerHTML=refund_intro;
  58. }else{
  59. var arr_tuis=refund_intro.split('/br');
  60. var tuiHTML='';
  61. for (var i=0;i<arr_tuis.length;i++) {
  62. var tempHTML = '<div style="margin-bottom: 20px;font-size:14px;word-break: break-all;">' + arr_tuis[i] + '</div>'
  63. HTML += tempHTML;
  64. }
  65. document.getElementById('tui_detail').innerHTML=tuiHTML;
  66. }
  67. document.getElementById('tui').style.display = 'block';
  68. document.getElementById('tui_detail').style.display = 'block';
  69. }
  70. }
  71. }
  72. myreq.send();
  73. }
  74. // 从上一页的链接上获取参数
  75. function getPar(par) {
  76. //获取当前URL
  77. var local_url = document.location.href;
  78. // 接收的时候将URL 解码
  79. local_url = decodeURI(local_url);
  80. //获取要取得的get参数位置
  81. var get = local_url.indexOf(par + "=");
  82. if (get == -1) {
  83. return false;
  84. }
  85. //截取字符串
  86. var get_par = local_url.slice(par.length + get + 1);
  87. //判断截取后的字符串是否还有其他get参数
  88. var nextPar = get_par.indexOf("&");
  89. if (nextPar != -1) {
  90. get_par = get_par.slice(0, nextPar);
  91. }
  92. return get_par;
  93. }
  94. </script>
  95. <!-- 百度统计end -->
  96. </head>
  97. <body style="font-family:'黑体';color:#8d8d8d;padding-left:10px;">
  98. <h3 id="xing" style="font-size:16px;color:#FF8800;">行前须知</h3>
  99. <div id="xing_detail">
  100. <!--<div style="margin-bottom: 20px;font-size:14px;word-break: break-all;"> 1.出游当天,请至上海黄浦旅游集散站服务台凭姓名及手机号取票。</div>-->
  101. <!--<div style="margin-bottom: 20px;font-size:14px;">2.认车牌号上车,请勿迟到。如需途经站点上车,请提前到达,过时不候</div>
  102. <div style="margin-bottom: 20px;font-size:14px;">3.往返程巴士可能乘坐不同车辆且座位号不同。</div>-->
  103. </div>
  104. <h3 id="tui" style="font-size:16px;color:#FF8800;display: none;">退票说明</h3>
  105. <div id="tui_detail" style="display: none;">
  106. <!--<div style="margin-bottom: 20px;font-size:14px;"> 出发前7日至4日(含第7日),按出行费用总额10%赔付;出发前3日至2日(含第3日),按出行费用总额15%赔付;出发前1日(含第1日),按出行费用总额20%赔付。</div>-->
  107. </div>
  108. </body>
  109. <!--<script>
  110. var httpData;
  111. if (window.ActiveXObject) {
  112. var myreq = new ActiveXObject("Microsoft.XMLHTTP");
  113. } else {
  114. var myreq = new XMLHttpRequest();
  115. }
  116. var m_prodcode='';
  117. window.onload=function (){
  118. m_prodcode = getPar('prodcode');
  119. // alert(m_prodcode);
  120. var myURL = 'http://xmwxc.zhizhuchuxing.cn/core/detail.asp?prodcode=' + m_projcode;
  121. myreq.open("get",myURL,true);
  122. myreq.onreadystatechange = show_date;
  123. myreq.send(null);
  124. }
  125. function show_date(){
  126. if (myreq.readyState == 4){
  127. var newstr = myreq.responseText;
  128. var cshow ='';
  129. httpData = JSON.parse(newstr);
  130. var c_code = httpData.code;
  131. if (c_code == '0'){
  132. var price_intro = httpData.price_intro;
  133. if(price_intro){
  134. price_intro = price_intro.replace(/\[SC\]/g,'<li class="li_21"><span class="span_1">上车</span></li>\n');
  135. }
  136. }else{
  137. alert(httpData.info);
  138. return;
  139. }
  140. }
  141. }
  142. function getPar(par){
  143. //获取当前URL
  144. var local_url = document.location.href;
  145. local_url = decodeURI(local_url);
  146. //获取要取得的get参数位置
  147. var get = local_url.indexOf(par +"=");
  148. if(get == -1){
  149. return false;
  150. }
  151. //截取字符串
  152. var get_par = local_url.slice(par.length + get + 1);
  153. //判断截取后的字符串是否还有其他get参数
  154. var nextPar = get_par.indexOf("&");
  155. if(nextPar != -1){
  156. get_par = get_par.slice(0, nextPar);
  157. }
  158. return get_par;
  159. }
  160. </script>-->
  161. </html>