Authored by whb

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

... ... @@ -124,7 +124,7 @@
<div class="search float-left {{searchcate}}" >
<form action="http://search.yohobuy.com" method="get" id="searchForm">
<span class="searchspan">
<input class="searchinput" type="text" name="keyword" id="query_key" autocomplete="off" x-webkit-speech="" lang="zh-CN" x-webkit-grammar="builtin:translate" value="" onfocus="if(this.value==this.defaultValue){this.value='';this.style.color='#333'}" onblur="if(this.value==''){this.value=this.defaultValue;this.style.color='#999'}" maxlength="30"></span>
<input class="searchinput" type="text" name="query" id="query_key" autocomplete="off" x-webkit-speech="" lang="zh-CN" x-webkit-grammar="builtin:translate" value="" onfocus="if(this.value==this.defaultValue){this.value='';this.style.color='#333'}" onblur="if(this.value==''){this.value=this.defaultValue;this.style.color='#999'}" maxlength="30"></span>
<a class="icon-search" href="javascript:submitSearch();"></a>
<ul class="search-list"></ul>
</form>
... ...
... ... @@ -75,7 +75,8 @@ function getSource(column, postition, event) {
} catch (e) {}
}
function submitSearch() {
window.submitSearch = function() {
var $keywordinput = $('#query_key').val();
var column = 'Search';
var postition = 'Head Search';
... ... @@ -97,6 +98,7 @@ function submitSearch() {
}
}
}
/**
* 定义购物车扩展
*/
... ... @@ -185,7 +187,7 @@ function actionGoodsCart() {
listIndex = (listIndex + 1) % queryNum;
getText(this);
} else if (event.which === 13) {
submitSearch();
window.submitSearch();
} else {
getKeywords(this);
}
... ...
... ... @@ -17,7 +17,7 @@ $sc.click(function() {
$.post('/passport/back/sendbackmobile', {
mobile: $('#mobile').val(),
area: $('#area').val(),
verifyCode: $('#captchaPic').val(),
verifyCode: $('#captchaPic').val()
}, function(jsonData) {
if (jsonData.code === 200) {
$errTip.hide();
... ... @@ -71,17 +71,33 @@ itime = setInterval(function() {
$('#captcha').keyup(function() {
var v = $.trim($(this).val());
if (v !== '') {
var v = $.trim($(this).val()),
that = this;
if (v.length === 4) {
$.ajax({
type: 'POST',
url: '/passport/back/backmobile',
dataType: 'json',
data: {
verifyCode: $('#captcha').val(),
area: $('#area').val(),
mobile: $('#mobile').val()
},
success: function(res) {
if (res.code === 200) {
//添加验证码正确验证
//$next.removeClass('disable').prop('disabled', false);
$next.removeClass('disable').removeAttr('disabled');
$errTip.addClass('hide');
$(that).removeClass('error');
} else {
//$next.addClass('disable').prop('disabled', true);
$next.addClass('disable').attr('disabled', true);
$errTip.removeClass('hide').find('em').text('验证码输入错误');
$(that).addClass('error');
}
}
});
}
}).blur(function() {
var v = $.trim($(this).val());
... ... @@ -90,10 +106,7 @@ $('#captcha').keyup(function() {
//添加验证码正确验证
$(this).addClass('error');
$errTip.removeClass('hide');
} else {
$(this).removeClass('error');
$errTip.addClass('hide');
$errTip.removeClass('hide').text('请输入验证码');
}
}).focus(function() {
$(this).removeClass('error');
... ...