正在显示
1 个修改的文件
包含
11 行增加
和
0 行删除
@@ -9,6 +9,7 @@ namespace api\index\controller; | @@ -9,6 +9,7 @@ namespace api\index\controller; | ||
9 | 9 | ||
10 | use api\index\model\ActivityModel; | 10 | use api\index\model\ActivityModel; |
11 | use api\index\model\SlideItemModel; | 11 | use api\index\model\SlideItemModel; |
12 | +use api\index\model\UserModel; | ||
12 | use api\index\model\VolunteerModel; | 13 | use api\index\model\VolunteerModel; |
13 | use cmf\controller\RestBaseController; | 14 | use cmf\controller\RestBaseController; |
14 | 15 | ||
@@ -18,6 +19,16 @@ use cmf\controller\RestBaseController; | @@ -18,6 +19,16 @@ use cmf\controller\RestBaseController; | ||
18 | */ | 19 | */ |
19 | class IndexController extends RestBaseController | 20 | class IndexController extends RestBaseController |
20 | { | 21 | { |
22 | + public function _initialize() | ||
23 | + { | ||
24 | + $user_id = $this->getUserId(); | ||
25 | + $userModel = new UserModel(); | ||
26 | + $user = $userModel->where(array('id'=>$user_id))->find(); | ||
27 | + if($user['user_status'] == 0){ | ||
28 | + $this->error('兄嘚,你已被列入黑名单!'); | ||
29 | + } | ||
30 | + } | ||
31 | + | ||
21 | /** | 32 | /** |
22 | * @title 首页 | 33 | * @title 首页 |
23 | * @description 首页 | 34 | * @description 首页 |
-
请 注册 或 登录 后发表评论