Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
庞 凯升
PbootCMS
Commits
192a4a2b
Commit
192a4a2b
authored
6 years ago
by
星梦
Browse files
Options
Download
Email Patches
Plain Diff
V1.3.8
parent
b6d9b3b9
3.X
1.X
2.X
dev
main
master
V3.1.4
V3.1.3
V3.1.2
V3.1.1
V3.1.0
V3.0.9
V3.0.8
V3.0.7
V3.0.6
V3.0.5
V3.0.4
V3.0.3
V3.0.2
V3.0.1
V3.0.0
V2.0.9
V2.0.8
V2.0.7
V2.0.6
V2.0.5
V2.0.4
V2.0.3
V2.0.2
V2.0.1
V2.0.0
V1.4.3
V1.4.2
V1.4.1
V1.4.0
V1.3.9
V1.3.8
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/common/HomeController.php
+6
-1
apps/common/HomeController.php
with
6 additions
and
1 deletion
+6
-1
apps/common/HomeController.php
+
6
-
1
View file @
192a4a2b
...
...
@@ -17,7 +17,12 @@ class HomeController extends Controller
if
(
$this
->
config
(
'wap_domain'
)
&&
$this
->
config
(
'wap_domain'
)
==
get_http_host
())
{
$this
->
setTheme
(
get_theme
()
.
'/wap'
);
// 已绑域名并且一致则自动手机版本
}
elseif
(
is_mobile
()
&&
$this
->
config
(
'wap_domain'
)
&&
$this
->
config
(
'wap_domain'
)
!=
get_http_host
())
{
header
(
'Location://'
.
$this
->
config
(
'wap_domain'
)
.
URL
);
// 手机访问并且绑定了域名,但是访问域名不一致则跳转
if
(
is_https
())
{
$pre
=
'https://'
;
}
else
{
$pre
=
'http://'
;
}
header
(
'Location:'
.
$pre
.
$this
->
config
(
'wap_domain'
)
.
URL
);
// 手机访问并且绑定了域名,但是访问域名不一致则跳转
}
elseif
(
is_mobile
())
{
// 其他情况手机访问则自动手机版本
$this
->
setTheme
(
get_theme
()
.
'/wap'
);
}
else
{
// 其他情况,电脑版本
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help