Org.php 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace app\api\controller\v1;
  3. use app\api\controller\Base;
  4. use app\common\model\Config;
  5. use app\hander\HelpHander;
  6. class Org extends Base
  7. {
  8. public function lists(){
  9. $lists = model('Org')->getListByRoles($this->userId);
  10. HelpHander::success($lists);
  11. }
  12. public function queryConfig(){
  13. $m = new Config();
  14. $data = [
  15. 'orgPhone'=>$m->getConfig('org_phone',$this->orgId),
  16. 'orgScanQrcode'=>(int)$m->getConfig('org_scan_qrcode',$this->orgId),
  17. 'orgGrabOrder'=>(int)$m->getConfig('org_grab_order',$this->orgId),
  18. 'orgSendOrder0'=>(int)$m->getConfig('org_send_order0',$this->orgId),
  19. 'orgSendOrder1'=>(int)$m->getConfig('org_send_order1',$this->orgId),
  20. 'orgSendOrder2'=>(int)$m->getConfig('org_send_order2',$this->orgId),
  21. 'orgSendOrder3'=>(int)$m->getConfig('org_send_order3',$this->orgId),
  22. 'orgSendOrder4'=>(int)$m->getConfig('org_send_order4',$this->orgId),
  23. 'orgSign'=>(int)$m->getConfig('org_sign',$this->orgId),
  24. "twoDispatchOff"=> two_dispatch_off($this->orgId)
  25. ];
  26. HelpHander::success($data);
  27. }
  28. }