Org.php 1.2 KB

1234567891011121314151617181920212223242526272829303132
  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. $orgGrabOrder = getOrgGrabOrder($this->userId,$this->orgId);
  14. $m = new Config();
  15. $data = [
  16. 'orgPhone'=>$m->getConfig('org_phone',$this->orgId),
  17. 'orgScanQrcode'=>(int)$m->getConfig('org_scan_qrcode',$this->orgId),
  18. 'orgGrabOrder'=>(int)$orgGrabOrder,
  19. 'orgSendOrder0'=>(int)$m->getConfig('org_send_order0',$this->orgId),
  20. 'orgSendOrder1'=>(int)$m->getConfig('org_send_order1',$this->orgId),
  21. 'orgSendOrder2'=>(int)$m->getConfig('org_send_order2',$this->orgId),
  22. 'orgSendOrder3'=>(int)$m->getConfig('org_send_order3',$this->orgId),
  23. 'orgSendOrder4'=>(int)$m->getConfig('org_send_order4',$this->orgId),
  24. 'orgSign'=>(int)$m->getConfig('org_sign',$this->orgId),
  25. "twoDispatchOff"=> two_dispatch_off($this->orgId)
  26. ];
  27. HelpHander::success($data);
  28. }
  29. }