正在显示
1 个修改的文件
包含
1 行增加
和
3 行删除
@@ -92,14 +92,12 @@ class Goods extends WechatBase | @@ -92,14 +92,12 @@ class Goods extends WechatBase | ||
92 | }else{ | 92 | }else{ |
93 | $data['is_answer'] = 1;//答过题 | 93 | $data['is_answer'] = 1;//答过题 |
94 | //判断是否全部正确 | 94 | //判断是否全部正确 |
95 | - $correct = Db::name('user_question_answer')->where(['goods_id'=>$goods_id,'user_id'=>$this->user_id,'is_correct'=>0])->fetchSql()->find(); | ||
96 | - dump($correct); | 95 | + $correct = Db::name('user_question_answer')->where(['goods_id'=>$goods_id,'user_id'=>$this->user_id,'is_correct'=>"0"])->find(); |
97 | if(empty($correct)){ | 96 | if(empty($correct)){ |
98 | $is_correct = 1;//全部正确 | 97 | $is_correct = 1;//全部正确 |
99 | }else{ | 98 | }else{ |
100 | $is_correct = 0;//未全部正确 | 99 | $is_correct = 0;//未全部正确 |
101 | } | 100 | } |
102 | - dump($is_correct); | ||
103 | } | 101 | } |
104 | $data['is_correct'] = $is_correct; | 102 | $data['is_correct'] = $is_correct; |
105 | //数据回显 | 103 | //数据回显 |
-
请 注册 或 登录 后发表评论