Authored by wangqing

增加顶部链接

@@ -205,13 +205,11 @@ function actionGoodsCart() { @@ -205,13 +205,11 @@ function actionGoodsCart() {
205 var params = ''; 205 var params = '';
206 206
207 if (typeof (domain) === undefined || domain === '') { 207 if (typeof (domain) === undefined || domain === '') {
208 - console.log('请设置请求的api地址');  
209 return false; 208 return false;
210 } 209 }
211 params = $.extend(defaults, options); 210 params = $.extend(defaults, options);
212 params.page = params.page || 1; 211 params.page = params.page || 1;
213 if (params.method === '') { 212 if (params.method === '') {
214 - console.log('请设置请求的URL');  
215 return false; 213 return false;
216 } 214 }
217 try { 215 try {
@@ -752,7 +750,8 @@ function actionTipPic() { @@ -752,7 +750,8 @@ function actionTipPic() {
752 750
753 751
754 752
755 -function closeCover(){ 753 +
  754 +function closeCover() {
756 var $cover = $('#cover'); 755 var $cover = $('#cover');
757 756
758 $cover.remove(); 757 $cover.remove();
@@ -763,58 +762,97 @@ function closeCover(){ @@ -763,58 +762,97 @@ function closeCover(){
763 */ 762 */
764 function actionCover() { 763 function actionCover() {
765 var gender = cookieMap._Gender; 764 var gender = cookieMap._Gender;
766 -  
767 - setCookie('_Channel','boys',{path : '/',domain : '.yohobuy.com',expires : 7});  
768 - if(typeof gender == 'undefined' || gender == '' || gender == null){  
769 - $.get('http://www.yohobuy.com/index/guide', function(data){  
770 - var newMask = document.createElement("div"); 765 + var newMask = '';
  766 + var windowheight = '';
  767 + var selfheight = '';
  768 + var containertop;
  769 + var length = '';
  770 +
  771 + window.setCookie('_Channel', 'boys', {
  772 + path: '/',
  773 + domain: '.yohobuy.com',
  774 + expires: 7
  775 + });
  776 + if (typeof gender === 'undefined' || gender === '' || gender === null) {
  777 + $.get('http://www.yohobuy.com/index/guide', function(data) {
  778 + newMask = document.createElement('div');
771 newMask.id = 'cover'; 779 newMask.id = 'cover';
772 - newMask.innerHTML=data; 780 + newMask.innerHTML = data;
773 document.body.appendChild(newMask); 781 document.body.appendChild(newMask);
774 - var window_height = $(window).height();  
775 - var self_height = $('.guide-box').height();  
776 - var container_top = window_height / 2 - self_height / 2;  
777 - var length=$('.guide-box .clear').find("li").length; 782 + windowheight = $(window).height();
  783 + selfheight = $('.guide-box').height();
  784 + containertop = windowheight / 2 - selfheight / 2;
  785 + length = $('.guide-box .clear').find('li').length;
778 $('.guide-box').css({ 786 $('.guide-box').css({
779 width: (200 * length) + 'px', 787 width: (200 * length) + 'px',
780 - top: container_top + 'px' 788 + top: containertop + 'px'
781 }); 789 });
782 - $('#cover').bind('click', function(event){  
783 - setCookie('_Gender','1,3',{path : '/',domain : '.yohobuy.com',expires : 90});  
784 - setCookie('_Channel','boys',{path : '/',domain : '.yohobuy.com',expires : 7});  
785 - closeCover(); 790 + $('#cover').bind('click', function(event) {
  791 + window.setCookie('_Gender', '1,3', {
  792 + path: '/',
  793 + domain: '.yohobuy.com',
  794 + expires: 90
  795 + });
  796 + window.setCookie('_Channel', 'boys', {
  797 + path: '/',
  798 + domain: '.yohobuy.com',
  799 + expires: 7
  800 + });
  801 + closeCover();
786 }); 802 });
787 - $('#cover .guide-box .close').bind('click', function(event){  
788 - getSource('弹窗','CLOSE','homepage_man');  
789 - setCookie('_Gender','1,3',{path : '/',domain : '.yohobuy.com',expires : 90});  
790 - setCookie('_Channel','boys',{path : '/',domain : '.yohobuy.com',expires : 7});  
791 - analy('guide_close');  
792 - closeCover(); 803 + $('#cover .guide-box .close').bind('click', function(event) {
  804 + getSource('弹窗', 'CLOSE', 'homepage_man');
  805 + window.setCookie('_Gender', '1,3', {
  806 + path: '/',
  807 + domain: '.yohobuy.com',
  808 + expires: 90
  809 + });
  810 + window.setCookie('_Channel', 'boys', {
  811 + path: '/',
  812 + domain: '.yohobuy.com',
  813 + expires: 7
  814 + });
  815 + closeCover();
793 }); 816 });
794 - $('.boys img , .boys .go').bind('click', function(event){  
795 - getSource('弹窗','BOYS','homepage_man');  
796 - setCookie('_Gender','1,3',{path : '/',domain : '.yohobuy.com',expires : 90});  
797 - setCookie('_Channel','boys',{path : '/',domain : '.yohobuy.com',expires : 7});  
798 - analy( 'guide_boys');  
799 - closeCover(); 817 + $('.boys img , .boys .go').bind('click', function(event) {
  818 + getSource('弹窗', 'BOYS', 'homepage_man');
  819 + window.setCookie('_Gender', '1,3', {
  820 + path: '/',
  821 + domain: '.yohobuy.com',
  822 + expires: 90
  823 + });
  824 + window.setCookie('_Channel', 'boys', {
  825 + path: '/',
  826 + domain: '.yohobuy.com',
  827 + expires: 7
  828 + });
  829 + closeCover();
800 }); 830 });
801 - $('.girls img, .girls .go').bind('click', function(event){  
802 - getSource('弹窗','GIRLS','homepage_woman');  
803 - setCookie('_Gender','2,3',{path : '/',domain : '.yohobuy.com',expires : 90});  
804 - setCookie('_Channel','girls',{path : '/',domain : '.yohobuy.com',expires : 7});  
805 - analy( 'guide_girls'); 831 + $('.girls img, .girls .go').bind('click', function(event) {
  832 + getSource('弹窗', 'GIRLS', 'homepage_woman');
  833 + window.setCookie('_Gender', '2,3', {
  834 + path: '/',
  835 + domain: '.yohobuy.com',
  836 + expires: 90
  837 + });
  838 + window.setCookie('_Channel', 'girls', {
  839 + path: '/',
  840 + domain: '.yohobuy.com',
  841 + expires: 7
  842 + });
806 }); 843 });
807 - $('.lifestyle img, .lifestyle .go').bind('click', function(event){  
808 - setCookie('_Channel','lifestyle',{path : '/',domain : '.yohobuy.com',expires : 7});  
809 - getSource('弹窗','LIEFSTYLE','homepage_lifestyle');  
810 - analy( 'guide_lifestyle'); 844 + $('.lifestyle img, .lifestyle .go').bind('click', function(event) {
  845 + window.setCookie('_Channel', 'lifestyle', {
  846 + path: '/',
  847 + domain: '.yohobuy.com',
  848 + expires: 7
  849 + });
  850 + getSource('弹窗', 'LIEFSTYLE', 'homepage_lifestyle');
811 }); 851 });
812 - //防止冒泡事件  
813 - $('#cover .guide-box').bind('click', function(event){ 852 + $('#cover .guide-box').bind('click', function(event) {
814 event.stopPropagation(); 853 event.stopPropagation();
815 }); 854 });
816 -  
817 - }); 855 + });
818 } 856 }
819 } 857 }
820 /** 858 /**
@@ -1444,4 +1482,4 @@ function init() { @@ -1444,4 +1482,4 @@ function init() {
1444 actionCover(); //初次登录弹框 1482 actionCover(); //初次登录弹框
1445 } 1483 }
1446 1484
1447 -init(); 1485 +init();
@@ -245,7 +245,7 @@ @@ -245,7 +245,7 @@
245 height: 100%; 245 height: 100%;
246 line-height: 33px; 246 line-height: 33px;
247 background-color: #d8d8d8; 247 background-color: #d8d8d8;
248 - background-image: url('../img/arrowbottom.png'); 248 + background-image: image-url('passport/arrowbottom.png');
249 background-repeat: no-repeat; 249 background-repeat: no-repeat;
250 background-position: center center; 250 background-position: center center;
251 } 251 }