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
2d66966f5178f70ddbfd6e30efcbbaa87a9644b6
1 parent
a277dd80
code review by hf: fixes some bugs
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
4 deletions
library/Plugin/Helpers.php
yohobuy/m.yohobuy.com/application/models/Index/Home.php
yohobuy/m.yohobuy.com/application/modules/Cart/controllers/Index.php
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Login.php
library/Plugin/Helpers.php
View file @
2d66966
...
...
@@ -129,7 +129,7 @@ class Helpers
*/
public
static
function
getShoppingKeyByCookie
()
{
$cookie
=
isset
(
$_COOKIE
[
'_S
pk'
])
?
$_COOKIE
[
'_Spk
'
]
:
''
;
$cookie
=
isset
(
$_COOKIE
[
'_S
PK'
])
?
$_COOKIE
[
'_SPK
'
]
:
''
;
return
$cookie
;
}
...
...
yohobuy/m.yohobuy.com/application/models/Index/Home.php
View file @
2d66966
...
...
@@ -71,7 +71,7 @@ class HomeModel
/**
* 设置选择的频道保存到浏览器COOKIE
* (已废弃,改成
JS
设置)
* (已废弃,改成
JS
设置)
*
* @param string $cookie
* @return void
...
...
yohobuy/m.yohobuy.com/application/modules/Cart/controllers/Index.php
View file @
2d66966
...
...
@@ -456,8 +456,8 @@ class IndexController extends AbstractAction
$result
=
CartModel
::
addToCart
(
$productSku
,
$buyNumber
,
$goodsType
,
$isEdit
,
$promotionId
,
$uid
,
$shoppingKey
);
// 设置加入购物车凭证到客户端浏览器
if
(
!
$shoppingKey
&&
isset
(
$result
[
'data'
][
'shopping_key'
]))
{
$this
->
setCookie
(
'_Spk'
,
$result
[
'data'
][
'shopping_key'
]);
if
(
empty
(
$shoppingKey
)
&&
isset
(
$result
[
'data'
][
'shopping_key'
]))
{
$this
->
setCookie
(
'_SPK'
,
$result
[
'data'
][
'shopping_key'
],
time
()
+
86400
*
360
);
}
}
...
...
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Login.php
View file @
2d66966
...
...
@@ -77,6 +77,7 @@ class LoginController extends AbstractAction
// 清除客户端
$this
->
setCookie
(
'_UID'
,
''
);
$this
->
setCookie
(
'_TOKEN'
,
''
);
$this
->
setCookie
(
'_SPK'
,
''
);
// 清除服务端会话
$this
->
setSession
(
'_TOKEN'
,
''
);
...
...
Please
register
or
login
to post a comment