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