作者 王晓刚
1 个管道 的构建 通过 耗费 0 秒

商户申请

@@ -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 //数据回显