add log to jpush
This commit is contained in:
parent
b85199783e
commit
78332ca6b7
@ -61,7 +61,7 @@ class GpsController extends BaseApiController
|
||||
'title' => '测试消息',
|
||||
'msg_content' => '这是一条新的推送消息'
|
||||
];
|
||||
$res = push_message('18071adc021402b58fb','这是条测试信息');
|
||||
$res = push_message('18071adc021402b58fb2','这是条测试信息');
|
||||
dump($res);
|
||||
return !($res['code'] == 0);
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ use app\common\model\logistics\Order;
|
||||
use app\common\model\logistics\Product;
|
||||
use app\common\model\logistics\LogisticsRecord;
|
||||
use app\common\model\logistics\User;
|
||||
use think\facade\Log;
|
||||
|
||||
|
||||
/**
|
||||
@ -218,7 +219,10 @@ class LogisticsLogic extends BaseLogic
|
||||
]);
|
||||
//推送消息
|
||||
if(!empty($courier['register_id'])){
|
||||
push_message($courier['register_id'],'您有一条新的配送任务,请尽快处理!!');
|
||||
$push_result = push_message($courier['register_id'],'您有一条新的配送任务,请尽快处理!!');
|
||||
if($push_result['code'] == 0) {
|
||||
Log::write('["极光推送:"]'.$push_result['msg'],'error');
|
||||
}
|
||||
}
|
||||
Logistics::commit();
|
||||
return ['code'=>1, 'msg'=>'操作成功','data'=>['nickname'=>$courier['nickname'],'phone'=>$courier['mobile']]];
|
||||
|
Loading…
x
Reference in New Issue
Block a user