Authored by whb

index,js

... ... @@ -421,8 +421,35 @@ window.submitSearch = function() {
return false;
}
}
}
};
/**
* 增加关键字
* @return {[type]} [description]
*/
function actionAddKeyWords() {
var keywords = $('#nav_keyword').text();
var defaultsearch = 'vans';
var $query_key = $('#query_key');
if (keywords !== '') {
$query_key.css({
'color': '#000'
});
$query_key.val(keywords);
} else {
$query_key.css({
'color': '#e0e0e0'
});
$query_key.val(defaultsearch);
$query_key.on('focus', function(e) {
$query_key.css({
'color': '#000'
});
$query_key.val('');
})
}
}
/**
* 定义购物车扩展
*/
... ... @@ -1640,6 +1667,7 @@ function actionSearch() {
* @return {[type]} [description]
*/
function actionLoginState(_data) {
console.log(_data);
var timestamp = new Date().getTime();
var noLoginHtml = '<span>Hi~</span>[<a href="http://www.yohobuy.com/signin.html" class="list-a login-out ">' +
'请登录</a>]&nbsp;' +
... ... @@ -1806,6 +1834,7 @@ function init() {
actionListenCartMore(); //
actionLoginInfo(); //获取登录信息
actionCover(); //初次登录弹框
actionAddKeyWords();//增加关键字
}
init();
... ... @@ -5920,11 +5949,11 @@ $('#captcha').keyup(function() {
if (res.code === 200) {
//添加验证码正确验证
$next.removeClass('disable').removeAttr('disabled');
$next.removeClass('disable').attr('href', res.data);
$errTip.addClass('hide');
$(that).removeClass('error');
} else {
$next.addClass('disable').attr('disabled', true);
$next.addClass('disable');
$errTip.removeClass('hide').find('em').text('验证码输入错误');
$(that).addClass('error');
}
... ...
This diff could not be displayed because it is too large.