...
|
...
|
@@ -607,6 +607,15 @@ class User extends Api |
|
|
if(empty($id)){
|
|
|
$this->error('缺少必要参数');
|
|
|
}
|
|
|
|
|
|
// 查看用户是否有权限
|
|
|
$third_study = Db::name('third_study')->where('third_id',$user_id)->where('study_id',$id)->find();
|
|
|
if(empty($third_study)){
|
|
|
$this->error('您没有该场考试的权限');
|
|
|
}else{
|
|
|
$third_study['periodtime'] < time() && $this->error('学习期限已过');
|
|
|
}
|
|
|
|
|
|
$data['exam'] = Db::name('study')
|
|
|
->where('id',$id)
|
|
|
->find();
|
...
|
...
|
|