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
3.3 KiB

  1. var order_id = getPar("order_id");
  2. //var order_id = 179684;
  3. $(document).ready(function(){
  4. $("#trip_detail").show();
  5. get_info();
  6. })
  7. function createHtml(trip_detail){
  8. var trip_date = trip_detail.date.split("-");
  9. var status = "";
  10. if(trip_detail.status==0){
  11. status = "images/img-weijianpiao.png";
  12. }else{
  13. status = "images/img_yijianpiao.png";
  14. }
  15. var temp = '<div class="order_title ub inner_down_line_color ub-ae ui_p_b05">'
  16. + '<div class="ub-f1 ui_p_t10 ui_p_l15">'
  17. + '<span style="margin-right: 0.02rem;" class="fontmiddle_color ulev2">'+trip_detail.time+'</span>'
  18. + '<span style="color: #519d9e;font-size: 0.13rem;"> '+trip_date[1]+'月'+trip_date[2]+'日&nbsp;&nbsp;'+trip_detail.week+'</span>'
  19. + '</div>'
  20. + '<div class="ub-f1 payred_color text_right ulev1" style="padding-top: 0.1rem;"><img style="width: 0.52rem;" src="'+status+'"/></div>'
  21. + '</div>'
  22. + '<div class="ub">'
  23. + '<img src="images/img_pointline@2x.png" class="line_line"/>'
  24. + '<div class="ub-f4 ub ub-ver" style="width: 1%;margin-left: 0.32rem;">'
  25. + '<div style="padding-top: 0.13rem;" class="commongray_color">上车站</div>'
  26. + '<div id="start_area" class="ui_p_b10" style="padding-bottom: 0.08rem;">'
  27. + '<span class="ulev2">'+trip_detail.start_area_name+'</span><span class="fontmiddle_color ui_p_l10 ulev1">'+trip_detail.start_res_name+'</span>'
  28. + '</div>'
  29. + '<div class="commongray_color">下车站</div>'
  30. + '<div style="padding-bottom: 0.13rem;" class="ui_p_b10">'
  31. + '<span class="ulev2">'+trip_detail.end_area_name+'</span><span class="fontmiddle_color ui_p_l10 ulev1">'+trip_detail.end_res_name+'</span>'
  32. + '</div>'
  33. + '</div>'
  34. + '</div>'
  35. + '<div style="background-image: url('+trip_detail.eurl+');" class="er_code commongray_color">检票二维码:</div>'
  36. + '<div style="background-color: #f7f8fa;font-size: 0.11rem;" class="ui_p_l20 ui_p_b15 commongray_color">关注微信公众号:蜘蛛行,即可查看「车辆图片」「站点定位」。上车后扫描座椅上二维码,领取现金红包!</div>'
  37. + '<div class="ub inner_down_line_color ub-ver ui_p_t15 ui_p_b15 ui_p_l20 ui_p_r20">'
  38. + '<div class="ub ub-ver">'
  39. + '<div style="font-size: 0.11rem;" class="commongray_color">订单号:</div>'
  40. + '<div style="margin-bottom: 0.06rem;" class="ub fontmiddle_color">'+trip_detail.order_id+'</div>'
  41. + '</div>'
  42. + '<div class="ub ub-ver">'
  43. + '<div style="font-size: 0.11rem;" class="commongray_color">出行人数:</div>'
  44. + '<div class="ub">'
  45. + '<div class="ulev1 fontmiddle_color">'+trip_detail.trip_type+'</div>'
  46. + '<div style="margin-left: 0.5rem;" class="ub-f1 ulev1 fontmiddle_color">'+trip_detail.prod_name+' '+trip_detail.count+'人</div>'
  47. + '</div>'
  48. + '</div>'
  49. + '</div>'
  50. $("#e_ticket_info").html(temp);
  51. }
  52. //获取初始化信息
  53. function get_info(){
  54. $.ajax({
  55. url:base_api+"mytrip/eticket",//请求地址
  56. type: "post", //请求方式
  57. data:{order_id:order_id},
  58. dataType: "json",
  59. success: function (data) {
  60. console.log(data);
  61. if(data.flag == true){
  62. createHtml(data.data);
  63. }else{
  64. }
  65. },
  66. fail: function (data) {
  67. }
  68. });
  69. }