|
@@ -64,15 +64,6 @@ class Exercise extends Backend
|
|
$params['start_time'] = date('Y-m-d');
|
|
$params['start_time'] = date('Y-m-d');
|
|
$params['end_time'] = date('Y-m-d');
|
|
$params['end_time'] = date('Y-m-d');
|
|
$exam_id = $this->model->insertGetId($params);
|
|
$exam_id = $this->model->insertGetId($params);
|
|
-
|
|
|
|
- //先请求接口判断,再进行处理
|
|
|
|
- if(Env::get('app.is_fault')){
|
|
|
|
- $url = config('site.url_type').'/sim/real-exam/student/self-exercise/start/'.$exam_id;
|
|
|
|
- $ret = json_decode(send_get($url),true);
|
|
|
|
- if($ret['code']!=200){
|
|
|
|
- $this->error($ret['msg']);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
|
|
$sim = Db::name('sim')->where('sim_type',$params['sim_type'])->where('seat_id',$this->auth->seat_id)->find();
|
|
$sim = Db::name('sim')->where('sim_type',$params['sim_type'])->where('seat_id',$this->auth->seat_id)->find();
|
|
if(empty($sim)){
|
|
if(empty($sim)){
|
|
@@ -148,6 +139,15 @@ class Exercise extends Backend
|
|
if(!$row){
|
|
if(!$row){
|
|
$this->error('未找到记录');
|
|
$this->error('未找到记录');
|
|
}
|
|
}
|
|
|
|
+ //先请求接口判断,再进行处理
|
|
|
|
+ if(Env::get('app.is_fault')){
|
|
|
|
+ $url = config('site.url_type').'/sim/real-exam/student/self-exercise/start/'.$ids;
|
|
|
|
+ $ret = json_decode(send_get($url),true);
|
|
|
|
+ if($ret['code']!=200){
|
|
|
|
+ $this->error($ret['msg']);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
if ($this->request->isPost()) {
|
|
if ($this->request->isPost()) {
|
|
|
|
|
|
//先请求接口判断,再进行处理
|
|
//先请求接口判断,再进行处理
|