Authored by 梁志锋

Merge remote-tracking branch 'remotes/origin/release/4.4'

... ... @@ -36,6 +36,10 @@ class ShopProcess
}
self::$key($val);
}
if (self::$single) {
self::$shopData['favId'] = self::$shopData['shopId'];
self::$shopData['shopId'] = '';
}
return self::$shopData;
}
... ... @@ -138,7 +142,6 @@ class ShopProcess
if ($brandNumber < 2) {
self::$brandId = self::$shopData['brand'] = $data[0]['id'];
self::$single = true;
// self::$shopData['shopId']= '';
return;
}
foreach ($data as $val) {
... ...
... ... @@ -32,7 +32,8 @@ var $subNav = $('.home-sub-nav'),
$dgc = $($goodsChildren.get(2)),
shopId = $('input[name="shop_id"]').val(),
appVersion = $('input[name="app_version"]').val(),
brand = $('input[name="brand"]').val();
brand = $('input[name="brand"]').val(),
favId = $('input[name="favId"]').val();
var winH = $(window).height(),
noResult = '<p class="no-result">未找到相关搜索结果</p>';
... ... @@ -147,10 +148,10 @@ function getPageGoods(info) {
function getParam(req) {
if (brand) {
req.data.brand = brand;
} else {
if (shopId) {
req.data.shop_id = shopId;
}
}
if (shopId) {
req.data.shop_id = shopId;
}
}
... ... @@ -466,10 +467,9 @@ function search(opt) {
if (brand) {
setting.brand = brand;
} else {
if (shopId) {
setting.shop_id = shopId;
}
}
if (shopId) {
setting.shop_id = shopId;
}
searching = true;
... ... @@ -822,7 +822,7 @@ function collectShop() {
qew.url = '/product/index/shopFav';
qew.data = {
shop_id: shopId,
shop_id: favId ? favId : shopId,
app_version: appVersion
};
postCollect(qew);
... ... @@ -833,7 +833,7 @@ function cancelShop() {
qew.url = '/product/index/cancelShopFav';
qew.data = {
shop_id: shopId,
shop_id: favId ? favId : shopId,
app_version: appVersion
};
postCollect(qew);
... ...
... ... @@ -8,6 +8,7 @@
<input type="hidden" name="app_version" value="{{appVersion}}">
<input type="hidden" name="shop_id" value="{{shopId}}">
<input type="hidden" name="brand" value="{{brand}}">
<input type="hidden" name="favId" value="{{favId}}">
{{else}}
<div class="search-area">
<div id="search-input" class="search-input">
... ... @@ -17,6 +18,7 @@
<input type="hidden" name="shop_id" value="{{shopId}}">
<input type="hidden" name="app_version" value="{{appVersion}}">
<input type="hidden" name="brand" value="{{brand}}">
<input type="hidden" name="favId" value="{{favId}}">
<i class="clear-input iconfont hide">&#xe626;</i>
<button id="search" class="search buriedpoint" type="submit">搜索</button>
</form>
... ...
... ... @@ -4,7 +4,7 @@
<ul class="swiper-wrapper">
{{# list}}
<li class="swiper-slide">
<a href="{{url}}">
<a href="{{#if url}}{{url}}{{else}}javascript:;{{/if}}">
<img class="swiper-lazy" data-src="{{img}}">
</a>
<div class="swiper-lazy-preloader"></div>
... ... @@ -19,7 +19,7 @@
</div>
{{^}}
<div class="banner-top-single">
<a href={{url}}>
<a href="{{#if url}}{{url}}{{else}}javascript:;{{/if}}">
<img class="img" src="{{img}}">
</a>
</div>
... ...