1234567891011121314151617181920212223242526 |
- <?php
- namespace app\api\controller\energy;
- use app\hander\HelpHander;
- use think\Controller;
- use think\Db;
- class Index extends Base
- {
- public function userInfo(){
- $info = Db::name('user')
- ->field('id,real_name,head_image')
- ->where('id',$this->userId)
- ->where('del',0)
- ->where('enable',1)
- ->find();
- if(!$info){
- HelpHander::error('用户信息不存在');
- }
- $info['org_name'] = Db::name('org')->where('id',$this->orgId)->value('name');
- HelpHander::success($info);
- }
- }
|