Messagesys.php 700 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace app\api\controller\worker;
  3. use app\common\controller\Apiw;
  4. use think\Db;
  5. /**
  6. * 消息
  7. */
  8. class Messagesys extends Apiw
  9. {
  10. protected $noNeedLogin = [];
  11. protected $noNeedRight = ['*'];
  12. //消息页信息
  13. public function index(){
  14. $list = Db::name('message_sys')->field('content',true)
  15. ->where('company_id',$this->auth->company_id)
  16. ->autopage()->order('id desc')->select();
  17. $this->success("获取成功!",$list);
  18. }
  19. //消息页信息
  20. public function info(){
  21. $id = input('id',0);
  22. $info = Db::name('message_sys')->where('id',$id)->find();
  23. $this->success("获取成功!",$info);
  24. }
  25. }