修改bug

master
ELF 5 years ago
parent 5bfecf5fc6
commit 175e38f712

@ -54,7 +54,7 @@ class Request {
public function isAndroid()
{
$userAgent = $this->getUserAgent();
if(strpos($userAgent, 'android')) {
if(stripos($userAgent, 'android')) {
return true;
}
return false;

@ -828,8 +828,8 @@ class ApplyController extends BaseController
public function child_game($p = 0)
{
/* if (PLEVEL>0) {echo '<script>window.location.go(-1);</script>';exit;} */
if (PRO_GRADE > 2) {
$loginPromote = $this->getLoginPromote();
if ($loginPromote['level'] > 3) {
echo '<script>window.location.go(-1);</script>';
exit;
}

@ -32,12 +32,12 @@ class PackageController extends Controller
$promoteId = I('promote_id', 0);
if ($code == '' && ($gameId == 0 || $promoteId == 0)) {
$this->redirect("download/downloadError", ['message' => '访问错误']);
$this->redirect("package/downloadError", ['message' => '访问错误']);
}
$blackList = [];
if (in_array($code, $blackList) || in_array('game_id/' . $gameId . '/promote_id/' . $promoteId, $blackList)) {
$this->redirect("download/downloadError", ['message' => '该链接已被禁']);
$this->redirect("package/downloadError", ['message' => '该链接已被禁']);
}
if ($code != '') {
$applyService = new ApplyService();
@ -62,10 +62,10 @@ class PackageController extends Controller
if (Request::isMobile()) {
if (!Request::isAndroid() && $game['sdk_version'] == 1) {
$this->redirect("download/downloadError", ['message' => '请使用安卓浏览器下载']);
$this->redirect("package/downloadError", ['message' => '请使用安卓浏览器下载']);
}
if (!Request::isIOS() && $game['sdk_version'] == 2) {
$this->redirect("download/downloadError", ['message' => '请使用ios浏览器下载']);
$this->redirect("package/downloadError", ['message' => '请使用ios浏览器下载']);
}
}
$packageUrl = $game['sdk_version'] == 1 ? $apply['pack_url'] : $apply['plist_url'];

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1">
<link href="{:get_cover(C('CH_SET_ICO'),'path')}" type="image/x-icon" rel="shortcut icon">
<title>下载失败</title>
<link rel="stylesheet" href="__CSS__/20180207/promition.css">
<link rel="stylesheet" href="__CSS__/20180207/game.css">
</head>
<body class="main_bg">
<div class="h_wrap p_t_30 p_lr_10" style="padding-top:15px;">
<p>{$message}</p>
</div>
</body>
</html>
Loading…
Cancel
Save