lizhen hai 2 días
pai
achega
f59afd9292
Modificáronse 1 ficheiros con 18 adicións e 1 borrados
  1. 18 1
      addons/exam/controller/Paper.php

+ 18 - 1
addons/exam/controller/Paper.php

@@ -63,6 +63,23 @@ class Paper extends Base
         $this->success('', ['list' => $list]);
     }
 
+
+    public function lists()
+    {
+        $list = Db::name('exam_paper')->field('id,image,title,updatetime')->where('status','normal')
+            ->order('weigh desc, id desc')->autopage()->select();
+        $list = list_domain_image($list,['image']);
+        $this->success('', $list);
+    }
+
+    public function detail(){
+        $id = input('id');
+        $info = Db::name('exam_paper')->field('id,image,title,content,updatetime,quantity')->where('status','normal')
+            ->find($id);
+        $info = info_domain_image($info,['image']);
+        $this->success('', $info);
+    }
+
     /**
      * 试卷取题接口
      */
@@ -92,7 +109,7 @@ class Paper extends Base
         //检查考试状态
         $check = Db::name('exam_grade')->where('user_id', $user_id)->where('status',1)->find();
         if($check){
-            $this->success('您有其他考试正在进行中,即将继续考试',0);//直接给成功,数据返回0,前端跳转
+            //$this->success('您有其他考试正在进行中,即将继续考试',0);//直接给成功,数据返回0,前端跳转
         }
 
         //检查试卷