Authored by whb

index.js

@@ -19,7 +19,8 @@ define("js/common", ["jquery","handlebars","source-map","index"], function(requi @@ -19,7 +19,8 @@ define("js/common", ["jquery","handlebars","source-map","index"], function(requi
19 var $ = require("jquery"); 19 var $ = require("jquery");
20 20
21 require("js/footer"); 21 require("js/footer");
22 -require("js/simple-header"); 22 +
  23 +
23 24
24 25
25 function cookie(name) { 26 function cookie(name) {
@@ -144,8 +145,12 @@ window.getUser = getUser; @@ -144,8 +145,12 @@ window.getUser = getUser;
144 window.getUid = getUid; 145 window.getUid = getUid;
145 146
146 window.getShoppingKey = getShoppingKey; 147 window.getShoppingKey = getShoppingKey;
  148 +if($('.simple-header').hasClass('simple-header')){
  149 + require("js/simple-header");
  150 +}else{
  151 + require("js/header");
  152 +}
147 153
148 -require("js/header");  
149 154
150 }); 155 });
151 define("js/footer", ["jquery"], function(require, exports, module){ 156 define("js/footer", ["jquery"], function(require, exports, module){
@@ -735,26 +740,26 @@ function JsonPCallBack(data) { @@ -735,26 +740,26 @@ function JsonPCallBack(data) {
735 740
736 if (+data.code === 200) { 741 if (+data.code === 200) {
737 if (typeof data.data === 'object') { 742 if (typeof data.data === 'object') {
738 - if(data.data.url !== ''){  
739 - topbanner = '<a target="_blank" href="' + data.data.url + '" class="page-top-banner"' +  
740 - 'style="height:36px;border:none;background-image:url(' + window.unescape(data.data.src) + ');' +  
741 - 'background-position: center;display:block;background-size:contain">&nbsp;</a>';  
742 - }else{  
743 - topbanner = '<div class="noticewrapper">' +  
744 - '<div class="noticecontainer">' +  
745 - '<h1 class="noticetitle">关于系统升级的公告</h1>' +  
746 - '<div class="noticecontent">' +  
747 - '<p class="tips">尊敬的顾客:</p>' +  
748 - '<p class="detail">您好!为了向您提供更优质的服务,目前系统正在升级,请耐心等待。</p>' +  
749 - '<p class="detail">' +  
750 - '系统升级期间,部分地区用户体验会有暂时中断,如遇紧急事宜,欢迎垂询客服热线:400-889-9646 09:00-22:30(周一至周日)。稍后系统将恢复正常' +  
751 - '</p>' +  
752 - '<p class="detail">使用,欢迎您继续光顾YOHO!BUY有货!带来不便之处深表歉意,请您谅解!</p>' +  
753 - '</div>' +  
754 - '</div>' +  
755 - '</div>';  
756 - }  
757 - $('body').prepend(topbanner); 743 + if (data.data.url !== '') {
  744 + topbanner = '<a target="_blank" href="' + data.data.url + '" class="page-top-banner"' +
  745 + 'style="height:36px;border:none;background-image:url(' + window.unescape(data.data.src) + ');' +
  746 + 'background-position: center;display:block;background-size:contain">&nbsp;</a>';
  747 + } else {
  748 + topbanner = '<div class="noticewrapper">' +
  749 + '<div class="noticecontainer">' +
  750 + '<h1 class="noticetitle">关于系统升级的公告</h1>' +
  751 + '<div class="noticecontent">' +
  752 + '<p class="tips">尊敬的顾客:</p>' +
  753 + '<p class="detail">您好!为了向您提供更优质的服务,目前系统正在升级,请耐心等待。</p>' +
  754 + '<p class="detail">' +
  755 + '系统升级期间,部分地区用户体验会有暂时中断,如遇紧急事宜,欢迎垂询客服热线:400-889-9646 09:00-22:30(周一至周日)。稍后系统将恢复正常' +
  756 + '</p>' +
  757 + '<p class="detail">使用,欢迎您继续光顾YOHO!BUY有货!带来不便之处深表歉意,请您谅解!</p>' +
  758 + '</div>' +
  759 + '</div>' +
  760 + '</div>';
  761 + }
  762 + $('body').prepend(topbanner);
758 } 763 }
759 } 764 }
760 } 765 }
@@ -1189,6 +1194,7 @@ function actionTipPic() { @@ -1189,6 +1194,7 @@ function actionTipPic() {
1189 var $img = ''; 1194 var $img = '';
1190 var $title = ''; 1195 var $title = '';
1191 var $link = ''; 1196 var $link = '';
  1197 + var logolink = '';
1192 1198
1193 $(document).on('mouseenter', '.sub-nav-item', function() { 1199 $(document).on('mouseenter', '.sub-nav-item', function() {
1194 $contentcode = $(this).find('.showdetail').attr('data-code'); 1200 $contentcode = $(this).find('.showdetail').attr('data-code');
@@ -1206,6 +1212,8 @@ function actionTipPic() { @@ -1206,6 +1212,8 @@ function actionTipPic() {
1206 } 1212 }
1207 } 1213 }
1208 }); 1214 });
  1215 + logolink = $('.first-nav-list .cur').find('a').attr('href');
  1216 + $('.main-link').attr('href', link);
1209 } 1217 }
1210 1218
1211 1219
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.