Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
system
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
_site-res
system
Commits
89d627dd
Commit
89d627dd
authored
May 10, 2018
by
tufengqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
beta ga切换完成
parent
06d8c6ce
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
18 deletions
+12
-18
CookieEdit.php
classes/fpf/yii_component/views/CookieEdit.php
+12
-18
No files found.
classes/fpf/yii_component/views/CookieEdit.php
View file @
89d627dd
...
...
@@ -89,16 +89,11 @@
<div
class=
"notice_box"
><span>
<?php
$version
=
''
;
if
(
VERSION_VALUE
)
{
$patt
=
"/(
file
|cookie)-([a-zA-Z0-9-]+)/"
;
$patt
=
"/(
beta|ga
|cookie)-([a-zA-Z0-9-]+)/"
;
if
(
preg_match
(
$patt
,
VERSION_VALUE
,
$result
))
{
$type
=
$result
[
1
];
$version
=
$result
[
2
];
$type_desc
=
''
;
if
(
'file'
===
$type
)
{
$type_desc
=
'文件定义的版本号'
;
}
else
if
(
'cookie'
===
$type
)
{
$type_desc
=
'cookie版本'
;
}
$type_desc
=
$type
.
'版本'
;
}
else
{
echo
'您当前处于本地开发环境,无版本目录'
;
}
...
...
@@ -123,9 +118,13 @@
<?php
if
(
$is_online_host
)
{
?>
<span
class=
"btn_list"
id=
"check_one"
>
<span
class=
"submit_beta check_item"
data-val=
"beta"
>
BETA
</span>
<span
class=
"submit_beta check_item
<?php
if
(
'beta'
===
$type
)
{
echo
'checked'
;
}
?>
"
data-val=
"beta"
>
BETA
</span>
<span
class=
"return_ga check_item"
data-val=
"ga"
>
GA
</span>
<span
class=
"return_ga check_item
<?php
if
(
'ga'
===
$type
)
{
echo
'checked'
;
}
?>
"
data-val=
"ga"
>
GA
</span>
</span>
<?php
}
...
...
@@ -173,20 +172,15 @@ $(".submit_cookie").on("click",function(){
$
(
".notice_box span"
).
html
(
"您当前处于本地开发环境,无版本目录"
);
}
else
if
(
wpoInfo
[
'fpf-version'
]){
var
str
=
wpoInfo
[
'fpf-version'
];
var
patt
=
/
(
file
|cookie
)
-
([
a-zA-Z0-9-
]
+
)
/
;
var
patt
=
/
(
beta|ga
|cookie
)
-
([
a-zA-Z0-9-
]
+
)
/
;
var
result
;
if
((
result
=
patt
.
exec
(
str
))
!=
null
)
{
var
type
=
result
[
1
];
var
version
=
result
[
2
];
var
type_desc
=
''
;
if
(
'file'
==
type
){
type_desc
=
'文件定义的版本号'
;
}
else
if
(
'cookie'
==
type
){
type_desc
=
'cookie版本'
;
}
var
type_desc
=
type
+
'版本'
;
var
warm_text
=
""
;
if
(
cookie_val
&&
cookie_val
!=
version
){
var
warm_text
=
'服务端可能不存在您设置的版本目录"'
+
cookie_val
+
'"'
;
if
(
(
'beta'
!=
type
&&
'ga'
!=
type
)
&&
cookie_val
&&
cookie_val
!=
version
){
warm_text
=
'服务端可能不存在您设置的版本目录"'
+
cookie_val
+
'"'
;
}
$
(
".notice_box span"
).
html
(
warm_text
+
" "
+
"当前访问的是"
+
type_desc
+
", 版本号为"
+
version
);
}
else
{
...
...
Write
Preview
Markdown
is supported
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