...
|
...
|
@@ -28,7 +28,10 @@ var thirdLineNum = 9, |
|
|
requestFrame;
|
|
|
|
|
|
var logoAngle = 0,
|
|
|
loopTime = 500;
|
|
|
loopTime = 500,
|
|
|
keyword = '',
|
|
|
link = '',
|
|
|
reg = /^[\^\!\+\-\(\)\:\[\]\\\{\}\~\*\?\|\&\;\/]{0,}$/g;
|
|
|
|
|
|
var dataLayer = [];
|
|
|
|
...
|
...
|
@@ -705,4 +708,32 @@ function actionCover() { |
|
|
}
|
|
|
}
|
|
|
|
|
|
window.submitSearch = function() {
|
|
|
var $keywordinput = $('#query-key').val();
|
|
|
var $defaultsearch = $('#defaultsearch').val();
|
|
|
var column = 'Search';
|
|
|
var postition = 'Head Search';
|
|
|
var event = 'Search';
|
|
|
var $formatkeyword,
|
|
|
$formatkeywordinput;
|
|
|
|
|
|
$formatkeyword = $.trim(keyword.toLowerCase());
|
|
|
$formatkeywordinput = $.trim($keywordinput.toLowerCase());
|
|
|
getSource(column, postition, event);
|
|
|
if (link !== '' && keyword !== '' && $formatkeyword === $formatkeywordinput) {
|
|
|
location.href = link.replace('\'', '');
|
|
|
} else {
|
|
|
if (reg.test($keywordinput) && $keywordinput !== '') {
|
|
|
location.href = 'http://search.yohobuy.com/error?query=' + $keywordinput + '&result=error';
|
|
|
} else {
|
|
|
if ($keywordinput === '') {
|
|
|
$('#query-key').val($defaultsearch);
|
|
|
}
|
|
|
|
|
|
$searchForm.submit();
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
|
|
|
actionCover(); |
...
|
...
|
|