Authored by 郭成尧

Merge branch 'master' of git.yoho.cn:fe/YOHOBUYWAP

... ... @@ -311,73 +311,22 @@ class ShopProcess
*/
private static function hotProducts_APP($data)
{
$condition['productSkn'] = '';
$productSkn = array();
foreach ($data as $val) {
$condition['productSkn'] .= $val['productSkn'] . ',';
$productSkn[] = $val['productSkn'];
}
/* tar modified 160826 根据资源位接口返回的 skn 去查数据,查到后取商品数据,查不到取资源位接口数据 */
$hotProducts = SearchData::searchBySkn($condition);
if (isset($hotProducts['code']) && $hotProducts['code'] === 200 && isset($hotProducts['data']['product_list'])) {
foreach ($hotProducts['data']['product_list'] as $val) {
/* 取第一个设为默认商品 goods */
$defaultGoods = $val['goods_list'][0];
/* 判断是否设置了默认 goods,如果设置了就重新赋值 */
foreach ($val['goods_list'] as $key => $goods) {
if ($goods['is_default'] === 'Y') {
$defaultGoods = $goods;
}
}
$goodsCover = $val['goods_list'][0]['images_url'];
if (self::$channel == 1) {
$goodsCover = empty($defaultGoods['cover_1']) ? $defaultGoods['images_url'] : $defaultGoods['cover_1'];
}
if (self::$channel == 2) {
$goodsCover = empty($defaultGoods['cover_2']) ? $defaultGoods['images_url'] : $defaultGoods['cover_2'];
}
$product = DetailData::productBatch($productSkn);
if ($product['code'] === 200 && isset($product['data']['product_list'])) {
/* 如果还是没取到,取 product 默认图片 */
if (empty($goodsCover)) {
$goodsCover = $val['default_images'];
}
$goods = array(
'url' => Helpers::getUrlBySkc($val['product_id'], $val['goods_list'][0]['goods_id'], $val['cn_alphabet']),
'img' => Helpers::getImageUrl($goodsCover, 235, 314),
'productName' => $val['product_name'],
'salesPrice' => '¥' . $val['sales_price'],
'presentPrice' => '¥' . $val['sales_price']
);
if (!empty(self::$appVersion)) {
$goods['url'] .= '?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":' . $val['product_skn'] . '}}';
}
foreach ($product['data']['product_list'] as $key => $value) {
$goods = Helpers::formatProduct($value, false, false, false, 235, 314, self::$appVersion);
//店铺人气商品不须要其它标签、即将售罄
$goods['tags'] = array();
$goods['is_soon_sold_out'] = false;
$goods['tags']['is_hot'] = true;
self::$shopData['hotList'][] = $goods;
}
} else {
$productSkn = array();
foreach ($data as $val) {
$productSkn[] = $val['productSkn'];
}
$product = DetailData::productBatch($productSkn);
if ($product['code'] === 200 && isset($product['data']['product_list'])) {
foreach ($product['data']['product_list'] as $key => $value) {
$goods = Helpers::formatProduct($value, false, false, false, 235, 314, self::$appVersion);
//店铺人气商品不须要其它标签、即将售罄
$goods['tags'] = array();
$goods['is_soon_sold_out'] = false;
$goods['tags']['is_hot'] = true;
self::$shopData['hotList'][] = $goods;
}
}
}
}
... ...
... ... @@ -218,7 +218,7 @@ function hotData(callback) {
req.callBack = function(data) {
$('#popularity').append(data);
navInfo.hot.page++;
// myScroll.refresh();
myScroll.refresh();
lazyLoad($('#popularity .lazy'));
scH = $('#scroller').outerHeight();
searching = false;
... ... @@ -264,7 +264,7 @@ function tabChange(dom, index) {
$nav1.removeClass('fixed-top absolute');
$nav2.removeClass('fixed-top absolute');
}
// myScroll && myScroll.refresh();
myScroll && myScroll.refresh();
scH = $('#scroller').outerHeight();
if (!$nav1.hasClass('hide')) {
myScroll && myScroll.scrollTo(0, 0 - imgH);
... ... @@ -442,9 +442,9 @@ document.addEventListener('touchmove', function(e) {
//window ready 后重新refresh iscroll
$(window).ready(function() {
myScroll && myScroll.refresh();
imgH = $('#nav-top').outerHeight(true);
nav1H = $('#nav').outerHeight(true);
main1H = $('#nav-main').height(true);
imgH = $('#nav-top').outerHeight();
nav1H = $('#nav').outerHeight();
main1H = $('#nav-main').height();
main1oH = $('#nav-main').outerHeight(true);
nav2H = $('#list-nav').outerHeight(true);
main2oH = $('#goods-container').outerHeight(true);
... ... @@ -913,7 +913,7 @@ function postCollect(info) {
}
setTimeout(function() {
// myScroll.refresh();
myScroll.refresh();
scH = $('#scroller').outerHeight();
}, 500);
searching = false;
... ...
{
"name": "yohobuy",
"version": "4.9.25",
"version": "4.9.26",
"description": "yohobuy statics",
"keywords": [],
"homepage": "",
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets"
; 应用的版本号
application.version = "4.9.25"
application.version = "4.9.26"
; 网站SEO信息
application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停"
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets"
; 应用的版本号
application.version = "4.9.25"
application.version = "4.9.26"
; 网站SEO信息
application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停"
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets"
; 应用的版本号
application.version = "4.9.25"
application.version = "4.9.26"
; 网站SEO信息
application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停"
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets"
; 应用的版本号
application.version = "4.9.25"
application.version = "4.9.26"
; 网站SEO信息
application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停"
... ...