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
e01cc9b71c9555242e029378ac185ee4ab88029e
1 parent
5ce2e245
code review by fei.hong: do merge yang.yang and shaofeng.zhou fixes bugs codes
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
7 deletions
library/LibModels/Web/Product/BrandData.php
library/WebPlugin/HelperSearch.php
yohobuy/www.yohobuy.com/application/models/Product/Brands.php
library/LibModels/Web/Product/BrandData.php
View file @
e01cc9b
...
...
@@ -78,7 +78,7 @@ class BrandData
*/
public
static
function
getBrandLogoByDomain
(
$domain
,
$fields
=
'less'
)
{
return
Yohobuy
::
yarClient
(
Yohobuy
::
SERVICE_URL
.
self
::
URL_BRAND_LOGO
,
'getBrandByDomain'
,
array
(
$domain
,
$fields
));
return
Yohobuy
::
yarClient
(
Yohobuy
::
SERVICE_URL
.
self
::
URL_BRAND_LOGO
,
'getBrandByDomain'
,
array
(
$domain
,
$fields
)
,
600
);
}
/**
...
...
library/WebPlugin/HelperSearch.php
View file @
e01cc9b
...
...
@@ -266,6 +266,9 @@ class HelperSearch
$val
[
'default_images'
]
=
$v
[
'images_url'
];
}
}
if
(
!
$defaultGood
)
{
continue
;
}
$defaultUrl
=
Helpers
::
getUrlBySkc
(
$val
[
'product_id'
],
$defaultGood
,
$val
[
'cn_alphabet'
]);
$cover
=
$cover
?
$cover
:
$skcPic
;
if
(
$cover
)
{
...
...
@@ -286,7 +289,7 @@ class HelperSearch
//即将售罄
$isFew
=
$val
[
'is_soon_sold_out'
]
===
'Y'
?
true
:
false
;
//SALE
$isSale
=
(
$val
[
'is_discount'
]
==
'Y'
&&
$val
[
'market_price'
]
/
$val
[
'sales_price'
]
>
=
2
)
?
true
:
false
;
$isSale
=
(
$val
[
'is_discount'
]
==
'Y'
&&
$val
[
'market_price'
]
/
$val
[
'sales_price'
]
>
2
)
?
true
:
false
;
//新品节
//再到着
//年终大促
...
...
yohobuy/www.yohobuy.com/application/models/Product/Brands.php
View file @
e01cc9b
...
...
@@ -77,12 +77,12 @@ class BrandsModel
$urlList
=
array
();
if
(
USE_CACHE
)
{
$key
=
WebCacheConfig
::
KEY_WEB_PRODUCT_INDEX_BRANDINTRO
;
if
(
!
empty
(
$customOptions
[
'userInput'
]))
{
$key
.=
http_build_query
(
$customOptions
[
'userInput'
],
null
,
'&'
);
if
(
!
empty
(
$customOptions
[
'brandId'
]))
{
$key
.=
$customOptions
[
'brandId'
];
}
if
(
!
empty
(
$customOptions
[
'brandName'
]))
{
$key
.=
$customOptions
[
'brandName'
];
}
$channel
=
HomeModel
::
getSwitchChannel
();
//key加上性别参数
$key
.=
$channel
;
// 先尝试获取一级缓存(master), 有数据则直接返回.
$result
=
Cache
::
get
(
$key
,
'master'
);
if
(
!
empty
(
$result
))
{
...
...
Please
register
or
login
to post a comment