Showing
5 changed files
with
22 additions
and
15 deletions
1 | <script> | 1 | <script> |
2 | seajs.use('js/common'); | 2 | seajs.use('js/common'); |
3 | </script> | 3 | </script> |
4 | +{{!-- 正常头部 --}} | ||
5 | +{{#headerdata}} | ||
6 | + <script> | ||
7 | + seajs.use('js/header',function(header){ | ||
8 | + header.init(); | ||
9 | + }); | ||
10 | + </script> | ||
11 | +{{/headerdata}} | ||
12 | +{{!-- 简单头部 --}} | ||
13 | +{{#simpleHeader}} | ||
14 | + <script> | ||
15 | + seajs.use('js/simple-header',function(simpleheader){ | ||
16 | + simpleheader.init(); | ||
17 | + }); | ||
18 | + </script> | ||
19 | +{{/simpleHeader}} | ||
4 | {{!-- 首页 --}} | 20 | {{!-- 首页 --}} |
5 | {{#if boysHomePage}} | 21 | {{#if boysHomePage}} |
6 | <script> | 22 | <script> |
1 | var webYohobuy; | 1 | var webYohobuy; |
2 | 2 | ||
3 | require('./js/common'); | 3 | require('./js/common'); |
4 | - | 4 | +require('./js/header'); |
5 | +require('./js/simple-header'); | ||
5 | require('./js/product/entry'); | 6 | require('./js/product/entry'); |
6 | require('./js/home/entry'); | 7 | require('./js/home/entry'); |
7 | require('./js/passport/entry'); | 8 | require('./js/passport/entry'); |
@@ -5,10 +5,6 @@ | @@ -5,10 +5,6 @@ | ||
5 | */ | 5 | */ |
6 | var $ = require('yoho.jquery'); | 6 | var $ = require('yoho.jquery'); |
7 | 7 | ||
8 | -require('./footer'); | ||
9 | - | ||
10 | - | ||
11 | - | ||
12 | 8 | ||
13 | function cookie(name) { | 9 | function cookie(name) { |
14 | var cookies = document.cookie, | 10 | var cookies = document.cookie, |
@@ -116,7 +112,7 @@ function getShoppingKey() { | @@ -116,7 +112,7 @@ function getShoppingKey() { | ||
116 | 112 | ||
117 | uid = uid === 0 ? '' : uid; | 113 | uid = uid === 0 ? '' : uid; |
118 | 114 | ||
119 | - window._ozuid = uid;//暴露ozuid | 115 | + window._ozuid = uid; //暴露ozuid |
120 | 116 | ||
121 | if (window._yas) { | 117 | if (window._yas) { |
122 | window._yas(1 * new Date(), '1.0.14', 'yohobuy_web', uid, '', ''); | 118 | window._yas(1 * new Date(), '1.0.14', 'yohobuy_web', uid, '', ''); |
@@ -132,9 +128,5 @@ window.getUser = getUser; | @@ -132,9 +128,5 @@ window.getUser = getUser; | ||
132 | window.getUid = getUid; | 128 | window.getUid = getUid; |
133 | 129 | ||
134 | window.getShoppingKey = getShoppingKey; | 130 | window.getShoppingKey = getShoppingKey; |
135 | -if($('.simple-header').hasClass('simple-header')){ | ||
136 | - require('./simple-header'); | ||
137 | -}else{ | ||
138 | - require('./header'); | ||
139 | -} | ||
140 | 131 | ||
132 | +require('./footer'); |
@@ -1509,7 +1509,7 @@ function actionLoginInfo() { | @@ -1509,7 +1509,7 @@ function actionLoginInfo() { | ||
1509 | * 初始化函数 | 1509 | * 初始化函数 |
1510 | * @return {[type]} [description] | 1510 | * @return {[type]} [description] |
1511 | */ | 1511 | */ |
1512 | -function init() { | 1512 | +exports.init = function() { |
1513 | actionNav(); //处理导航 | 1513 | actionNav(); //处理导航 |
1514 | actionTipPic(); //鼠标移入后查询 | 1514 | actionTipPic(); //鼠标移入后查询 |
1515 | actionExeTemplate(); //处理模板 | 1515 | actionExeTemplate(); //处理模板 |
@@ -1535,4 +1535,3 @@ function init() { | @@ -1535,4 +1535,3 @@ function init() { | ||
1535 | actionAddKeyWords(); //增加关键字 | 1535 | actionAddKeyWords(); //增加关键字 |
1536 | } | 1536 | } |
1537 | 1537 | ||
1538 | -init(); |
@@ -94,8 +94,7 @@ function actionLoginInfo() { | @@ -94,8 +94,7 @@ function actionLoginInfo() { | ||
94 | * 初始化函数 | 94 | * 初始化函数 |
95 | * @return {[type]} [description] | 95 | * @return {[type]} [description] |
96 | */ | 96 | */ |
97 | -function init() { | 97 | +exports.init = function() { |
98 | actionLoginInfo(); //获取登录信息 | 98 | actionLoginInfo(); //获取登录信息 |
99 | } | 99 | } |
100 | 100 | ||
101 | -init(); |
-
Please register or login to post a comment