Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
hf
9 years ago
Commit
5ce2e2455beb45c1b6a4ade5795dedb886bd6958
1 parent
68cad087
code review by fei.hong: do merge yang.yang and shaofeng.zhou fixes bugs codes
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
yohobuy/www.yohobuy.com/application/models/Product/Item.php
yohobuy/www.yohobuy.com/application/modules/Passport/controllers/Login.php
yohobuy/www.yohobuy.com/application/models/Product/Item.php
View file @
5ce2e24
...
...
@@ -681,10 +681,13 @@ class ItemModel
//判断是否显示参考尺码
if
(
$boyReference
&&
(
$gender
==
1
||
$gender
==
3
)
&&
$showReference
)
{
$sizes
[]
=
empty
(
$value
[
'boyReferSize'
][
'referenceName'
])
?
' '
:
$value
[
'boyReferSize'
][
'referenceName'
];
}
elseif
(
$girlReference
&&
(
$gender
==
2
||
$gender
==
3
)
&&
$showReference
)
{
}
else
if
(
$girlReference
&&
(
$gender
==
2
||
$gender
==
3
)
&&
$showReference
)
{
$sizes
[]
=
empty
(
$value
[
'girlReferSize'
][
'referenceName'
])
?
' '
:
$value
[
'girlReferSize'
][
'referenceName'
];
}
else
{
if
(
isset
(
$size
[
'thead'
][
1
])
&&
$showReference
)
{
$size
[
'thead'
][
1
]
=
array
();
}
}
//其他尺码信息
foreach
(
$value
[
'sortAttributes'
]
as
$attr
)
{
$sizes
[]
=
empty
(
$attr
[
'sizeValue'
])
?
' '
:
$attr
[
'sizeValue'
];
...
...
@@ -692,7 +695,11 @@ class ItemModel
//尺码信息
$size
[
'tbody'
][]
=
$sizes
;
}
//参考尺码为空
if
(
isset
(
$size
[
'thead'
][
1
])
&&
empty
((
$size
[
'thead'
][
1
]))
&&
$showReference
)
{
unset
(
$size
[
'thead'
][
1
]);
$size
[
'thead'
]
=
array_values
(
$size
[
'thead'
]);
}
}
}
...
...
yohobuy/www.yohobuy.com/application/modules/Passport/controllers/Login.php
View file @
5ce2e24
...
...
@@ -21,8 +21,9 @@ class LoginController extends WebAction
{
$this
->
setTitle
(
'用户登录'
,
true
,
' | '
);
// 设置登录有效时间30分钟, 防机器刷
$this
->
setSession
(
'_LOGIN_EXPIRE'
,
time
()
+
1800
);
// 设置登录有效时间30分钟, 防机器刷,cache不稳定,改为cookie
$this
->
setCookie
(
'LE'
.
md5
(
'_LOGIN_EXPIRE'
),
time
()
+
1800
);
// $this->setSession('_LOGIN_EXPIRE', time() + 1800);
// 设置公共的头部
$this
->
setSimpleHeader
();
...
...
@@ -122,7 +123,8 @@ class LoginController extends WebAction
}
/* 设置登录有效时间30分钟, 防机器刷 */
$expire
=
$this
->
getSession
(
'_LOGIN_EXPIRE'
);
$expire
=
$this
->
getCookie
(
'LE'
.
md5
(
'_LOGIN_EXPIRE'
));
// $expire = $this->getSession('_LOGIN_EXPIRE');
if
(
empty
(
$expire
)
||
$expire
<
time
())
{
$data
=
array
(
'code'
=>
400
,
'message'
=>
'页面停留时间过长,请刷新页面'
,
'data'
=>
''
);
break
;
...
...
Please
register
or
login
to post a comment