123456789101112131415161718192021222324252627282930313233 |
- <?php
- namespace app\api\controller\h5;
- use app\hander\HelpHander;
- use think\Controller;
- use think\Db;
- class Org extends Controller
- {
- public function info(){
- $orgId = input('orgId/d',0);
- $info = Db::name('org')->field('id,name')->where('id',$orgId)->where('del',0)->where('parent_id','>',0)->find();
- if($info){
- HelpHander::success($info);
- }else{
- HelpHander::error('信息不存在');
- }
- }
- // 获取所有开通的项目
- public function lists(){
- $lists = Db::name('org')
- ->field('id,name')
- ->where('del',0)
- ->where('enable',1)
- ->where('type',2)
- ->select();
- HelpHander::success($lists);
- }
- }
|