Manage.php 776 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace Message\Lib;
  3. use Dever;
  4. class Manage
  5. {
  6. # 发送消息
  7. public function send($id, $name, $param)
  8. {
  9. $uid = Dever::param('uid', $param);
  10. $to_uid = Dever::param('to_uid', $param);
  11. $name = Dever::param('name', $param);
  12. $content = Dever::param('content', $param);
  13. $project_id = Dever::param('project_id', $param);
  14. $type = Dever::param('type', $param);
  15. $scope = Dever::param('scope', $param);
  16. if (!$uid) {
  17. $uid = -1;
  18. }
  19. if ($to_uid && $name && $content) {
  20. $push = 'push';
  21. $result = Dever::load('message/lib/data')->push($uid, $to_uid, $name, $content, $type, $project_id, $scope, $push, $id);
  22. }
  23. }
  24. }