|
-
- var order_id = getPar("order_id");
- //var order_id = 179684;
-
- $(document).ready(function(){
- $("#trip_detail").show();
- get_info();
-
- })
-
- function createHtml(trip_detail){
- var trip_date = trip_detail.date.split("-");
- var status = "";
- if(trip_detail.status==0){
- status = "images/img-weijianpiao.png";
- }else{
- status = "images/img_yijianpiao.png";
- }
- var temp = '<div class="order_title ub inner_down_line_color ub-ae ui_p_b05">'
- + '<div class="ub-f1 ui_p_t10 ui_p_l15">'
- + '<span style="margin-right: 0.02rem;" class="fontmiddle_color ulev2">'+trip_detail.time+'</span>'
- + '<span style="color: #519d9e;font-size: 0.13rem;"> '+trip_date[1]+'月'+trip_date[2]+'日 '+trip_detail.week+'</span>'
- + '</div>'
- + '<div class="ub-f1 payred_color text_right ulev1" style="padding-top: 0.1rem;"><img style="width: 0.52rem;" src="'+status+'"/></div>'
- + '</div>'
- + '<div class="ub">'
- + '<img src="images/img_pointline@2x.png" class="line_line"/>'
- + '<div class="ub-f4 ub ub-ver" style="width: 1%;margin-left: 0.32rem;">'
- + '<div style="padding-top: 0.13rem;" class="commongray_color">上车站</div>'
- + '<div id="start_area" class="ui_p_b10" style="padding-bottom: 0.08rem;">'
- + '<span class="ulev2">'+trip_detail.start_area_name+'</span><span class="fontmiddle_color ui_p_l10 ulev1">'+trip_detail.start_res_name+'</span>'
- + '</div>'
- + '<div class="commongray_color">下车站</div>'
- + '<div style="padding-bottom: 0.13rem;" class="ui_p_b10">'
- + '<span class="ulev2">'+trip_detail.end_area_name+'</span><span class="fontmiddle_color ui_p_l10 ulev1">'+trip_detail.end_res_name+'</span>'
- + '</div>'
- + '</div>'
- + '</div>'
- + '<div style="background-image: url('+trip_detail.eurl+');" class="er_code commongray_color">检票二维码:</div>'
- + '<div style="background-color: #f7f8fa;font-size: 0.11rem;" class="ui_p_l20 ui_p_b15 commongray_color">关注微信公众号:蜘蛛行,即可查看「车辆图片」「站点定位」。上车后扫描座椅上二维码,领取现金红包!</div>'
- + '<div class="ub inner_down_line_color ub-ver ui_p_t15 ui_p_b15 ui_p_l20 ui_p_r20">'
- + '<div class="ub ub-ver">'
- + '<div style="font-size: 0.11rem;" class="commongray_color">订单号:</div>'
- + '<div style="margin-bottom: 0.06rem;" class="ub fontmiddle_color">'+trip_detail.order_id+'</div>'
- + '</div>'
- + '<div class="ub ub-ver">'
- + '<div style="font-size: 0.11rem;" class="commongray_color">出行人数:</div>'
- + '<div class="ub">'
- + '<div class="ulev1 fontmiddle_color">'+trip_detail.trip_type+'</div>'
- + '<div style="margin-left: 0.5rem;" class="ub-f1 ulev1 fontmiddle_color">'+trip_detail.prod_name+' '+trip_detail.count+'人</div>'
- + '</div>'
- + '</div>'
- + '</div>'
- $("#e_ticket_info").html(temp);
- }
- //获取初始化信息
- function get_info(){
- $.ajax({
- url:base_api+"mytrip/eticket",//请求地址
- type: "post", //请求方式
- data:{order_id:order_id},
- dataType: "json",
- success: function (data) {
- console.log(data);
- if(data.flag == true){
-
- createHtml(data.data);
-
- }else{
-
- }
- },
- fail: function (data) {
- }
- });
-
- }
|