|
| xqd
@@ -77,13 +77,13 @@ class VoteController extends Controller
|
|
|
// status=1 : 投票成功
|
|
|
// status=0 : 今日机会用完
|
|
|
// status=2 : 未关注公众号
|
|
|
- /*if($user->subscribe != 1) {
|
|
|
+ if($user->subscribe != 1) {
|
|
|
echo json_encode(['status'=>'2']);
|
|
|
- //return;
|
|
|
+ return;
|
|
|
}elseif($today_count >= 3) {
|
|
|
echo json_encode(['status'=>'0']);
|
|
|
- //return;
|
|
|
- }else {*/
|
|
|
+ return;
|
|
|
+ }else {
|
|
|
$votes = new Vote;
|
|
|
$votes->player_id = $player_id;
|
|
|
$votes->openid = $user->openid;
|
|
| xqd
@@ -92,7 +92,7 @@ class VoteController extends Controller
|
|
|
$votes->save();
|
|
|
|
|
|
echo json_encode(['status'=>'1']);
|
|
|
- //}
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
}
|