Authored by Rock Zhang

Merge branch 'develop/wap' into beta/wap

Conflicts:
	static/js/me/logistic.js
... ... @@ -227,4 +227,4 @@ $cartNav.on('touchstart', 'li', function(e) {
});
//提前触发lazyload
$(window).scrollTop(1).scrollTop(0);
$(window).scrollTop(1).scrollTop(0);
\ No newline at end of file
... ...
... ... @@ -29,8 +29,6 @@ var brandsData,
loading.showLoadingMask();
lazyLoad($('img.lazy'));
$('.yoho-header').css({
'z-index': 2,
... ...
{{> layout/header}}
<div class="yoho-coin-detail-page yoho-page">
{{#unless currency}}
<div class="money">你拥有的有货币:<span>0</span></div>
{{/unless}}
<ul class="coin-detail"></ul>
</div>
{{> layout/footer}}
... ...
... ... @@ -56,13 +56,9 @@
</span>
{{/if}}
{{#unless isGift}}
<span class="iconfont icon-edit" data-count="{{count}}">&#xe61e;</span>
{{/unless}}
{{#unless isGift}}
<span class="iconfont icon-del" data-count="{{count}}">&#xe621;</span>
{{/unless}}
</p>
<p class="la-tag row clearfix">
{{#if lowStocks}}
... ...
... ... @@ -369,7 +369,7 @@ class HomeController extends AbstractAction
if ($id !== null) { // 编辑地址
// 设置网站标题
$this->setTitle('编辑地址');
$this->setNavHeader('编辑地址');
$this->setNavHeader('编辑地址', true, false);
$data['id'] = $id;
// 获取特定地址的数据
... ... @@ -377,7 +377,7 @@ class HomeController extends AbstractAction
} else {
// 设置网站标题
$this->setTitle('添加地址');
$this->setNavHeader('添加地址');
$this->setNavHeader('添加地址', true, false);
}
$this->_view->display('address-act', $data);
... ... @@ -457,7 +457,7 @@ class HomeController extends AbstractAction
{
// 设置网站标题
$this->setTitle('在线客服');
$this->setNavHeader('在线客服', Helpers::url('/home'), SITE_MAIN);
$this->setNavHeader('在线客服', Helpers::url('/home'), false);
$uid = $this->getUid(false);
$service = Home\OnlineModel::getOnlineServiceInfo();
... ... @@ -497,7 +497,7 @@ class HomeController extends AbstractAction
);
$this->setTitle('在线客服');
$this->setNavHeader($cateName, true, '');
$this->setNavHeader($cateName, true, false);
$this->_view->display('online-service-detail', $service);
}
... ...
... ... @@ -301,31 +301,49 @@ class UserModel
$records = UserData::browseRecord($uid, $udid, $page, $limit);
if (!$records) {
$result['walkwayUrl'] = Helpers::url('/product/new');
$result['noRecord'] = true;
return $result;
}
// 处理数据
if (isset($records['data']['product_list'])) {
do {
if (!$records) {
$result['walkwayUrl'] = Helpers::url('/product/new');
$result['noRecord'] = true;
break;
}
if (!isset($records['data']['product_list'])) {
break;
}
// 不能再查到结果了
if ($page == 1 && $records['data']['total'] === 0) {
$result['walkwayUrl'] = Helpers::url('/product/new');
$result['noRecord'] = true;
} else {
$data = $records['data']['product_list'];
foreach ($data as &$val) {
$val['link'] = Helpers::url('/product/show_' . $val['product_skn'] . '.html');
$val['image'] = !empty($val['image']) ? Helpers::getImageUrl($val['image'], 447, 596) : '';
$val['sales_price'] = Helpers::transPrice($val['sales_price']);
$val['market_price'] = ($val['market_price'] - $val['sales_price'] > 0) ? Helpers::transPrice($val['market_price']) : false;
break;
}
$data = $records['data']['product_list'];
$allRecords = array();
$record = array();
foreach ($data as &$val) {
// 排除下架的商品
if ($val['status'] == 0) {
continue;
}
!empty($data) && $result['browseRecord'] = $data;
$record = array();
$record['product_name'] = $val['product_name'];
$record['product_id'] = $val['product_id'];
$record['link'] = Helpers::url('/product/show_' . $val['product_skn'] . '.html');
$record['image'] = !empty($val['image']) ? Helpers::getImageUrl($val['image'], 447, 596) : '';
$record['sales_price'] = Helpers::transPrice($val['sales_price']);
$record['market_price'] = ($val['market_price'] - $val['sales_price'] > 0) ? Helpers::transPrice($val['market_price']) : false;
$record['storage'] = $val['storage'];
$allRecords[] = $record;
}
}
if (!empty($allRecords)) {
$result['browseRecord'] = $allRecords;
}
} while(false);
return $result;
}
... ...
... ... @@ -36,7 +36,8 @@ class NewsaleModel
/**
* 获取新品到着的焦点图资源数据
*
*
* @param int $channel
* @return array
*/
public static function getNewFocus($channel)
... ... @@ -64,7 +65,8 @@ class NewsaleModel
/**
* 获取折扣专区的焦点图资源数据
*
*
* @param int $channel
* @return array
*/
public static function getSaleFocus($channel)
... ... @@ -164,8 +166,8 @@ class NewsaleModel
/**
* 顶部焦点图缓存控制
* @param const $cacheKey 缓存常量值
* @param const $codeKey 顶部焦点图位置码
* @param string $cacheKey 缓存常量值
* @param string $codeKey 顶部焦点图位置码
* @return array 焦点图数据
*/
private static function cacheControl($cacheKey, $codeKey)
... ...
... ... @@ -219,7 +219,7 @@ class DetailController extends AbstractAction
}
$this->setTitle('我要咨询');
$this->setNavHeader('我要咨询');
$this->setNavHeader('我要咨询', true, false);
$productId = $this->get('product_id', 0);
... ...
... ... @@ -51,6 +51,7 @@ class NewsaleController extends AbstractAction
$this->setNavHeader('Sale');
$channel = Helpers::getChannelByCookie();
$gender = $this->get('gender', '1,2,3');
// 设置一些默认参数
$data = array(
'discountPage' => true,
... ... @@ -59,7 +60,7 @@ class NewsaleController extends AbstractAction
'pageFooter' => true,
'brand' => '0',
'sort' => '0',
'gender' => Helpers::getGenderByCookie(),
'gender' => $gender,
'price' => '0',
'size' => '0',
'discount' => '0.1,0.9',
... ...