作者 郭文星

123

... ... @@ -307,7 +307,7 @@ class Api extends Controller
'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' => "{$substring}师傅{$car['license_plate']}", 'color' => '#173177'),
'phone_number5' => array('value' => "0873-8896518", 'color' => '#173177'),
'phone_number5' => array('value' => "{$order['phone']}", 'color' => '#173177'),
);
... ...
... ... @@ -252,7 +252,7 @@ if (!function_exists('senWxmsgToDriverUser')) {
'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' => "{$substring}师傅{$car['license_plate']}", 'color' => '#173177'),
'phone_number5' => array('value' => "0873-8896518", 'color' => '#173177'),
'phone_number5' => array('value' => "{$order['phone']}", 'color' => '#173177'),
);
if ($wxopenid) {
$config = get_addon_config('wechat');
... ...
... ... @@ -161,7 +161,8 @@ class Car extends Backend
// if($istrue){
// $this->error("该司机已添加车辆");
// }
$route=Db::name("route")->where("id",$params['route_id'])->find();
$route_id_array = explode(",", $params['route_id']);
$route=Db::name("route")->where("id",$route_id_array[0])->find();
$user=Db::name("user")->where("mobile",$params['driver_phone'])->find();
if($user){
$driver=Db::name("driver")->where("user_id",$user['id'])->find();
... ... @@ -234,7 +235,7 @@ class Car extends Backend
$validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.edit' : $name) : $this->modelValidate;
$row->validateFailException()->validate($validate);
}
$route_id_array = explode(",", $params['route_id']);
$car=Db::name('car')->where("id",$ids)->find();
$driver=Db::name('driver')->where("id",$car['driver_id'])->find();
$user=Db::name("user")->where("mobile",$params['driver_phone'])->find();
... ... @@ -243,7 +244,7 @@ class Car extends Backend
$params['driver_id']=$driver['id'];
if(!$driver['place_image']){
$index=new Index();
$route=Db::name("route")->where("id",$params['route_id'])->find();
$route=Db::name("route")->where("id",$route_id_array[0])->find();
$driver=Db::name("driver")->where("id",$params['driver_id'])->find();
$carmodel=Db::name("carmodel")->where("id",$params['carmodel_id'])->find();
$car=Db::name("car")->where("driver_id",$driver['id'])->find();
... ...
... ... @@ -314,6 +314,7 @@ class Order extends Backend
$car=Db::name("car")->where("driver_id",$row['driver_id'])->find();
$row['license_plate']=$car['license_plate'];
$row['driver_name']=$driver['name'];
$row['driver_phone']=$driver['phone'];
}
$route=Db::name("route")->find($row['route_id']);
$row['route_name']=$route['name'];
... ...
... ... @@ -27,6 +27,7 @@ return [
'Route_id' => '选择线路',
'Driver_id' => '司机名称',
//'Driver_name' => '运行路线名称',
'driver_phone' => '司机电话',
'phone' => '联系电话',
'route_name' => '线路名称',
'Pay_time' => '支付时间',
... ...
... ... @@ -108,7 +108,7 @@ class Index extends Api
'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' => "{$substring}师傅{$car['license_plate']}", 'color' => '#173177'),
'phone_number5' => array('value' => "0873-8896518", 'color' => '#173177'),
'phone_number5' => array('value' => "{$order['phone']}", 'color' => '#173177'),
);
if ($wxopenid) {
$config = get_addon_config('wechat');
... ... @@ -132,7 +132,7 @@ class Index extends Api
'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' => "{$substring}师傅{$car['license_plate']}", 'color' => '#173177'),
'phone_number5' => array('value' => "0873-8896518", 'color' => '#173177'),
'phone_number5' => array('value' => "{$order['phone']}", 'color' => '#173177'),
);
if ($wxopenid) {
$config = get_addon_config('wechat');
... ...