Authored by 周少峰

Merge branch 'release/5.0.0'

... ... @@ -483,7 +483,10 @@ class SearchData
*/
public static function getBrandListUrl($param = array())
{
return Yohobuy::httpBuildQuery(SearchData::getUrl('brand'), $param);
$param = Yohobuy::param();
$param['method'] = 'web.search.favorBrand';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::httpBuildQuery(API_URL, $param);
}
/**
... ... @@ -609,4 +612,23 @@ class SearchData
return Yohobuy::get(API_URL, $param);
}
public static function webSearchByCondition(array $condition, $isOnlyUrl = false) {
$result = array();
if(!empty($condition)) {
$param = Yohobuy::param();
$param['method'] = 'web.search.search';
$param['sales'] = 'Y';
$param['outlets'] = 2;
$param['stocknumber'] = 1;
$param += $condition;
$param['client_secret'] = Sign::getSign($param);
if($isOnlyUrl) {
return Yohobuy::httpBuildQuery(API_URL, $param);
}
$result = Yohobuy::get(API_URL, $param);
}
return $result;
}
}
\ No newline at end of file
... ...
... ... @@ -470,6 +470,14 @@ class HelperSearch
return $result;
}
$params = self::$params;
do {
if (isset($params['ageLevel']) && $params['ageLevel'] == 1) {
break;
}
if (count($filter['ageLevel']) === 1 && $filter['ageLevel'][0]['name'] === '成人') {
return $result;
}
}while(false);
$ageLevel = isset($params['ageLevel']) ? $params['ageLevel'] : '';
if (isset($params['ageLevel'])) {
unset($params['ageLevel']);
... ... @@ -477,8 +485,7 @@ class HelperSearch
if (self::$total == 0) {
return $result;
}
sort($filter['ageLevel']);
foreach ($filter['ageLevel'] as $key => $val) {
if (intval($val['id']) === $ageLevel) {
self::$selected['ageLevel'] = array(
... ...
... ... @@ -359,7 +359,7 @@ class Helpers
$result['id'] = $articleData['id'];
$result['classification'] = $articleData['category_name'];
$result['isReco'] = $articleData['is_recommended'] ? true : false;
$result['url'] = $isApp ? $articleData['url'] : self::url('/'.$articleData['id'].'.html', array(), 'guang');
$result['url'] = $articleData['url'] ? $articleData['url'] : self::url('/'.$articleData['id'].'.html', array(), 'guang');
$result['img'] = self::getImageUrl($articleData['src'], $width, $height, 1);
$result['isSquareImg'] = $isSquareImage;
$result['title'] = $articleData['title'];
... ...
... ... @@ -48,20 +48,6 @@
</div>
{{/if}}
{{#if ageLevel}}
<div class="channel section">
<span class="title">年龄:</span>
<div class="attr-content clearfix">
{{#each ageLevel}}
<a class="attr {{#if checked}}checked{{/if}}" href="{{href}}">
{{name}}
</a>
{{/each}}
</div>
</div>
{{/if}}
{{#if sort}}
<div class="sort section">
<span class="title">分类:</span>
... ... @@ -180,6 +166,20 @@
</div>
{{/ brand}}
{{#if ageLevel}}
<div class="channel section">
<span class="title">人群:</span>
<div class="attr-content clearfix">
{{#each ageLevel}}
<a class="attr {{#if checked}}checked{{/if}}" href="{{href}}">
{{name}}
</a>
{{/each}}
</div>
</div>
{{/if}}
{{#if price}}
<div class="price section">
<span class="title">价格:</span>
... ...

26.6 KB | W: | H:

20.7 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

11.4 KB | W: | H:

13.9 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

50.1 KB | W: | H:

48.4 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
{
"name": "web-yohobuy",
"version": "4.9.19",
"version": "5.0.0",
"description": "web yohobuy static",
"keywords": [],
"homepage": "",
... ...
... ... @@ -75,9 +75,9 @@ class IndexModel
$data = ListData::category();
foreach($data['data'] as $category)
{
if ($category['name'] == '专题') {
continue;
}
// if ($category['name'] == '专题') {
// continue;
// }
$ret[] = array('typeId' => $category['id'],'type' => $category['name'],
'isActive' => $currentSortId == $category['id'] ? true :false,
... ... @@ -153,7 +153,7 @@ class IndexModel
if(!empty($data['data'])) {
foreach($data['data'] as $key => $article) {
$list[] = array(
'url' => Helpers::url('/'.$article['id'].'.html', '', 'guang'),
'url' => $article['url'] ? $article['url'] : Helpers::url('/'.$article['id'].'.html', '', 'guang'),
'title' => $article['title']
);
if (isset($article['src']) && !empty($article['src'])) {
... ...
... ... @@ -134,7 +134,7 @@ class InfoModel
foreach ($data['relate'] as $key => $val) {
$result['relatedPost'][$key]['title'] = $val['title'];
$result['relatedPost'][$key]['thumb'] = Images::getImageUrl($val['thumb'], 264, 173, 1);
$result['relatedPost'][$key]['url'] = Helpers::url('/'.$val['id'].'.html', array(), 'guang');
$result['relatedPost'][$key]['url'] = isset($val['url']) && $val['url'] ? $val['url'] : Helpers::url('/'.$val['id'].'.html', array(), 'guang');
}
}
//精彩推荐
... ... @@ -142,7 +142,7 @@ class InfoModel
foreach ($data['recommend'] as $key => $val) {
$result['exRecos'][$key]['title'] = $val['title'];
$result['exRecos'][$key]['img'] = isset($val['src']) ? Images::getImageUrl($val['src'], 90, 60) : '';
$result['exRecos'][$key]['url'] = Helpers::url('/'.$val['id'].'.html', array(), 'guang');
$result['exRecos'][$key]['url'] = isset($val['url']) && $val['url'] ? $val['url'] : Helpers::url('/'.$val['id'].'.html', array(), 'guang');
}
}
//热门标签
... ... @@ -229,7 +229,7 @@ class InfoModel
$arr[$val['id']]=$val['src'];
}
if (!empty($productSkn)) {
$product = SearchData::searchElasticByCondition(array('query'=> implode(',', $productSkn)));
$product = SearchData::webSearchByCondition(array('query'=> implode(',', $productSkn), 'viewNum' => 100));
if (isset($product['data']['product_list'])) {
$result = self::formatProduct($product['data']['product_list'], $arr);
}
... ...
... ... @@ -65,8 +65,9 @@ class IndexModel
$url['fav_brand'] = SearchData::getBrandListUrl();
//新品上架
$productParam['new'] = 'Y';
$productParam['order'] = 's_t_desc';
$productParam['viewNum'] = 10;
$url['new'] = SearchData::getProductUrl($productParam);
$url['new'] = SearchData::webSearchByCondition($productParam, true);
//调用接口数据
$data = Yohobuy::getMulti($url);
//格式化数据
... ...
... ... @@ -398,7 +398,7 @@ class SearchModel
$param['query'] = implode(',', $skn);
$skn = array_flip($skn);
$param['viewNum'] = $limit;
$data = SearchData::searchElasticByCondition($param);
$data = SearchData::webSearchByCondition($param);
if (!isset($data['code']) || $data['code'] != 200 || !isset($data['data']['product_list']) || empty($data['data']['product_list'])) {
return $result;
}
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets/web"
; 应用的版本号
application.version = "4.9.19"
application.version = "5.0.0"
; 网站SEO信息
application.seo.title = "YOHO!BUY 有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证"
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets/web"
; 应用的版本号
application.version = "4.9.19"
application.version = "5.0.0"
; 网站SEO信息
application.seo.title = "YOHO!BUY 有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证"
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets/web"
; 应用的版本号
application.version = "4.9.19"
application.version = "5.0.0"
; 网站SEO信息
application.seo.title = "YOHO!BUY 有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证"
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets/web"
; 应用的版本号
application.version = "4.9.19"
application.version = "5.0.0"
; 网站SEO信息
application.seo.title = "YOHO!BUY 有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证"
... ...
... ... @@ -21,7 +21,7 @@ define('USE_INTER_FACE_SHUNT', false);//分流开关
//define('API_OLD', 'http://test2.open.yohobuy.com/');
#dev环境
define('API_URL', 'http://dev-api.yohops.com:9999/');
define('API_URL', 'http://api-test4.yohops.com:9999');
define('SERVICE_URL', 'http://dev-service.yohops.com:9999/');
define('YOHOBUY_URL', 'http://www.yohobuy.com/');
define('SERVICE_NOTIFY', 'http://test2.open.yohobuy.com/');
... ...