feat: 移动端访问首页自动跳转 mobile/login
This commit is contained in:
@@ -9,6 +9,11 @@ class Home extends CI_Controller {
|
||||
}
|
||||
|
||||
public function index(){
|
||||
// 2026-04-20 add: 移动端自动跳转
|
||||
$ua = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
|
||||
if (preg_match('/(iPhone|iPad|iPod|Android|Mobile|BlackBerry|IEMobile|Opera Mini)/i', $ua)) {
|
||||
redirect('mobile/login', 'refresh');
|
||||
}
|
||||
//add by michen 20170820 for 修改登录异常 begin
|
||||
if(!strstr($_SERVER['REQUEST_URI'], 'home/index'))
|
||||
redirect('home/index', 'refresh');
|
||||
|
||||
Reference in New Issue
Block a user