...
|
...
|
@@ -240,14 +240,19 @@ class Bind extends Api |
|
|
$this->error('参数错误', ['status' => 2]);
|
|
|
}
|
|
|
$model = new StudyScoreLog();
|
|
|
$model->addScore($id,$unique);
|
|
|
$data = db('study')->where('unique', $unique)->field('name,gender')->find();
|
|
|
if ($data['gender'] == 1){
|
|
|
$data['gender'] = '男';
|
|
|
$find = $model->addScore($id,$unique);
|
|
|
if (empty($find)){
|
|
|
$this->error('扫码无效');
|
|
|
}else{
|
|
|
$data['gender'] = '女';
|
|
|
$data = db('study')->where('unique', $unique)->field('name,gender')->find();
|
|
|
if ($data['gender'] == 1){
|
|
|
$data['gender'] = '男';
|
|
|
}else{
|
|
|
$data['gender'] = '女';
|
|
|
}
|
|
|
$this->success('扫码成功', $data);
|
|
|
}
|
|
|
$this->success('扫码成功', $data);
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
|