jpush interface
This commit is contained in:
parent
d798315cf6
commit
3a0eb05ab7
@ -61,7 +61,8 @@ class GpsController extends BaseApiController
|
||||
'title' => '测试消息',
|
||||
'msg_content' => '这是一条新的推送消息'
|
||||
];
|
||||
$res = push_message('100d85590992b509d86',json_encode($message));
|
||||
$res = push_message('18071adc021402b58fb','这是条测试信息');
|
||||
dump($res);
|
||||
return !($res['code'] == 0);
|
||||
}
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ class LogisticsLogic extends BaseLogic
|
||||
$courier = Courier::alias('u')
|
||||
->leftjoin('la_company c', 'c.id = u.company_id')
|
||||
->leftjoin('la_user a','c.user_id = a.id')
|
||||
->field('a.id,a.nickname,a.mobile,c.company_name')
|
||||
->field('a.id,a.nickname,a.mobile,c.company_name,a.register_id')
|
||||
->where("CONCAT_WS(',',u.province,u.city,u.area,u.street,u.village,u.brigade) = '". $order['user_address_code']."'")
|
||||
->where('u.is_contract', 1)
|
||||
->where('u.is_captain',1)
|
||||
@ -216,6 +216,10 @@ class LogisticsLogic extends BaseLogic
|
||||
'content' => '已提交订单',
|
||||
'create_time' => time(),
|
||||
]);
|
||||
//推送消息
|
||||
if(!empty($courier['register_id'])){
|
||||
push_message($courier['register_id'],'您有一条新的配送任务,请尽快处理!!');
|
||||
}
|
||||
Logistics::commit();
|
||||
return ['code'=>1, 'msg'=>'操作成功','data'=>['nickname'=>$courier['nickname'],'phone'=>$courier['mobile']]];
|
||||
} catch (\Exception $e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user