modify format template page_header.phtml go back url use javascript
Showing
5 changed files
with
87 additions
and
102 deletions
1 | {{> layout/page_footer}} | 1 | {{> layout/page_footer}} |
2 | {{#if rlsEnv}} | 2 | {{#if rlsEnv}} |
3 | - <script src="http://static.wap.yohobuy.com/js/sea.js"></script> | ||
4 | - <script>seajs.config({base:'http://static.wap.yohobuy.com/'});</script> | 3 | +<script src="http://cdn.yoho.cn/myohobuy/{{version}}/lib.js"></script> |
4 | +<script src="http://cdn.yoho.cn/myohobuy/{{version}}/index.js"></script> | ||
5 | {{/if}} | 5 | {{/if}} |
6 | {{#if testEnv}} | 6 | {{#if testEnv}} |
7 | - <script src="http://cdn.yoho.cn/myohobuy/{{version}}/lib.js"></script> | ||
8 | - <script src="http://cdn.yoho.cn/myohobuy/{{version}}/index.js"></script> | 7 | +<script src="http://static.buy.test.yoho.cn/dist/myohobuy/{{version}}/lib.js"></script> |
8 | +<script src="http://static.buy.test.yoho.cn/dist/myohobuy/{{version}}/index.js"></script> | ||
9 | {{/if}} | 9 | {{/if}} |
10 | {{#if devEnv}} | 10 | {{#if devEnv}} |
11 | - <script src="http://localhost:8000/static/js/sea.js?nowrap"></script> | ||
12 | - <script> | ||
13 | - seajs.config({ | ||
14 | - base: 'http://localhost:8000/' | ||
15 | - }); | ||
16 | - </script> | 11 | +<script src="http://localhost:8000/static/js/sea.js?nowrap"></script> |
12 | +<script>seajs.config({base: 'http://localhost:8000/'});</script> | ||
17 | {{/if}} | 13 | {{/if}} |
18 | {{> layout/use}} | 14 | {{> layout/use}} |
19 | </body> | 15 | </body> |
1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
2 | <html> | 2 | <html> |
3 | <head> | 3 | <head> |
4 | - <meta charset="utf-8"> | ||
5 | - <title>{{title}}YOHO!有货</title> | ||
6 | - <meta name="keywords" content="{{keywords}}Yoho! 有货官网,潮流志,潮流男装,潮牌,美国潮牌,日本潮牌,香港潮牌,潮牌店,新品首发,欧美潮流,全球购,代购,时尚,流行,特卖,B2C,正品,购物网站,网上购物,货到付款"> | ||
7 | - <meta name="description" content="{{description}}YOHO! 有货,年轻人潮流购物中心,中国最大的潮流商品购物网站。100%品牌正品保证,支持货到付款。作为YOHO!旗下的购物平台,汇集了全球潮流时尚商品和中国最流行的商品,也是国内最大的原创文化商品平台,也是香港,台湾地区流行商品的集中地。同时包含日本、韩国等众多国外潮流品牌,带给您全新潮流购物体验。"> | ||
8 | - <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> | ||
9 | - <meta http-equiv="cleartype" content="on"> | ||
10 | - <meta name="apple-mobile-web-app-status-bar-style" content="black" /> | ||
11 | - <meta content="telephone=no" name="format-detection" /> | ||
12 | - <meta content="email=no" name="format-detection" /> | ||
13 | - <script type="text/javascript"> | ||
14 | - (function (doc, win) { | 4 | +<meta charset="utf-8"> |
5 | +<title>{{title}}YOHO!有货</title> | ||
6 | +<meta name="keywords" content="{{keywords}}Yoho! 有货官网,潮流志,潮流男装,潮牌,美国潮牌,日本潮牌,香港潮牌,潮牌店,新品首发,欧美潮流,全球购,代购,时尚,流行,特卖,B2C,正品,购物网站,网上购物,货到付款"> | ||
7 | +<meta name="description" content="{{description}}YOHO! 有货,年轻人潮流购物中心,中国最大的潮流商品购物网站。100%品牌正品保证,支持货到付款。作为YOHO!旗下的购物平台,汇集了全球潮流时尚商品和中国最流行的商品,也是国内最大的原创文化商品平台,也是香港,台湾地区流行商品的集中地。同时包含日本、韩国等众多国外潮流品牌,带给您全新潮流购物体验。"> | ||
8 | +<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> | ||
9 | +<meta http-equiv="cleartype" content="on"> | ||
10 | +<meta name="apple-mobile-web-app-status-bar-style" content="black" /> | ||
11 | +<meta content="telephone=no" name="format-detection" /> | ||
12 | +<meta content="email=no" name="format-detection" /> | ||
13 | +<script type="text/javascript"> | ||
14 | + (function(doc, win) { | ||
15 | var docEl = doc.documentElement; | 15 | var docEl = doc.documentElement; |
16 | - (function () { | 16 | + (function() { |
17 | var clientWidth = docEl.clientWidth; | 17 | var clientWidth = docEl.clientWidth; |
18 | if (!clientWidth) { | 18 | if (!clientWidth) { |
19 | return; | 19 | return; |
@@ -21,16 +21,16 @@ | @@ -21,16 +21,16 @@ | ||
21 | docEl.style.fontSize = 20 * (clientWidth / 320) + 'px'; | 21 | docEl.style.fontSize = 20 * (clientWidth / 320) + 'px'; |
22 | }()); | 22 | }()); |
23 | })(document, window); | 23 | })(document, window); |
24 | - </script> | ||
25 | - {{#if rlsEnv}} | ||
26 | - <link rel="stylesheet" href="http://static.wap.yohobuy.com/css/index.css"> | ||
27 | - {{/if}} | ||
28 | - {{#if testEnv}} | ||
29 | - <link rel="stylesheet" href="http://cdn.yoho.cn/myohobuy/{{version}}/index.css"> | ||
30 | - {{/if}} | ||
31 | - {{#if devEnv}} | ||
32 | - <link rel="stylesheet" href="http://static.dev.yohobuy.com/css/index.css"> | ||
33 | - {{/if}} | 24 | +</script> |
25 | +{{#if rlsEnv}} | ||
26 | +<link rel="stylesheet" href="http://cdn.yoho.cn/myohobuy/{{version}}/index.css"> | ||
27 | +{{/if}} | ||
28 | +{{#if testEnv}} | ||
29 | +<link rel="stylesheet" href="http://static.buy.test.yoho.cn/dist/myohobuy/{{version}}/index.css"> | ||
30 | +{{/if}} | ||
31 | +{{#if devEnv}} | ||
32 | +<link rel="stylesheet" href="http://static.dev.yohobuy.com/css/index.css"> | ||
33 | +{{/if}} | ||
34 | </head> | 34 | </head> |
35 | <body {{#if isPassportPage}}class=passport-body{{/if}}> | 35 | <body {{#if isPassportPage}}class=passport-body{{/if}}> |
36 | -{{> layout/page_header}} | ||
36 | + {{> layout/page_header}} |
1 | {{#pageHeader}} | 1 | {{#pageHeader}} |
2 | - <header class="yoho-header"> | ||
3 | - {{#navBack}} | ||
4 | - <a href={{.}} class="nav-back"></a> | ||
5 | - {{/navBack}} | 2 | +<header class="yoho-header"> |
3 | + {{#if navBack}} | ||
4 | + <a href="javascript:history.go(-1);" class="nav-back"></a> | ||
5 | + {{/if}} | ||
6 | {{#navHome}} | 6 | {{#navHome}} |
7 | - <a href={{.}} class="nav-home"></a> | 7 | + <a href="{{.}}" class="nav-home"></a> |
8 | {{/navHome}} | 8 | {{/navHome}} |
9 | {{#navTitle}} | 9 | {{#navTitle}} |
10 | <p class="nav-title">{{.}}</p> | 10 | <p class="nav-title">{{.}}</p> |
11 | {{/navTitle}} | 11 | {{/navTitle}} |
12 | - </header> | 12 | +</header> |
13 | {{/pageHeader}} | 13 | {{/pageHeader}} |
1 | <script> | 1 | <script> |
2 | seajs.use('js/common'); | 2 | seajs.use('js/common'); |
3 | </script> | 3 | </script> |
4 | - | ||
5 | {{!-- 逛(PLUS+STAR) --}} | 4 | {{!-- 逛(PLUS+STAR) --}} |
6 | {{#if psList}} | 5 | {{#if psList}} |
7 | - <script> | 6 | +<script> |
8 | seajs.use('js/guang/plus-star/list'); | 7 | seajs.use('js/guang/plus-star/list'); |
9 | - </script> | 8 | +</script> |
10 | {{/if}} | 9 | {{/if}} |
11 | {{#if psDetail}} | 10 | {{#if psDetail}} |
12 | - <script> | 11 | +<script> |
13 | seajs.use('js/guang/plus-star/detail'); | 12 | seajs.use('js/guang/plus-star/detail'); |
14 | - </script> | 13 | +</script> |
15 | {{/if}} | 14 | {{/if}} |
16 | {{#if guangHome}} | 15 | {{#if guangHome}} |
17 | - <script> | 16 | +<script> |
18 | seajs.use('js/guang/home'); | 17 | seajs.use('js/guang/home'); |
19 | - </script> | 18 | +</script> |
20 | {{/if}} | 19 | {{/if}} |
21 | {{#if guangList}} | 20 | {{#if guangList}} |
22 | - <script> | 21 | +<script> |
23 | seajs.use('js/guang/list'); | 22 | seajs.use('js/guang/list'); |
24 | - </script> | 23 | +</script> |
25 | {{/if}} | 24 | {{/if}} |
26 | {{#if guangDetail}} | 25 | {{#if guangDetail}} |
27 | - <script> | 26 | +<script> |
28 | seajs.use('js/guang/detail'); | 27 | seajs.use('js/guang/detail'); |
29 | - </script> | 28 | +</script> |
30 | {{/if}} | 29 | {{/if}} |
31 | - | ||
32 | {{!-- 注册 --}} | 30 | {{!-- 注册 --}} |
33 | {{#if regIndex}} | 31 | {{#if regIndex}} |
34 | - <script> | 32 | +<script> |
35 | seajs.use('js/passport/register/register'); | 33 | seajs.use('js/passport/register/register'); |
36 | - </script> | 34 | +</script> |
37 | {{/if}} | 35 | {{/if}} |
38 | {{#if regCode}} | 36 | {{#if regCode}} |
39 | - <script> | 37 | +<script> |
40 | seajs.use('js/passport/register/code'); | 38 | seajs.use('js/passport/register/code'); |
41 | - </script> | 39 | +</script> |
42 | {{/if}} | 40 | {{/if}} |
43 | {{#if regPwd}} | 41 | {{#if regPwd}} |
44 | - <script> | 42 | +<script> |
45 | seajs.use('js/passport/register/password'); | 43 | seajs.use('js/passport/register/password'); |
46 | - </script> | 44 | +</script> |
47 | {{/if}} | 45 | {{/if}} |
48 | - | ||
49 | {{!-- 登陆 --}} | 46 | {{!-- 登陆 --}} |
50 | {{#if loginIndex}} | 47 | {{#if loginIndex}} |
51 | - <script> | 48 | +<script> |
52 | seajs.use('js/passport/login/login'); | 49 | seajs.use('js/passport/login/login'); |
53 | - </script> | 50 | +</script> |
54 | {{/if}} | 51 | {{/if}} |
55 | {{#if loginInterational}} | 52 | {{#if loginInterational}} |
56 | - <script> | 53 | +<script> |
57 | seajs.use('js/passport/login/interational'); | 54 | seajs.use('js/passport/login/interational'); |
58 | - </script> | 55 | +</script> |
59 | {{/if}} | 56 | {{/if}} |
60 | - | ||
61 | {{!-- 密码找回 --}} | 57 | {{!-- 密码找回 --}} |
62 | {{#if backEmail}} | 58 | {{#if backEmail}} |
63 | - <script> | 59 | +<script> |
64 | seajs.use('js/passport/back/email'); | 60 | seajs.use('js/passport/back/email'); |
65 | - </script> | 61 | +</script> |
66 | {{/if}} | 62 | {{/if}} |
67 | {{#if backEmailSuccess}} | 63 | {{#if backEmailSuccess}} |
68 | - <script> | 64 | +<script> |
69 | seajs.use('js/passport/back/email-success'); | 65 | seajs.use('js/passport/back/email-success'); |
70 | - </script> | 66 | +</script> |
71 | {{/if}} | 67 | {{/if}} |
72 | {{#if backMobile}} | 68 | {{#if backMobile}} |
73 | - <script> | 69 | +<script> |
74 | seajs.use('js/passport/back/mobile'); | 70 | seajs.use('js/passport/back/mobile'); |
75 | - </script> | 71 | +</script> |
76 | {{/if}} | 72 | {{/if}} |
77 | {{#if backCode}} | 73 | {{#if backCode}} |
78 | - <script> | 74 | +<script> |
79 | seajs.use('js/passport/back/code'); | 75 | seajs.use('js/passport/back/code'); |
80 | - </script> | 76 | +</script> |
81 | {{/if}} | 77 | {{/if}} |
82 | {{#if backNewPwd}} | 78 | {{#if backNewPwd}} |
83 | - <script> | 79 | +<script> |
84 | seajs.use('js/passport/back/new-password'); | 80 | seajs.use('js/passport/back/new-password'); |
85 | - </script> | 81 | +</script> |
86 | {{/if}} | 82 | {{/if}} |
87 | - | ||
88 | {{!-- 首页 --}} | 83 | {{!-- 首页 --}} |
89 | {{#if grilsHomePage}} | 84 | {{#if grilsHomePage}} |
90 | - <script> | 85 | +<script> |
91 | seajs.use('js/home/home'); | 86 | seajs.use('js/home/home'); |
92 | - </script> | 87 | +</script> |
93 | {{/if}} | 88 | {{/if}} |
94 | {{#if boysHomePage}} | 89 | {{#if boysHomePage}} |
95 | - <script> | 90 | +<script> |
96 | seajs.use('js/home/home'); | 91 | seajs.use('js/home/home'); |
97 | - </script> | 92 | +</script> |
98 | {{/if}} | 93 | {{/if}} |
99 | {{#if kidsHomePage}} | 94 | {{#if kidsHomePage}} |
100 | - <script> | 95 | +<script> |
101 | seajs.use('js/home/home'); | 96 | seajs.use('js/home/home'); |
102 | - </script> | 97 | +</script> |
103 | {{/if}} | 98 | {{/if}} |
104 | {{#if lifestyleHomePage}} | 99 | {{#if lifestyleHomePage}} |
105 | - <script> | 100 | +<script> |
106 | seajs.use('js/home/home'); | 101 | seajs.use('js/home/home'); |
107 | - </script> | 102 | +</script> |
108 | {{/if}} | 103 | {{/if}} |
109 | - | ||
110 | {{!-- 新品到着 --}} | 104 | {{!-- 新品到着 --}} |
111 | {{#if newArrival}} | 105 | {{#if newArrival}} |
112 | - <script> | 106 | +<script> |
113 | seajs.use('js/product/newsale/newarrival'); | 107 | seajs.use('js/product/newsale/newarrival'); |
114 | - </script> | 108 | +</script> |
115 | {{/if}} | 109 | {{/if}} |
116 | {{!-- 折扣专区 --}} | 110 | {{!-- 折扣专区 --}} |
117 | {{#if discount}} | 111 | {{#if discount}} |
118 | - <script> | 112 | +<script> |
119 | seajs.use('js/product/newsale/discount'); | 113 | seajs.use('js/product/newsale/discount'); |
120 | - </script> | 114 | +</script> |
121 | {{/if}} | 115 | {{/if}} |
122 | - | ||
123 | {{!-- 商品列表 --}} | 116 | {{!-- 商品列表 --}} |
124 | {{#if goodListPage}} | 117 | {{#if goodListPage}} |
125 | - <script> | 118 | +<script> |
126 | seajs.use('js/product/list'); | 119 | seajs.use('js/product/list'); |
127 | - </script> | 120 | +</script> |
128 | {{/if}} | 121 | {{/if}} |
129 | - | ||
130 | {{!-- 品类 --}} | 122 | {{!-- 品类 --}} |
131 | {{#if categoryPage}} | 123 | {{#if categoryPage}} |
132 | - <script> | 124 | +<script> |
133 | seajs.use('js/category/index'); | 125 | seajs.use('js/category/index'); |
134 | - </script> | 126 | +</script> |
135 | {{/if}} | 127 | {{/if}} |
136 | {{!-- 品牌 --}} | 128 | {{!-- 品牌 --}} |
137 | {{#if brandPage}} | 129 | {{#if brandPage}} |
138 | - <script> | 130 | +<script> |
139 | seajs.use('js/category/brand'); | 131 | seajs.use('js/category/brand'); |
140 | - </script> | 132 | +</script> |
141 | {{/if}} | 133 | {{/if}} |
142 | - | ||
143 | {{!-- 搜索 --}} | 134 | {{!-- 搜索 --}} |
144 | {{#if searchPage}} | 135 | {{#if searchPage}} |
145 | - <script> | 136 | +<script> |
146 | seajs.use('js/index/search'); | 137 | seajs.use('js/index/search'); |
147 | - </script> | 138 | +</script> |
148 | {{/if}} | 139 | {{/if}} |
149 | - | ||
150 | {{!-- 购物车 --}} | 140 | {{!-- 购物车 --}} |
151 | {{#if shoppingCartPage}} | 141 | {{#if shoppingCartPage}} |
152 | - <script> | 142 | +<script> |
153 | seajs.use('js/shopping-cart/index'); | 143 | seajs.use('js/shopping-cart/index'); |
154 | - </script> | 144 | +</script> |
155 | {{/if}} | 145 | {{/if}} |
-
Please register or login to post a comment