Authored by 毕凯

Merge branch 'develop/wap' of git.dev.yoho.cn:web/yohobuy into develop/wap

... ... @@ -24,17 +24,17 @@ class Yohobuy
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
//java API
const API_URL = 'http://apih5.yoho.cn/';
const API_URL2 = 'http://apih5.yoho.cn/';
const SERVICE_URL = 'http://serviceh5.yoho.cn/';
const YOHOBUY_URL = 'http://www.yohobuy.com/';
const API_OLD = 'http://api2.open.yohobuy.com/';
// const API_URL = 'http://apih5.yoho.cn/';
// const API_URL2 = 'http://apih5.yoho.cn/';
// const SERVICE_URL = 'http://serviceh5.yoho.cn/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
// const API_OLD = 'http://api2.open.yohobuy.com/';
/* 测试环境 */
// const API_URL = 'http://testapi.yoho.cn:28078/'; // 'http://192.168.102.205:8080/gateway/'
// const SERVICE_URL = 'http://testservice.yoho.cn:28077/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
// const API_OLD = 'http://test2.open.yohobuy.com/';
const API_URL = 'http://testapi.yoho.cn:28078/'; // 'http://192.168.102.205:8080/gateway/'
const SERVICE_URL = 'http://testservice.yoho.cn:28077/';
const YOHOBUY_URL = 'http://www.yohobuy.com/';
const API_OLD = 'http://test2.open.yohobuy.com/';
/* 预览环境 */
// const API_URL = 'http://preapi.yoho.cn/';
... ...
... ... @@ -25,18 +25,24 @@ var start = 0,
lazyLoad($('img.lazy'));
$('.nav-btn').on('touchstart', function(event) {
$sideNav.css('pointer-events', 'none');
$mobileWrap.addClass('menu-open');
$overlay.show().css('opacity', 0.3);
$sideNav.addClass('on');
openSideNav = true;
event.preventDefault();
event.stopPropagation();
openSideNav = true;
//设置boy高宽,页面不能上下滑动
$('body').css({
height: $(window).height(),
overflow: 'hidden'
});
setTimeout(function() {
$sideNav.css('pointer-events', 'auto');
}, 400);
return false;
});
... ...
... ... @@ -115,7 +115,7 @@ class UserModel
// 处理个人中心页面优选新品数据
if (!empty($preferenceData['data'])) {
foreach ($preferenceData['data'] as $value) {
$value = Helpers::formatProduct($value, false, true, true, 299, 388, false, false);
$value = Helpers::formatProduct($value, false, true, true, 299, 388, false);
if (false !== $value) {
$result['recommendList'][] = $value;
}
... ... @@ -190,7 +190,7 @@ class UserModel
// 处理用户收藏的商品数据
do {
// 开始就没获取到数据或者获取的数据为空时的处理
if (!isset($favProduct['data']['product_list']) && $page == 1) {
if ((!$favProduct || isset($favProduct['data']['product_list']) && empty($favProduct['data']['product_list'])) && $page == 1) {
break;
}
... ... @@ -253,7 +253,7 @@ class UserModel
// 处理用户收藏的品牌数据
do {
// 开始就没获取到数据或者获取的数据为空时的处理
if (!isset($favBrand['data']['brand_list']) && $page == 1) {
if ((!$favBrand || isset($favBrand['data']['total']) && empty($favBrand['data']['total'])) && $page == 1) {
break;
}
... ...
... ... @@ -220,7 +220,7 @@ class IndexController extends AbstractAction
$data['goodList'] += $condition;
$data['pageFooter'] = true;
if ($title === '') {
if (empty($title)) {
$title = $domain;
}
$this->setTitle($title);
... ...