|
@@ -20,7 +20,7 @@ class Question extends Api
|
|
|
public function get_question(){
|
|
|
|
|
|
|
|
|
- if($this->auth->bind_player_date != strtotime(date('Y-m-d'))){
|
|
|
+ if(empty($this->auth->bind_jigou_id)){
|
|
|
$this->error('先绑定机构再答题',null,2);
|
|
|
}
|
|
|
|
|
@@ -78,7 +78,7 @@ class Question extends Api
|
|
|
if(!$this->apiLimit('操作太快了,休息一下吧'));
|
|
|
|
|
|
|
|
|
- if($this->auth->bind_player_date != strtotime(date('Y-m-d'))){
|
|
|
+ if(empty($this->auth->bind_jigou_id)){
|
|
|
$this->error('先绑定机构再答题',null,2);
|
|
|
}
|
|
|
|
|
@@ -116,7 +116,7 @@ class Question extends Api
|
|
|
'user_id' => $this->auth->id,
|
|
|
'question_id' => $question['id'],
|
|
|
'is_right' => $is_right ? 1 : 0,
|
|
|
- 'player_id' => $this->auth->bind_player_id,
|
|
|
+ 'jigou_id' => $this->auth->bind_jigou_id,
|
|
|
'createtime' => time(),
|
|
|
'createdate' => strtotime(date('Y-m-d')),
|
|
|
];
|
|
@@ -134,7 +134,7 @@ class Question extends Api
|
|
|
|
|
|
if($is_right_number > 0){
|
|
|
|
|
|
- $rs = Db::name('vote_jigou')->where('id',$this->auth->bind_player_id)->setInc('score',$is_right_number);
|
|
|
+ $rs = Db::name('vote_jigou')->where('id',$this->auth->bind_jigou_id)->setInc('score',$is_right_number);
|
|
|
if($rs === false){
|
|
|
Db::rollback();
|
|
|
$this->error('答题失败');
|