Toggle navigation
Toggle navigation
This project
Loading...
Sign in
wangshusheng
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to dashboard
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
梁志锋
9 years ago
Commit
dc3c11517d27652eab127e00d629a9d837647ea7
2 parents
a60695e2
5036538e
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
10 additions
and
21 deletions
library/Action/AbstractAction.php
library/LibModels/Wap/Passport/LoginData.php
library/Plugin/DataProcess/ListProcess.php
library/Plugin/Helpers.php
yohobuy/m.yohobuy.com/application/models/Index/User.php
yohobuy/m.yohobuy.com/application/models/Product/List.php
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Login.php
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Index.php
library/Action/AbstractAction.php
View file @
dc3c115
...
...
@@ -284,7 +284,7 @@ class AbstractAction extends Controller_Abstract
protected
function
getUid
(
$useSession
=
false
)
{
// @todo
$useSession
=
false
;
//
$useSession = false;
if
(
!
$this
->
_uid
)
{
$cookie
=
$this
->
getCookie
(
'_UID'
);
...
...
library/LibModels/Wap/Passport/LoginData.php
View file @
dc3c115
...
...
@@ -76,15 +76,4 @@ class LoginData
return
Yohobuy
::
get
(
Yohobuy
::
API_URL
,
$param
);
}
/**
* 登出SESSION会话
*
* @param string $token 会话
* @return array
*/
public
static
function
signoutSession
(
$token
)
{
return
Yohobuy
::
get
(
Helpers
::
logoutSession
(
$token
)
);
}
}
...
...
library/Plugin/DataProcess/ListProcess.php
View file @
dc3c115
...
...
@@ -42,7 +42,7 @@ class ListProcess
$products
=
array
();
foreach
(
$data
as
$value
)
{
$products
[]
=
Helpers
::
formatProduct
(
$value
,
true
,
true
,
true
);
$products
[]
=
Helpers
::
formatProduct
(
$value
,
true
,
true
,
true
,
235
,
314
);
}
return
$products
;
...
...
library/Plugin/Helpers.php
View file @
dc3c115
...
...
@@ -607,7 +607,7 @@ class Helpers
public
static
function
syncUserSession
(
$uid
,
$refer
=
''
,
$callback
=
'call'
)
{
return
'http://mapi.yohobuy.com/Passport/session/index?callback='
.
$callback
.
'&sign='
.
md5
(
$uid
.
'Js8Yn0!EwPM45-ws'
)
.
'&uid='
.
$uid
.
'&go='
.
$refer
;
.
'&sign='
.
md5
(
md5
(
$uid
.
'Js8Yn0!EwPM45-ws'
)
)
.
'&uid='
.
$uid
.
'&go='
.
$refer
;
}
/**
...
...
@@ -620,10 +620,10 @@ class Helpers
* @param string $callback 回调方法名
* @return string
*/
public
static
function
logoutSession
(
$token
,
$callback
=
'call'
)
public
static
function
logoutSession
(
$token
,
$
refer
=
''
,
$
callback
=
'call'
)
{
return
'http://mapi.yohobuy.com/Passport/session/logout?callback='
.
$callback
.
'&sign='
.
md5
(
'Js8Yn0!EwPM45-ws'
)
.
'&token='
.
$token
;
.
'&sign='
.
md5
(
md5
(
'Js8Yn0!EwPM45-ws'
))
.
'&token='
.
$token
.
'&go='
.
$refer
;
}
}
...
...
yohobuy/m.yohobuy.com/application/models/Index/User.php
View file @
dc3c115
...
...
@@ -201,7 +201,7 @@ class UserModel
$datas
[]
=
$product
;
}
!
empty
(
$datas
)
&&
$result
[
'hasFavProduct'
]
=
$datas
;
}
else
if
(
$page
>
1
&&
isset
(
$favProduct
[
'code'
])
&&
$favProduct
[
'code'
]
===
500
)
{
}
else
if
(
$page
>
1
&&
(
!
$favProduct
||
(
isset
(
$favProduct
[
'code'
])
&&
$favProduct
[
'code'
]
===
500
))
)
{
$result
[
'end'
]
=
true
;
}
...
...
@@ -259,7 +259,7 @@ class UserModel
$datas
[]
=
$brand
;
}
!
empty
(
$datas
)
&&
$result
[
'hasFavBrand'
]
=
$datas
;
}
else
if
(
$page
>
1
&&
isset
(
$favBrand
[
'code'
])
&&
$favBrand
[
'code'
]
===
500
)
{
}
else
if
(
$page
>
1
&&
(
!
$favBrand
||
(
isset
(
$favBrand
[
'code'
])
&&
$favBrand
[
'code'
]
===
500
))
)
{
$result
[
'end'
]
=
true
;
}
...
...
yohobuy/m.yohobuy.com/application/models/Product/List.php
View file @
dc3c115
...
...
@@ -213,7 +213,7 @@ class ListModel
}
// 调用接口查询数据
$brandLogo
=
BrandData
::
getBrandLogoByDomain
(
$domain
);
$brandLogo
=
BrandData
::
getBrandLogoByDomain
(
$domain
);
// 处理返回的数据
if
(
isset
(
$brandLogo
[
'data'
]))
{
$result
=
array
(
...
...
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Login.php
View file @
dc3c115
...
...
@@ -78,7 +78,7 @@ class LoginController extends AbstractAction
$refer
=
$this
->
server
(
'HTTP_REFERER'
,
SITE_MAIN
);
$token
=
$this
->
get
(
'token'
);
if
(
!
empty
(
$token
))
{
LoginData
::
signoutSession
(
$token
);
$this
->
go
(
Helpers
::
logoutSession
(
$token
,
$refer
)
);
}
$this
->
go
(
$refer
);
...
...
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Index.php
View file @
dc3c115
...
...
@@ -217,7 +217,7 @@ class IndexController extends AbstractAction
// 右下角的购物车链接
$data
[
'goodList'
][
'cartUrl'
]
=
Helpers
::
url
(
'/cart/index/index'
,
null
);
//
$data['goodList'] += $condition;
$data
[
'goodList'
]
+=
$condition
;
$data
[
'pageFooter'
]
=
true
;
if
(
$title
===
''
)
{
...
...
Please
register
or
login
to post a comment