作者 郭文星

123

... ... @@ -296,14 +296,16 @@ class Api extends Controller
$order=Db::name("order")->find($order_id);
if($order['driver_id']){
$driver=Db::name("driver")->find($order['driver_id']);
$car=Db::name("car")->where("driver_id",$driver['id'])->find();
$user=Db::name("user")->find($driver['user_id']);
$wct_user=Db::name("wct_user")->where("unionid",$user['unionid'])->find();
$wxopenid=$wct_user['wx_openid'];
$sendInfo = array(
'first' => array('value' => "汽车票出票状态通知", 'color' => "#743A3A"),
'thing2' => array('value' => "{$order['starting_point']}-{$order['end_point']}", 'color' => '#173177'),
'time3' => array('value' =>urlencode(date('Y-m-d H:i:s',$order['departure_time'])), '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' => "{$driver['name']}{$car['license_plate']}", 'color' => '#173177'),
'phone_number5' => array('value' => "{$order['phone']}", 'color' => '#173177'),
);
... ...
... ... @@ -240,17 +240,19 @@ if (!function_exists('senWxmsgToDriverUser')) {
{
$order=Db::name("order")->find($order_id);
if($order['driver_id']){
$user=Db::name("user")->find($order['driver_id']);
$user=Db::name("user")->find($order['user_id']);
$driver=Db::name("driver")->find($order['driver_id']);
$car=Db::name("car")->where("driver_id",$driver['id'])->find();
$wct_user=Db::name("wct_user")->where("unionid",$user['unionid'])->find();
$wxopenid=$wct_user['wx_openid'];
$sendInfo = array(
'first' => array('value' => "汽车票出票状态通知", 'color' => "#743A3A"),
'thing2' => array('value' => "{$order['starting_point']}-{$order['end_point']}", 'color' => '#173177'),
'time3' => array('value' =>urlencode(date('Y-m-d H:i:s', $order['departure_time'])), 'color' => '#173177'),
'thing7' => array('value' =>"{$order['starting_point']}", 'color' => '#173177'),
'thing8' => array('value' => "李师傅云H12E41", 'color' => '#173177'),
'phone_number5' => array('value' => "{$order['phone']}", 'color' => '#173177'),
);
$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' => "{$driver['name']}{$car['license_plate']}", 'color' => '#173177'),
'phone_number5' => array('value' => "{$order['phone']}", 'color' => '#173177'),
);
if ($wxopenid) {
$config = get_addon_config('wechat');
$tourl = '';
... ...
... ... @@ -130,6 +130,7 @@ class Index extends Api
'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' => "{$driver['name']}{$car['license_plate']}", 'color' => '#173177'),
'phone_number5' => array('value' => "{$order['phone']}", 'color' => '#173177'),
);
if ($wxopenid) {
... ...