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.
 
 
 
 

78 lines
2.7 KiB

  1. var submite_success = getStorJson("submite_success");
  2. window.onload = function(){
  3. goHTML = $('#go').html();
  4. backHTML = $('#back').html();
  5. console.log(submite_success);
  6. if (submite_success.ifback == 0) {
  7. $('#go').removeClass('ui_hide');
  8. $('#back').addClass('ui_hide');
  9. reloadDataInfos(0);
  10. } else{
  11. $('#back').removeClass('ui_hide');
  12. $('#go').addClass('ui_hide');
  13. reloadDataInfos(1);
  14. }
  15. }
  16. function reloadDataInfos(ifback){
  17. if (ifback ==0 ) {
  18. var go_list = submite_success.go_list;
  19. var temp = goHTML;
  20. temp = temp.replace('上海',go_list.start_area);
  21. temp = temp.replace('(黄浦旅游集散站)',go_list.start_res);
  22. temp = temp.replace('乌镇',go_list.end_area);
  23. temp = temp.replace('(西栅1号停车场)',go_list.end_res);
  24. temp = temp.replace('2016-07-26',go_list.run_date);
  25. temp = temp.replace('07:40',go_list.run_time);
  26. temp = temp.replace('[普通座]',go_list.site_type);
  27. temp = temp.replace('[2]',go_list.num);
  28. temp = temp.replace('小橙子',go_list.customer_name);
  29. temp = temp.replace('18602525520',go_list.customer_mobile);
  30. var aaa = $('#total').html();
  31. aaa = aaa.replace('110',go_list.order_price);
  32. $('#total').html(aaa);
  33. $('#go').html(temp);
  34. }else{
  35. var go_list = submite_success.go_list;
  36. var back_list = submite_success.back_list;
  37. var temp = backHTML;
  38. temp = temp.replace('[去程出发地]',go_list.start_area);
  39. temp = temp.replace('去程出发站点',go_list.start_res);
  40. temp = temp.replace('[去程目的地]',go_list.end_area);
  41. temp = temp.replace('去程目的站点',go_list.end_res);
  42. temp = temp.replace('[去程日期]',go_list.run_date);
  43. temp = temp.replace('[去程时间]',go_list.run_time);
  44. temp = temp.replace('[去程座]',go_list.site_type);
  45. temp = temp.replace('[去程数量]',go_list.num);
  46. temp = temp.replace('[返程出发地]',back_list.start_area);
  47. temp = temp.replace('返程出发站点',back_list.start_res);
  48. temp = temp.replace('[返程目的地]',back_list.end_area);
  49. temp = temp.replace('返程目的站点',back_list.end_res);
  50. temp = temp.replace('[返程日期]',back_list.run_date);
  51. temp = temp.replace('[返程时间]',back_list.run_time);
  52. temp = temp.replace('[返程座]',back_list.site_type);
  53. temp = temp.replace('[返程数量]',back_list.num);
  54. temp = temp.replace('小橙子',back_list.customer_name);
  55. temp = temp.replace('18602525520',back_list.customer_mobile);
  56. var bbb = $('#total').html();
  57. bbb = bbb.replace('110',parseInt(go_list.order_price)+parseInt(back_list.order_price));
  58. $('#total').html(bbb);
  59. $('#back').html(temp);
  60. }
  61. }
  62. //查看订单
  63. function viewTheOrder(){
  64. window.location.href = './order_detail.html';
  65. }
  66. //返回首页
  67. function backToHome(){
  68. window.location.href = './resever_bus.html';
  69. }