Authored by whb

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

@@ -103,28 +103,27 @@ window.submitSearch = function() { @@ -103,28 +103,27 @@ window.submitSearch = function() {
103 * @return {[type]} [description] 103 * @return {[type]} [description]
104 */ 104 */
105 function actionAddKeyWords() { 105 function actionAddKeyWords() {
106 - var keywords = $('#nav_keyword').text(); 106 + var $keywords = $('#nav_keyword').text();
107 var defaultsearch = 'vans'; 107 var defaultsearch = 'vans';
108 - var $query_key = $('#query_key');  
109 - if (keywords !== '') {  
110 - $query_key.css({  
111 - 'color': '#000' 108 + var $querykey = $('#query_key');
  109 +
  110 + if ($keywords !== '') {
  111 + $querykey.css({
  112 + color: '#000'
112 }); 113 });
113 - $query_key.val(keywords); 114 + $querykey.val($keywords);
114 } else { 115 } else {
115 - $query_key.css({  
116 - 'color': '#e0e0e0' 116 + $querykey.css({
  117 + color: '#e0e0e0'
117 }); 118 });
118 - $query_key.val(defaultsearch);  
119 - $query_key.on('focus', function(e) {  
120 - $query_key.css({  
121 - 'color': '#000' 119 + $querykey.val(defaultsearch);
  120 + $querykey.on('focus', function(e) {
  121 + $querykey.css({
  122 + color: '#000'
122 }); 123 });
123 - $query_key.val('');  
124 - })  
125 - 124 + $querykey.val('');
  125 + });
126 } 126 }
127 -  
128 } 127 }
129 /** 128 /**
130 * 定义购物车扩展 129 * 定义购物车扩展
@@ -1343,7 +1342,6 @@ function actionSearch() { @@ -1343,7 +1342,6 @@ function actionSearch() {
1343 * @return {[type]} [description] 1342 * @return {[type]} [description]
1344 */ 1343 */
1345 function actionLoginState(_data) { 1344 function actionLoginState(_data) {
1346 - console.log(_data);  
1347 var timestamp = new Date().getTime(); 1345 var timestamp = new Date().getTime();
1348 var noLoginHtml = '<span>Hi~</span>[<a href="http://www.yohobuy.com/signin.html" class="list-a login-out ">' + 1346 var noLoginHtml = '<span>Hi~</span>[<a href="http://www.yohobuy.com/signin.html" class="list-a login-out ">' +
1349 '请登录</a>]&nbsp;' + 1347 '请登录</a>]&nbsp;' +
@@ -1364,12 +1362,12 @@ function actionLoginState(_data) { @@ -1364,12 +1362,12 @@ function actionLoginState(_data) {
1364 var char = ''; 1362 var char = '';
1365 var user = info.split('::'); 1363 var user = info.split('::');
1366 var userName = user[0] || ' '; 1364 var userName = user[0] || ' ';
1367 - var _logout = ''; 1365 + var _logout = 'http://www.yohobuy.com/logout_';
1368 var islogin = '1'; 1366 var islogin = '1';
1369 var _num = 0; 1367 var _num = 0;
1370 var data = { 1368 var data = {
1371 user_name: name, 1369 user_name: name,
1372 - logout: _logout, 1370 + logout: _logout + _data.data.token + '.html',
1373 random: Math.random() 1371 random: Math.random()
1374 }; 1372 };
1375 1373