|
|
|
@ -34,6 +34,11 @@ class UserService
|
|
|
|
|
|
|
|
|
|
$noticeCount = $this->getNoticeCount($user, $game);
|
|
|
|
|
$this->addUserPlay($user, $game, $clientIp);
|
|
|
|
|
$this->dispatchLoginEvent([
|
|
|
|
|
'game_id' => $game['id'],
|
|
|
|
|
'user_id' => $user['id'],
|
|
|
|
|
'login_time' => time(),
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
$smallList = [];
|
|
|
|
|
$smallList[] = [
|
|
|
|
@ -102,7 +107,7 @@ class UserService
|
|
|
|
|
|
|
|
|
|
$testResource = M('test_resource','tab_')->where('user_id=%s and apply_status=2', $user['id'])->find(); //测试资源(扶持号)
|
|
|
|
|
if ($testResource) {
|
|
|
|
|
if ($this->isIpWarning($user, $testResource, $deviceNum)) {
|
|
|
|
|
if ($this->isIpWarning($user, $deviceNum)) {
|
|
|
|
|
$this->ipWarningLog($user, $testResource, $deviceNum);
|
|
|
|
|
}
|
|
|
|
|
if ($this->isDeviceError($user, $testResource, $deviceNum)) {
|
|
|
|
@ -178,7 +183,7 @@ class UserService
|
|
|
|
|
M('protect_log','tab_')->add($data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected function isIpWarning($user, $testResource, $deviceNum)
|
|
|
|
|
protected function isIpWarning($user, $deviceNum)
|
|
|
|
|
{
|
|
|
|
|
$newResult = file_get_contents('http://ip.taobao.com/service/getIpInfo.php?ip='.$clientIp);
|
|
|
|
|
$oldResult = file_get_contents('http://ip.taobao.com/service/getIpInfo.php?ip='.$user['login_ip']);
|
|
|
|
|