Authored by Rock Zhang

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

... ... @@ -70,6 +70,8 @@ function searchResult() {
i = 0,
html = '';
if (keyword !== '') {
// 遍历首字母搜索
$.each(brandsData, function(k, v) {
if ($.isArray(v)) {
... ... @@ -107,6 +109,7 @@ function searchResult() {
html += brandHtml.join('');
});
}
// 插入 dom,绑定事件
$('.search-result').html(html);
... ... @@ -118,7 +121,6 @@ if ($('.brand-search-page').length) {
$keyword.on('input', function() {
if ($keyword.val().length) {
searchResult();
$icon.css('color', '#000');
$(this).closest('.search-box').css('width', '11.25rem');
$('.search-action').show();
... ... @@ -127,6 +129,7 @@ if ($('.brand-search-page').length) {
$(this).closest('.search-box').css('width', '12.5rem');
$('.search-action').hide();
}
searchResult();
}).focus();
clearTextHammer = new Hammer($('.clear-text')[0]);
... ...
... ... @@ -19,6 +19,8 @@ var tip = require('../../plugin/tip');
var brandId = $('#brand-info').data('id');
var jumpToApp = $('#jump-to-app').val();
var mIntro, aIntro;
var moreHammer, likeHammer;
... ... @@ -71,6 +73,12 @@ likeHammer.on('tap', function(e) {
var opt = 'ok',
$this = $(e.target);
//jumpToApp = 1表示APP未登录的情况,此时不发送ajax请求而由a链接直接跳转APP
if (jumpToApp === '1') {
return;
}
e.preventDefault();
if ($this.hasClass('like')) {
... ...
.good-list-page {
.search-input {
position: relative;
padding: 7px 46px 7px 15px;
padding: 7px 15px;
background: #f8f8f8;
> form {
position: relative;
}
.search-icon {
position: absolute;
font-size: 12px;
top: 16px;
left: 24px;
top: 9px;
left: 10px;
}
input {
height: 30px;
width: 95%;
width: 85%;
border-radius: 15px;
text-indent: 26px;
background: #fff;
... ... @@ -22,14 +26,13 @@
.clear-input {
position: absolute;
top: 12px;
top: 5px;
right: 50px;
}
.search {
position: absolute;
top: 12px;
right: .4rem;
float: right;
margin-top: 6px;
border: none;
background: transparent;
font-size: 16px;
... ...
... ... @@ -52,6 +52,8 @@
</div>
{{/if}}
<input id="jump-to-app" type="hidden" value={{jumpToApp}}>
{{!-- wx-share --}}
<input id="shareLink" type="hidden" value={{shareLink}}>
<input id="shareImg" type="hidden" value={{shareImg}}>
... ...