作者 景琛

学生功能板块处理

... ... @@ -207,7 +207,7 @@ class Bind extends Api
$this->error('参数错误', ['status' => 2]);
}
$model = new StudyScoreLog();
$res = $model->addScore($id,$unique);
$model->addScore($id,$unique);
//halt($res);
$data = db('study')->where('unique', $unique)->field('name,gender')->find();
if ($data['gender'] == 1){
... ...
... ... @@ -39,6 +39,11 @@ class StudyScoreLog extends Model
$score = explode(',', $xm['score']);
$sum_score = 0;
$list = [];
//判断当前项目是否在学生所属场次内
$find = \db('ronda')->where('item_ids',['in',$id])->find();
if (empty($find)){
return '扫码错误';
}
foreach ($score as $k) {
$sum_score += $k;
}
... ...