正在显示
1 个修改的文件
包含
7 行增加
和
0 行删除
@@ -14,9 +14,16 @@ use think\Db; | @@ -14,9 +14,16 @@ use think\Db; | ||
14 | 14 | ||
15 | class Index extends WechatBase | 15 | class Index extends WechatBase |
16 | { | 16 | { |
17 | + protected $user_id; | ||
17 | function _initialize() | 18 | function _initialize() |
18 | { | 19 | { |
19 | parent::_initialize(); | 20 | parent::_initialize(); |
21 | + //判断是否授权 | ||
22 | + $user_id = get_current_user_id(); | ||
23 | + if(empty($user_id)){ | ||
24 | + $this->redirect('user/authorization_view'); | ||
25 | + } | ||
26 | + $this->user_id = $user_id; | ||
20 | } | 27 | } |
21 | public function index(){ | 28 | public function index(){ |
22 | $domain_name = $this->request->domain();//域名 | 29 | $domain_name = $this->request->domain();//域名 |
-
请 注册 或 登录 后发表评论