1234567891011121314151617181920212223242526 |
- <?php
- namespace app\index\controller;
- use app\common\model\AdminUser;
- use think\Controller;
- class Index extends Base
- {
- public function index()
- {
- $model=model('common/Project');
- $model_user = new AdminUser();
- $user_data = $model_user->field('project_id')->where(['id'=>$this->aid])->find();
- if($this->aid != 1){
- $where = [
- 'id'=>['in',$user_data['project_id']],
- ];
- }else{
- $where = [];
- }
- $data=$model->where($where)->select();
- $this->assign('data',$data);
- return $this->fetch('index');
- }
- }
|