|
@@ -52,8 +52,14 @@ class Index extends Api
|
|
|
|
|
|
$exam_user_top = Db::name('exam_user_top')->where('user_id',$this->auth->id)->order('id asc')->find();
|
|
|
if(!empty($exam_user_top) && !empty($exam_user_top['info'])){
|
|
|
- $zhongjiang['zhongjiang_status'] = 1;
|
|
|
- $zhongjiang['user_kami'] = $exam_user_top['info'];
|
|
|
+
|
|
|
+ if($exam_user_top['status'] == 0){
|
|
|
+ $update = [
|
|
|
+ 'status' => 1,
|
|
|
+ 'gettime' => time(),
|
|
|
+ ];
|
|
|
+ Db::name('exam_user_top')->where('id',$exam_user_top['id'])->update($update);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
$this->success('领取成功');
|