Merge branch 'master' of git.yoho.cn:fe/YOHOBUYWAP
Showing
8 changed files
with
21 additions
and
72 deletions
compile/m.yohobuy.com/4.9.26/test.md
0 → 100644
@@ -311,73 +311,22 @@ class ShopProcess | @@ -311,73 +311,22 @@ class ShopProcess | ||
311 | */ | 311 | */ |
312 | private static function hotProducts_APP($data) | 312 | private static function hotProducts_APP($data) |
313 | { | 313 | { |
314 | - $condition['productSkn'] = ''; | ||
315 | - | 314 | + $productSkn = array(); |
316 | foreach ($data as $val) { | 315 | foreach ($data as $val) { |
317 | - $condition['productSkn'] .= $val['productSkn'] . ','; | 316 | + $productSkn[] = $val['productSkn']; |
318 | } | 317 | } |
319 | 318 | ||
320 | - /* tar modified 160826 根据资源位接口返回的 skn 去查数据,查到后取商品数据,查不到取资源位接口数据 */ | ||
321 | - $hotProducts = SearchData::searchBySkn($condition); | ||
322 | - | ||
323 | - if (isset($hotProducts['code']) && $hotProducts['code'] === 200 && isset($hotProducts['data']['product_list'])) { | ||
324 | - foreach ($hotProducts['data']['product_list'] as $val) { | ||
325 | - | ||
326 | - /* 取第一个设为默认商品 goods */ | ||
327 | - $defaultGoods = $val['goods_list'][0]; | ||
328 | - | ||
329 | - /* 判断是否设置了默认 goods,如果设置了就重新赋值 */ | ||
330 | - foreach ($val['goods_list'] as $key => $goods) { | ||
331 | - if ($goods['is_default'] === 'Y') { | ||
332 | - $defaultGoods = $goods; | ||
333 | - } | ||
334 | - } | ||
335 | - | ||
336 | - $goodsCover = $val['goods_list'][0]['images_url']; | ||
337 | - | ||
338 | - if (self::$channel == 1) { | ||
339 | - $goodsCover = empty($defaultGoods['cover_1']) ? $defaultGoods['images_url'] : $defaultGoods['cover_1']; | ||
340 | - } | ||
341 | - | ||
342 | - if (self::$channel == 2) { | ||
343 | - $goodsCover = empty($defaultGoods['cover_2']) ? $defaultGoods['images_url'] : $defaultGoods['cover_2']; | ||
344 | - } | 319 | + $product = DetailData::productBatch($productSkn); |
320 | + if ($product['code'] === 200 && isset($product['data']['product_list'])) { | ||
345 | 321 | ||
346 | - /* 如果还是没取到,取 product 默认图片 */ | ||
347 | - if (empty($goodsCover)) { | ||
348 | - $goodsCover = $val['default_images']; | ||
349 | - } | ||
350 | - | ||
351 | - $goods = array( | ||
352 | - 'url' => Helpers::getUrlBySkc($val['product_id'], $val['goods_list'][0]['goods_id'], $val['cn_alphabet']), | ||
353 | - 'img' => Helpers::getImageUrl($goodsCover, 235, 314), | ||
354 | - 'productName' => $val['product_name'], | ||
355 | - 'salesPrice' => '¥' . $val['sales_price'], | ||
356 | - 'presentPrice' => '¥' . $val['sales_price'] | ||
357 | - ); | ||
358 | - if (!empty(self::$appVersion)) { | ||
359 | - $goods['url'] .= '?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":' . $val['product_skn'] . '}}'; | ||
360 | - } | 322 | + foreach ($product['data']['product_list'] as $key => $value) { |
323 | + $goods = Helpers::formatProduct($value, false, false, false, 235, 314, self::$appVersion); | ||
324 | + //店铺人气商品不须要其它标签、即将售罄 | ||
325 | + $goods['tags'] = array(); | ||
326 | + $goods['is_soon_sold_out'] = false; | ||
327 | + $goods['tags']['is_hot'] = true; | ||
361 | self::$shopData['hotList'][] = $goods; | 328 | self::$shopData['hotList'][] = $goods; |
362 | } | 329 | } |
363 | - } else { | ||
364 | - $productSkn = array(); | ||
365 | - foreach ($data as $val) { | ||
366 | - $productSkn[] = $val['productSkn']; | ||
367 | - } | ||
368 | - | ||
369 | - $product = DetailData::productBatch($productSkn); | ||
370 | - if ($product['code'] === 200 && isset($product['data']['product_list'])) { | ||
371 | - | ||
372 | - foreach ($product['data']['product_list'] as $key => $value) { | ||
373 | - $goods = Helpers::formatProduct($value, false, false, false, 235, 314, self::$appVersion); | ||
374 | - //店铺人气商品不须要其它标签、即将售罄 | ||
375 | - $goods['tags'] = array(); | ||
376 | - $goods['is_soon_sold_out'] = false; | ||
377 | - $goods['tags']['is_hot'] = true; | ||
378 | - self::$shopData['hotList'][] = $goods; | ||
379 | - } | ||
380 | - } | ||
381 | } | 330 | } |
382 | } | 331 | } |
383 | 332 |
@@ -218,7 +218,7 @@ function hotData(callback) { | @@ -218,7 +218,7 @@ function hotData(callback) { | ||
218 | req.callBack = function(data) { | 218 | req.callBack = function(data) { |
219 | $('#popularity').append(data); | 219 | $('#popularity').append(data); |
220 | navInfo.hot.page++; | 220 | navInfo.hot.page++; |
221 | - // myScroll.refresh(); | 221 | + myScroll.refresh(); |
222 | lazyLoad($('#popularity .lazy')); | 222 | lazyLoad($('#popularity .lazy')); |
223 | scH = $('#scroller').outerHeight(); | 223 | scH = $('#scroller').outerHeight(); |
224 | searching = false; | 224 | searching = false; |
@@ -264,7 +264,7 @@ function tabChange(dom, index) { | @@ -264,7 +264,7 @@ function tabChange(dom, index) { | ||
264 | $nav1.removeClass('fixed-top absolute'); | 264 | $nav1.removeClass('fixed-top absolute'); |
265 | $nav2.removeClass('fixed-top absolute'); | 265 | $nav2.removeClass('fixed-top absolute'); |
266 | } | 266 | } |
267 | - // myScroll && myScroll.refresh(); | 267 | + myScroll && myScroll.refresh(); |
268 | scH = $('#scroller').outerHeight(); | 268 | scH = $('#scroller').outerHeight(); |
269 | if (!$nav1.hasClass('hide')) { | 269 | if (!$nav1.hasClass('hide')) { |
270 | myScroll && myScroll.scrollTo(0, 0 - imgH); | 270 | myScroll && myScroll.scrollTo(0, 0 - imgH); |
@@ -442,9 +442,9 @@ document.addEventListener('touchmove', function(e) { | @@ -442,9 +442,9 @@ document.addEventListener('touchmove', function(e) { | ||
442 | //window ready 后重新refresh iscroll | 442 | //window ready 后重新refresh iscroll |
443 | $(window).ready(function() { | 443 | $(window).ready(function() { |
444 | myScroll && myScroll.refresh(); | 444 | myScroll && myScroll.refresh(); |
445 | - imgH = $('#nav-top').outerHeight(true); | ||
446 | - nav1H = $('#nav').outerHeight(true); | ||
447 | - main1H = $('#nav-main').height(true); | 445 | + imgH = $('#nav-top').outerHeight(); |
446 | + nav1H = $('#nav').outerHeight(); | ||
447 | + main1H = $('#nav-main').height(); | ||
448 | main1oH = $('#nav-main').outerHeight(true); | 448 | main1oH = $('#nav-main').outerHeight(true); |
449 | nav2H = $('#list-nav').outerHeight(true); | 449 | nav2H = $('#list-nav').outerHeight(true); |
450 | main2oH = $('#goods-container').outerHeight(true); | 450 | main2oH = $('#goods-container').outerHeight(true); |
@@ -913,7 +913,7 @@ function postCollect(info) { | @@ -913,7 +913,7 @@ function postCollect(info) { | ||
913 | } | 913 | } |
914 | 914 | ||
915 | setTimeout(function() { | 915 | setTimeout(function() { |
916 | - // myScroll.refresh(); | 916 | + myScroll.refresh(); |
917 | scH = $('#scroller').outerHeight(); | 917 | scH = $('#scroller').outerHeight(); |
918 | }, 500); | 918 | }, 500); |
919 | searching = false; | 919 | searching = false; |
@@ -50,7 +50,7 @@ application.template.ext = ".phtml" | @@ -50,7 +50,7 @@ application.template.ext = ".phtml" | ||
50 | application.assets.path = ROOT_PATH "/assets" | 50 | application.assets.path = ROOT_PATH "/assets" |
51 | 51 | ||
52 | ; 应用的版本号 | 52 | ; 应用的版本号 |
53 | -application.version = "4.9.25" | 53 | +application.version = "4.9.26" |
54 | 54 | ||
55 | ; 网站SEO信息 | 55 | ; 网站SEO信息 |
56 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" | 56 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" |
@@ -50,7 +50,7 @@ application.template.ext = ".phtml" | @@ -50,7 +50,7 @@ application.template.ext = ".phtml" | ||
50 | application.assets.path = ROOT_PATH "/assets" | 50 | application.assets.path = ROOT_PATH "/assets" |
51 | 51 | ||
52 | ; 应用的版本号 | 52 | ; 应用的版本号 |
53 | -application.version = "4.9.25" | 53 | +application.version = "4.9.26" |
54 | 54 | ||
55 | ; 网站SEO信息 | 55 | ; 网站SEO信息 |
56 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" | 56 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" |
@@ -50,7 +50,7 @@ application.template.ext = ".phtml" | @@ -50,7 +50,7 @@ application.template.ext = ".phtml" | ||
50 | application.assets.path = ROOT_PATH "/assets" | 50 | application.assets.path = ROOT_PATH "/assets" |
51 | 51 | ||
52 | ; 应用的版本号 | 52 | ; 应用的版本号 |
53 | -application.version = "4.9.25" | 53 | +application.version = "4.9.26" |
54 | 54 | ||
55 | ; 网站SEO信息 | 55 | ; 网站SEO信息 |
56 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" | 56 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" |
@@ -50,7 +50,7 @@ application.template.ext = ".phtml" | @@ -50,7 +50,7 @@ application.template.ext = ".phtml" | ||
50 | application.assets.path = ROOT_PATH "/assets" | 50 | application.assets.path = ROOT_PATH "/assets" |
51 | 51 | ||
52 | ; 应用的版本号 | 52 | ; 应用的版本号 |
53 | -application.version = "4.9.25" | 53 | +application.version = "4.9.26" |
54 | 54 | ||
55 | ; 网站SEO信息 | 55 | ; 网站SEO信息 |
56 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" | 56 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" |
-
Please register or login to post a comment