Authored by wangqing

增加热点

@@ -142,7 +142,7 @@ function actionGoodsCart() { @@ -142,7 +142,7 @@ function actionGoodsCart() {
142 return false; 142 return false;
143 } 143 }
144 key = encodeURI(key); 144 key = encodeURI(key);
145 - $.get(searchDomain + '?callback=?&query=' + key, function(htmlData) { 145 + $.get(searchDomain + '?query=' + key, function(htmlData) {
146 $('.search-list').html(htmlData.data); 146 $('.search-list').html(htmlData.data);
147 queryNum = $('.search-list').children('li').length; 147 queryNum = $('.search-list').children('li').length;
148 listIndex = -1; 148 listIndex = -1;
@@ -156,7 +156,7 @@ function actionGoodsCart() { @@ -156,7 +156,7 @@ function actionGoodsCart() {
156 }, function() { 156 }, function() {
157 $(this).css('background-color', '#fff'); 157 $(this).css('background-color', '#fff');
158 }); 158 });
159 - }, 'jsonp'); 159 + }, 'json');
160 } 160 }
161 161
162 function getText(obj) { 162 function getText(obj) {
@@ -525,7 +525,7 @@ function createNewArray(obj) { @@ -525,7 +525,7 @@ function createNewArray(obj) {
525 var $that = $(this); 525 var $that = $(this);
526 var $alink = $that.find('a'); 526 var $alink = $that.find('a');
527 var _href = $alink.attr('href'); 527 var _href = $alink.attr('href');
528 - var hottag = $alink.attr('hot') === 'true' ? true : false; 528 + var hottag = $alink.attr('hot') === 'hot' ? true : false;
529 var objt = {}; 529 var objt = {};
530 530
531 if ($that.hasClass('category-title')) { 531 if ($that.hasClass('category-title')) {
@@ -721,7 +721,6 @@ function actionNav() { @@ -721,7 +721,6 @@ function actionNav() {
721 } 721 }
722 722
723 723
724 -  
725 /** 724 /**
726 * 查询跳转后保留关键字 725 * 查询跳转后保留关键字
727 * @return {[type]} [description] 726 * @return {[type]} [description]
@@ -1172,7 +1171,7 @@ function actionExeTemplate() { @@ -1172,7 +1171,7 @@ function actionExeTemplate() {
1172 * @return {[type]} [description] 1171 * @return {[type]} [description]
1173 */ 1172 */
1174 function actionSearch() { 1173 function actionSearch() {
1175 - var searchDomain = 'http://search.yohobuy.com/api/suggest'; 1174 + var searchDomain = 'http://search.yohobuy.com/product/search/suggest';
1176 1175
1177 $('#query_key').search(searchDomain); 1176 $('#query_key').search(searchDomain);
1178 } 1177 }
@@ -14,17 +14,19 @@ var $cr = $('#country-code-hide'), @@ -14,17 +14,19 @@ var $cr = $('#country-code-hide'),
14 emailReg = /^[.\-_a-zA-Z0-9]+@[\-_a-zA-Z0-9]+\.[a-zA-Z0-9]/, 14 emailReg = /^[.\-_a-zA-Z0-9]+@[\-_a-zA-Z0-9]+\.[a-zA-Z0-9]/,
15 acAccount = [ 15 acAccount = [
16 ['qq.com', '163.com', '126.com', 'sina.com', 'gmail.com', 16 ['qq.com', '163.com', '126.com', 'sina.com', 'gmail.com',
17 - 'sohu.com', 'hotmail.com', '139.com', '189.com'], //数字顺序 17 + 'sohu.com', 'hotmail.com', '139.com', '189.com'
  18 + ], //数字顺序
18 ['gmail.com', 'qq.com', '163.com', '126.com', 'sina.com', 19 ['gmail.com', 'qq.com', '163.com', '126.com', 'sina.com',
19 - 'sohu.com', 'hotmail.com', '139.com', '189.com'] //组合顺序 20 + 'sohu.com', 'hotmail.com', '139.com', '189.com'
  21 + ] //组合顺序
20 ], 22 ],
21 $ccList = $('#country-code-list'), 23 $ccList = $('#country-code-list'),
22 $cc = $('#country-code'), 24 $cc = $('#country-code'),
23 $btn = $('#find-btn'), 25 $btn = $('#find-btn'),
24 $accErr = $('#account-err'), 26 $accErr = $('#account-err'),
25 $caErr = $('#captcha-err'), 27 $caErr = $('#captcha-err'),
26 - time, //timeout-id  
27 - caCount = 4, //验证码位数 28 + time, //timeout-id
  29 + caCount = 4, //验证码位数
28 hasPh = false, 30 hasPh = false,
29 hasCa = false; 31 hasCa = false;
30 32
@@ -42,8 +44,9 @@ require('yoho.placeholder'); @@ -42,8 +44,9 @@ require('yoho.placeholder');
42 44
43 function imgcode() { 45 function imgcode() {
44 var time = new Date(), 46 var time = new Date(),
45 - $captchaImg = $('#captcha-img'),  
46 - captchaImgSrc = $captchaImg.attr('src').split('?')[0]; 47 + $captchaImg = $('#captcha-img'),
  48 + captchaImgSrc = $captchaImg.attr('src').split('?')[0];
  49 +
47 $('#captcha-img').attr('src', captchaImgSrc + '?t=' + time.getTime()); 50 $('#captcha-img').attr('src', captchaImgSrc + '?t=' + time.getTime());
48 51
49 //getSource('yoho_family_web', '换一张', 'homepage_man'); 52 //getSource('yoho_family_web', '换一张', 'homepage_man');
@@ -101,8 +104,8 @@ function vaCa() { @@ -101,8 +104,8 @@ function vaCa() {
101 type: 'POST', 104 type: 'POST',
102 url: '/passport/back/authcode', 105 url: '/passport/back/authcode',
103 data: { 106 data: {
104 - verifyCode: v,  
105 - phoneNum: $('#phone-num').val(), 107 + verifyCode: v,
  108 + phoneNum: $('#phone-num').val(),
106 area: $('#country-code-hide').val() 109 area: $('#country-code-hide').val()
107 } 110 }
108 111