|
@@ -3,7 +3,7 @@
|
|
namespace app\common\model;
|
|
namespace app\common\model;
|
|
|
|
|
|
use think\Model;
|
|
use think\Model;
|
|
-
|
|
|
|
|
|
+use app\common\library\Easemob;
|
|
/**
|
|
/**
|
|
* 系统消息模型
|
|
* 系统消息模型
|
|
*/
|
|
*/
|
|
@@ -22,6 +22,11 @@ class Message extends Model
|
|
if(!$user_id || !$title || !$content) {
|
|
if(!$user_id || !$title || !$content) {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
+ //推送
|
|
|
|
+ $easemob = new Easemob();
|
|
|
|
+ $easemob->push_text($user_id,$title,$content);
|
|
|
|
+
|
|
|
|
+ //入库
|
|
$data = [];
|
|
$data = [];
|
|
$data["user_id"] = $user_id;
|
|
$data["user_id"] = $user_id;
|
|
$data["title"] = $title;
|
|
$data["title"] = $title;
|