Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop
Showing
3 changed files
with
4 additions
and
16 deletions
@@ -1160,7 +1160,7 @@ function actionTipPic() { | @@ -1160,7 +1160,7 @@ function actionTipPic() { | ||
1160 | } | 1160 | } |
1161 | }); | 1161 | }); |
1162 | logolink = $('.first-nav-list .cur').find('a').attr('href'); | 1162 | logolink = $('.first-nav-list .cur').find('a').attr('href'); |
1163 | - $('.main-link').attr('href', link); | 1163 | + $('.main-link').attr('href', logolink); |
1164 | } | 1164 | } |
1165 | 1165 | ||
1166 | 1166 |
This diff could not be displayed because it is too large.
@@ -10,23 +10,11 @@ var $body = $('body'); | @@ -10,23 +10,11 @@ var $body = $('body'); | ||
10 | 10 | ||
11 | require('./footer'); | 11 | require('./footer'); |
12 | 12 | ||
13 | - | ||
14 | - | ||
15 | function cookie(name) { | 13 | function cookie(name) { |
16 | - var cookies = document.cookie, | ||
17 | - cookieVal, | ||
18 | - offset; | ||
19 | - | ||
20 | - if (document.cookie && document.cookie !== '') { | ||
21 | - offset = cookies.indexOf(name + '='); | ||
22 | - if (offset > -1) { | ||
23 | - offset += name.length + 1; | ||
24 | - | ||
25 | - cookieVal = decodeURIComponent($.trim(cookies.substring(offset, cookies.indexOf(';', offset)))); | ||
26 | - } | ||
27 | - } | 14 | + var re = new RegExp(name + '=([^;$]*)', 'i'), |
15 | + matchPattern = '$1'; | ||
28 | 16 | ||
29 | - return cookieVal; | 17 | + return re.test(decodeURIComponent(document.cookie)) ? RegExp[matchPattern] : ''; |
30 | } | 18 | } |
31 | 19 | ||
32 | function setCookie(name, value, options) { | 20 | function setCookie(name, value, options) { |
-
Please register or login to post a comment