后台添加禁用落地页下载页地址

master
ELF 5 years ago
parent fa9d40f87a
commit bd46fd325b

@ -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('该链接已被禁');
}

@ -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' => '该链接已被禁']);
}

Loading…
Cancel
Save