0
0

Index.php 589 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace app\api\controller\energy;
  3. use app\hander\HelpHander;
  4. use think\Controller;
  5. use think\Db;
  6. class Index extends Base
  7. {
  8. public function userInfo(){
  9. $info = Db::name('user')
  10. ->field('id,real_name,head_image')
  11. ->where('id',$this->userId)
  12. ->where('del',0)
  13. ->where('enable',1)
  14. ->find();
  15. if(!$info){
  16. HelpHander::error('用户信息不存在');
  17. }
  18. $info['org_name'] = Db::name('org')->where('id',$this->orgId)->value('name');
  19. HelpHander::success($info);
  20. }
  21. }