Commit f0416208 authored by hujun's avatar hujun

推送模板修改

parent d274ccc7
......@@ -92,7 +92,7 @@ class GeTuiUtils
$target->set_clientId($v);
// dump($target);
$res = $igt->pushMessageToSingle($message, $target);
dump($res);
if ($res['result'] == 'ok') {
$result['code'] = 'success';
$result['msg'] = $res['result'];
......@@ -102,7 +102,7 @@ class GeTuiUtils
break;
}
}
die;
return $result;
}
......@@ -117,27 +117,18 @@ class GeTuiUtils
*/
function onlineAllTemplate($payload, $black_title, $content)
{
$template = new \IGtTransmissionTemplate();
$template = new \IGtNotificationTemplate();
$template->set_appId($this->igt_app_id);//应用appid
$template->set_appkey($this->igt_app_key);//应用appkey
$template->set_transmissionType(2);//透传消息类型
$template->set_transmissionContent($payload); //透传内容
//APN高级推送
$apn = new \IGtAPNPayload();
$alert_msg = new \DictionaryAlertMsg();
$alert_msg->body = $content;//对应的是在线透传的content
$alert_msg->actionLocKey = "打开同联商业";//滑动打开app
$alert_msg->locKey = $content;//锁屏提示下框
$alert_msg->title = $black_title;//标题 锁屏标题
$alert_msg->titleLocKey = $black_title;//下拉通知上部框框
$alert_msg->titleLocArgs = [ "TitleLocArg" ];
$apn->alertMsg = $alert_msg;
$apn->badge = 1;//应用icon上显示的数字
$apn->sound = "";
$template->set_apnInfo($apn);
$template->set_transmissionType(1);//透传消息类型
$template->set_transmissionContent($payload);//透传内容
$template->set_title($black_title);//通知栏标题
$template->set_text($content);//通知栏内容
// $template->set_logo("http://wwww.igetui.com/logo.png");//通知栏logo
$template->set_isRing(true);//是否响铃
$template->set_isVibrate(true);//是否震动
$template->set_isClearable(true);//通知栏是否可清除
//$template->set_duration(BEGINTIME,ENDTIME); //设置ANDROID客户端在此时间区间内展示消息
return $template;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment