作者 郭文星

12311

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