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
d9228f329dae3ab26c244f9f4085d15bebbdc6da
1 parent
16b089ad
modify guang plusstar add check user is favorite
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
library/LibModels/Wap/Guang/PlusstarData.php
library/LibModels/Wap/Guang/PlusstarData.php
View file @
d9228f3
...
...
@@ -129,12 +129,20 @@ class PlusstarData
// 客户端类型
$clientType
=
$isApp
?
'iphone'
:
'h5'
;
$isUidOk
=
$uid
&&
is_numeric
(
$uid
);
$key
=
CacheConfig
::
KEY_ACTION_GUANG_PLUSTAR_DATA
.
strval
(
$id
)
.
$clientType
;
if
(
USE_CACHE
)
{
// 先尝试获取二级缓存(slave), 有数据则直接返回.
$cached
=
Cache
::
get
(
$key
,
'master'
);
if
(
!
empty
(
$cached
))
{
// 判断用户是否已收藏
if
(
$isUidOk
)
{
$getUidBrandFav
=
Yohobuy
::
yarClient
(
Yohobuy
::
SERVICE_URL
.
self
::
URI_BRANDINFO_FAVORITE
,
'getUidBrandFav'
,
array
(
$uid
,
$cached
[
'getBrandInfo'
][
'brand_id'
]),
false
,
1000
);
if
(
isset
(
$getUidBrandFav
[
'code'
])
&&
$getUidBrandFav
[
'code'
]
==
200
)
{
$cached
[
'getUidBrandFav'
]
=
true
;
}
}
return
$cached
;
}
}
...
...
@@ -148,7 +156,6 @@ class PlusstarData
}
// // 是否收藏店铺
// $isUidOk = $uid && is_numeric($uid);
// if ($isUidOk) {
// Yohobuy::yarConcurrentCall(Yohobuy::SERVICE_URL . self::URI_BRANDINFO_FAVORITE, 'getUidBrandFav', array($uid, $brandInfo['data']['brand_id']), function($retval) use(&$result) {
// $result['getUidBrandFav'] = (isset($retval['message']) && $retval['message'] == 'favorite') ? true : false;
...
...
Please
register
or
login
to post a comment