12345678910111213141516171819202122232425262728293031 |
- <?php
- /**
- * Created by PhpStorm.
- * User: 珣
- * Date: 2016/9/5
- * Time: 22:52
- */
- namespace app\edit\controller;
- use app\common\model\AdminUser;
- 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');
- }
- }
|