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