作者 郭文星

12311

@@ -230,8 +230,6 @@ class Car extends Base @@ -230,8 +230,6 @@ class Car extends Base
230 $IDcard = $this->request->param("IDcard"); 230 $IDcard = $this->request->param("IDcard");
231 $phone = $this->request->param("phone"); 231 $phone = $this->request->param("phone");
232 $is_adult = $this->request->param("is_adult"); 232 $is_adult = $this->request->param("is_adult");
233 - file_put_contents("111111111111222.txt","3-1. ".(json_encode($this->request->param)).json_decode($this->auth->id)."\r\n",FILE_APPEND);  
234 - return;  
235 if(!$this->auth->id){ 233 if(!$this->auth->id){
236 $this->error("添加失败"); 234 $this->error("添加失败");
237 } 235 }
@@ -101,6 +101,7 @@ class Index extends Api @@ -101,6 +101,7 @@ class Index extends Api
101 $wxopenid=$wct_user['wx_openid']; 101 $wxopenid=$wct_user['wx_openid'];
102 $driver=Db::name("driver")->find($order['driver_id']); 102 $driver=Db::name("driver")->find($order['driver_id']);
103 $car=Db::name("car")->where("driver_id",$driver['id'])->find(); 103 $car=Db::name("car")->where("driver_id",$driver['id'])->find();
  104 + if($driver){
104 $substring = mb_substr($driver['name'], 0, 1); // "Hello" 105 $substring = mb_substr($driver['name'], 0, 1); // "Hello"
105 $sendInfo = array( 106 $sendInfo = array(
106 'first' => array('value' => "汽车票出票状态通知", 'color' => "#743A3A"), 107 'first' => array('value' => "汽车票出票状态通知", 'color' => "#743A3A"),
@@ -110,7 +111,16 @@ class Index extends Api @@ -110,7 +111,16 @@ class Index extends Api
110 'thing8' => array('value' => "{$substring}师傅{$car['license_plate']}", 'color' => '#173177'), 111 'thing8' => array('value' => "{$substring}师傅{$car['license_plate']}", 'color' => '#173177'),
111 'phone_number5' => array('value' => "{$order['phone']}", 'color' => '#173177'), 112 'phone_number5' => array('value' => "{$order['phone']}", 'color' => '#173177'),
112 ); 113 );
113 - 114 + }else{
  115 + $sendInfo = array(
  116 + 'first' => array('value' => "汽车票出票状态通知", 'color' => "#743A3A"),
  117 + 'thing2' => array('value' => "{$order['starting_point']}-{$order['end_point']}", 'color' => '#173177'),
  118 + 'time3' => array('value' =>date("Y-m-d H:i:s",$order['departure_time']), 'color' => '#173177'),
  119 + 'thing7' => array('value' =>"{$order['position']}", 'color' => '#173177'),
  120 + 'thing8' => array('value' => "未选择司机", 'color' => '#173177'),
  121 + 'phone_number5' => array('value' => "{$order['phone']}", 'color' => '#173177'),
  122 + );
  123 + }
114 if ($wxopenid) { 124 if ($wxopenid) {
115 $config = get_addon_config('wechat'); 125 $config = get_addon_config('wechat');
116 $tourl = 'https://wyc.tenyes.cn/index/index/orderinfo?id='.$order_id; 126 $tourl = 'https://wyc.tenyes.cn/index/index/orderinfo?id='.$order_id;