...
|
...
|
@@ -472,7 +472,7 @@ function actionGoodsCart() { |
|
|
return false;
|
|
|
}
|
|
|
key = encodeURI(key);
|
|
|
$.get(searchDomain + '?callback=?&query=' + key, function(htmlData) {
|
|
|
$.get(searchDomain + '?query=' + key, function(htmlData) {
|
|
|
$('.search-list').html(htmlData.data);
|
|
|
queryNum = $('.search-list').children('li').length;
|
|
|
listIndex = -1;
|
...
|
...
|
@@ -486,7 +486,7 @@ function actionGoodsCart() { |
|
|
}, function() {
|
|
|
$(this).css('background-color', '#fff');
|
|
|
});
|
|
|
}, 'jsonp');
|
|
|
}, 'json');
|
|
|
}
|
|
|
|
|
|
function getText(obj) {
|
...
|
...
|
@@ -855,7 +855,7 @@ function createNewArray(obj) { |
|
|
var $that = $(this);
|
|
|
var $alink = $that.find('a');
|
|
|
var _href = $alink.attr('href');
|
|
|
var hottag = $alink.attr('hot') === 'true' ? true : false;
|
|
|
var hottag = $alink.attr('hot') === 'hot' ? true : false;
|
|
|
var objt = {};
|
|
|
|
|
|
if ($that.hasClass('category-title')) {
|
...
|
...
|
@@ -1050,7 +1050,29 @@ function actionNav() { |
|
|
});
|
|
|
}
|
|
|
|
|
|
function actionTipPic() {
|
|
|
var $content_code = ''
|
|
|
var serverApi = 'http://www.yohobuy.com/common/getbanner?content_code=';
|
|
|
var $img = '';
|
|
|
var $title = '';
|
|
|
var $link = '';
|
|
|
|
|
|
$(document).on('mouseenter','.sub-nav-item',function(){
|
|
|
$content_code = $(this).find('.showdetail').attr('data-code');
|
|
|
if($content_code){
|
|
|
$img = $(this).find('.showdetail').find('img');
|
|
|
$title = $(this).find('.showdetail').find('.title');
|
|
|
$link = $(this).find('.showdetail').find('a');
|
|
|
$.get(serverApi + $content_code+'&width=337&height=250&client_type=web', function(rsdata) {
|
|
|
$img.attr('src',rsdata.data.src);
|
|
|
$link.attr('href',rsdata.data.url);
|
|
|
$title.text(rsdata.data.title);
|
|
|
}, 'jsonp');
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 查询跳转后保留关键字
|
...
|
...
|
@@ -1502,7 +1524,7 @@ function actionExeTemplate() { |
|
|
* @return {[type]} [description]
|
|
|
*/
|
|
|
function actionSearch() {
|
|
|
var searchDomain = 'http://search.yohobuy.com/api/suggest';
|
|
|
var searchDomain = 'http://search.yohobuy.com/product/search/suggest';
|
|
|
|
|
|
$('#query_key').search(searchDomain);
|
|
|
}
|
...
|
...
|
@@ -1656,6 +1678,7 @@ function actionLoginInfo() { |
|
|
*/
|
|
|
function init() {
|
|
|
actionNav(); //处理导航
|
|
|
actionTipPic();//鼠标移入后查询
|
|
|
actionExeTemplate(); //处理模板
|
|
|
actionInitCookie(); //初始化cookie
|
|
|
actionExeCookieMap(); //格式化cookie
|
...
|
...
|
@@ -4782,17 +4805,19 @@ var $cr = $('#country-code-hide'), |
|
|
emailReg = /^[.\-_a-zA-Z0-9]+@[\-_a-zA-Z0-9]+\.[a-zA-Z0-9]/,
|
|
|
acAccount = [
|
|
|
['qq.com', '163.com', '126.com', 'sina.com', 'gmail.com',
|
|
|
'sohu.com', 'hotmail.com', '139.com', '189.com'], //数字顺序
|
|
|
'sohu.com', 'hotmail.com', '139.com', '189.com'
|
|
|
], //数字顺序
|
|
|
['gmail.com', 'qq.com', '163.com', '126.com', 'sina.com',
|
|
|
'sohu.com', 'hotmail.com', '139.com', '189.com'] //组合顺序
|
|
|
'sohu.com', 'hotmail.com', '139.com', '189.com'
|
|
|
] //组合顺序
|
|
|
],
|
|
|
$ccList = $('#country-code-list'),
|
|
|
$cc = $('#country-code'),
|
|
|
$btn = $('#find-btn'),
|
|
|
$accErr = $('#account-err'),
|
|
|
$caErr = $('#captcha-err'),
|
|
|
time, //timeout-id
|
|
|
caCount = 4, //验证码位数
|
|
|
time, //timeout-id
|
|
|
caCount = 4, //验证码位数
|
|
|
hasPh = false,
|
|
|
hasCa = false;
|
|
|
|
...
|
...
|
@@ -4810,8 +4835,9 @@ require("jquery.placeholder"); |
|
|
|
|
|
function imgcode() {
|
|
|
var time = new Date(),
|
|
|
$captchaImg = $('#captcha-img'),
|
|
|
captchaImgSrc = $captchaImg.attr('src').split('?')[0];
|
|
|
$captchaImg = $('#captcha-img'),
|
|
|
captchaImgSrc = $captchaImg.attr('src').split('?')[0];
|
|
|
|
|
|
$('#captcha-img').attr('src', captchaImgSrc + '?t=' + time.getTime());
|
|
|
|
|
|
//getSource('yoho_family_web', '换一张', 'homepage_man');
|
...
|
...
|
@@ -4869,8 +4895,8 @@ function vaCa() { |
|
|
type: 'POST',
|
|
|
url: '/passport/back/authcode',
|
|
|
data: {
|
|
|
verifyCode: v,
|
|
|
phoneNum: $('#phone-num').val(),
|
|
|
verifyCode: v,
|
|
|
phoneNum: $('#phone-num').val(),
|
|
|
area: $('#country-code-hide').val()
|
|
|
}
|
|
|
|
...
|
...
|
|