|
|
@@ -99,11 +99,15 @@ class School extends Controller
|
|
|
*/
|
|
|
public function specialityDynamic(){
|
|
|
$model = new SchoolSpeciality;
|
|
|
- $userInfo = UserService::getCurrentLoginUser(true);
|
|
|
- $userId = isset($userInfo['user_id'])? intval($userInfo['user_id']) : 0;
|
|
|
- $schoolId = isset($userInfo['info']['school_id'])? intval($userInfo['info']['school_id']) : 0;
|
|
|
- $userType = isset($userInfo['user_type'])? $userInfo['user_type'] : 0;
|
|
|
- $schoolId = $userType != 3? 0 : $schoolId;
|
|
|
+ $schoolId = $this->request->param('school_id', 0);
|
|
|
+ if($schoolId<=0){
|
|
|
+ $userInfo = UserService::getCurrentLoginUser(true);
|
|
|
+ $userId = isset($userInfo['user_id'])? intval($userInfo['user_id']) : 0;
|
|
|
+ $schoolId = isset($userInfo['info']['school_id'])? intval($userInfo['info']['school_id']) : 0;
|
|
|
+ $userType = isset($userInfo['user_type'])? $userInfo['user_type'] : 0;
|
|
|
+ $schoolId = $userType != 3? 0 : $schoolId;
|
|
|
+ }
|
|
|
+
|
|
|
if($schoolId <= 0){
|
|
|
return $this->renderSuccess('您无权访问或未绑定学校信息,请先绑定');
|
|
|
}
|