diff --git a/Application/Home/Controller/HomeController.class.php b/Application/Home/Controller/HomeController.class.php index dc41372b5..9254e4332 100644 --- a/Application/Home/Controller/HomeController.class.php +++ b/Application/Home/Controller/HomeController.class.php @@ -141,7 +141,8 @@ class HomeController extends Controller if ($code == '' && ($gameId == 0 || $promoteId == 0)) { $this->error('访问错误'); } - $blackList = []; + + $blackList = M('device_bans', 'tab_')->where(['type' => 3])->getField('tag', true); if (in_array($code, $blackList) || in_array('gid/' . $gameId . '/pid/' . $promoteId, $blackList)) { $this->error('该链接已被禁'); } diff --git a/Application/Home/Controller/PackageController.class.php b/Application/Home/Controller/PackageController.class.php index ebd8279c8..580cc849d 100644 --- a/Application/Home/Controller/PackageController.class.php +++ b/Application/Home/Controller/PackageController.class.php @@ -30,12 +30,12 @@ class PackageController extends Controller $code = I('code', ''); $gameId = I('game_id', 0); $promoteId = I('promote_id', 0); -// var_dump($gameId, $promoteId);die(); + if ($code == '' && ($gameId == 0 || $promoteId == 0)) { $this->redirect("package/downloadError", ['message' => '访问错误']); } - $blackList = []; + $blackList = M('device_bans', 'tab_')->where(['type' => 4])->getField('tag', true); if (in_array($code, $blackList) || in_array('game_id/' . $gameId . '/promote_id/' . $promoteId, $blackList)) { $this->redirect("package/downloadError", ['message' => '该链接已被禁']); }