Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into develop
Showing
12 changed files
with
262 additions
and
17 deletions
@@ -15,8 +15,8 @@ | @@ -15,8 +15,8 @@ | ||
15 | {{# list}} | 15 | {{# list}} |
16 | {{#unless @last}} | 16 | {{#unless @last}} |
17 | <li> | 17 | <li> |
18 | - <a href="{{href}}"> | ||
19 | - <img class="lazy" data-original="{{img}}" alt=""> | 18 | + <a href="{{href}}" target= "_blank"> |
19 | + <img class="lazy" data-original="{{img}}" alt="" > | ||
20 | </a> | 20 | </a> |
21 | </li> | 21 | </li> |
22 | {{/unless}} | 22 | {{/unless}} |
@@ -26,7 +26,7 @@ | @@ -26,7 +26,7 @@ | ||
26 | {{# list}} | 26 | {{# list}} |
27 | {{#if @last}} | 27 | {{#if @last}} |
28 | <div class="last-item"> | 28 | <div class="last-item"> |
29 | - <a href="{{href}}"> | 29 | + <a href="{{href}}" target= "_blank"> |
30 | <img class="lazy" data-original="{{img}}" alt=""> | 30 | <img class="lazy" data-original="{{img}}" alt=""> |
31 | </a> | 31 | </a> |
32 | </div> | 32 | </div> |
@@ -43,7 +43,7 @@ | @@ -43,7 +43,7 @@ | ||
43 | <ul class="img-list clearfix"> | 43 | <ul class="img-list clearfix"> |
44 | {{# imgBrand}} | 44 | {{# imgBrand}} |
45 | <li class="img-item"> | 45 | <li class="img-item"> |
46 | - <a href="{{href}}"> | 46 | + <a href="{{href}}" target= "_blank"> |
47 | <img src="{{img}}" alt=""> | 47 | <img src="{{img}}" alt=""> |
48 | </a> | 48 | </a> |
49 | </li> | 49 | </li> |
@@ -70,7 +70,7 @@ | @@ -70,7 +70,7 @@ | ||
70 | {{! 广告}} | 70 | {{! 广告}} |
71 | {{# adbanner}} | 71 | {{# adbanner}} |
72 | <div class="floor-ad"> | 72 | <div class="floor-ad"> |
73 | - <a href="{{href}}" target= "_blank"><img class="lazy" data-original="{{img}}"/></a> | 73 | + <a href="{{href}}" target= "_blank"><img class="lazy" data-original="{{img}}"/></a> |
74 | </div> | 74 | </div> |
75 | {{/ adbanner}} | 75 | {{/ adbanner}} |
76 | 76 |
@@ -12,27 +12,38 @@ | @@ -12,27 +12,38 @@ | ||
12 | {{#if rlsEnv}} | 12 | {{#if rlsEnv}} |
13 | <link rel="stylesheet" href="http://cdn.yoho.cn/yohobuy/{{version}}/index.css"> | 13 | <link rel="stylesheet" href="http://cdn.yoho.cn/yohobuy/{{version}}/index.css"> |
14 | <!--[if lt IE 9]> | 14 | <!--[if lt IE 9]> |
15 | - <script src="http://cdn.yoho.cn/yohobuy/respond.min.js"></script> | 15 | + <script src="http://cdn.yoho.cn/yohobuy/respond/respond.min.js"></script> |
16 | + <link href="http://cdn.yoho.cn/yohobuy/respond/respond-proxy.html" id="respond-proxy" rel="respond-proxy" /> | ||
17 | + <script src="http://cdn.yoho.cn/yohobuy/respond/respond.proxy.js"></script> | ||
16 | <![endif]--> | 18 | <![endif]--> |
17 | {{/if}} | 19 | {{/if}} |
18 | {{#if preEnv}} | 20 | {{#if preEnv}} |
19 | <link rel="stylesheet" href="http://cdn.yoho.cn/yohobuy/{{version}}/index.css"> | 21 | <link rel="stylesheet" href="http://cdn.yoho.cn/yohobuy/{{version}}/index.css"> |
20 | <!--[if lt IE 9]> | 22 | <!--[if lt IE 9]> |
21 | - <script src="http://cdn.yoho.cn/yohobuy/respond.min.js"></script> | 23 | + <script src="http://cdn.yoho.cn/yohobuy/respond/respond.min.js"></script> |
24 | + <link href="http://cdn.yoho.cn/yohobuy/respond/respond-proxy.html" id="respond-proxy" rel="respond-proxy" /> | ||
25 | + <script src="http://cdn.yoho.cn/yohobuy/respond/respond.proxy.js"></script> | ||
22 | <![endif]--> | 26 | <![endif]--> |
23 | {{/if}} | 27 | {{/if}} |
24 | {{#if testEnv}} | 28 | {{#if testEnv}} |
25 | <link rel="stylesheet" href="http://static.buy.test.yoho.cn/dist/yohobuy/{{version}}/index.css"> | 29 | <link rel="stylesheet" href="http://static.buy.test.yoho.cn/dist/yohobuy/{{version}}/index.css"> |
26 | <!--[if lt IE 9]> | 30 | <!--[if lt IE 9]> |
27 | - <script src="http://static.buy.test.yoho.cn/dist/yohobuy/respond.min.js"></script> | 31 | + <script src="http://static.buy.test.yoho.cn/dist/yohobuy/respond/respond.min.js"></script> |
32 | + <link href="http://static.buy.test.yoho.cn/dist/yohobuy/respond/respond-proxy.html" id="respond-proxy" rel="respond-proxy" /> | ||
33 | + <script src="http://static.buy.test.yoho.cn/dist/yohobuy/respond/respond.proxy.js"></script> | ||
28 | <![endif]--> | 34 | <![endif]--> |
29 | {{/if}} | 35 | {{/if}} |
30 | {{#if devEnv}} | 36 | {{#if devEnv}} |
31 | <link rel="stylesheet" href="http://webstatic.dev.yohobuy.com/css/index.css"> | 37 | <link rel="stylesheet" href="http://webstatic.dev.yohobuy.com/css/index.css"> |
32 | <!--[if lt IE 9]> | 38 | <!--[if lt IE 9]> |
33 | - <script src="http://webstatic.dev.yohobuy.com/plugin/page-use/respond.min.js"></script> | 39 | + <script src="http://webstatic.dev.yohobuy.com/plugin/page/respond/respond.min.js"></script> |
40 | + <link href="http://webstatic.dev.yohobuy.com/plugin/page/respond/respond-proxy.html" id="respond-proxy" rel="respond-proxy" /> | ||
41 | + <script src="http://webstatic.dev.yohobuy.com/plugin/page/respond/respond.proxy.js"></script> | ||
34 | <![endif]--> | 42 | <![endif]--> |
35 | {{/if}} | 43 | {{/if}} |
44 | + <!--[if lt IE 9]> | ||
45 | + <link href="proxy/respond.proxy.gif" id="respond-redirect" rel="respond-redirect" /> | ||
46 | + <![endif]--> | ||
36 | </head> | 47 | </head> |
37 | <body> | 48 | <body> |
38 | {{> layout/page-header}} | 49 | {{> layout/page-header}} |
@@ -133,9 +133,9 @@ | @@ -133,9 +133,9 @@ | ||
133 | 133 | ||
134 | <div class="ud-price-range"> | 134 | <div class="ud-price-range"> |
135 | ¥ | 135 | ¥ |
136 | - <input type="text" class="min limit"> | 136 | + <input type="text" class="min limit" value="{{customPrice.min}}"> |
137 | <span class="price-sep">-</span> | 137 | <span class="price-sep">-</span> |
138 | - <input type="text" class="max limit"> | 138 | + <input type="text" class="max limit" value="{{customPrice.max}}"> |
139 | 139 | ||
140 | <button class="price-sure hide">确定</button> | 140 | <button class="price-sure hide">确定</button> |
141 | </div> | 141 | </div> |
@@ -195,6 +195,6 @@ gulp.task('business', ['libs'], function() { | @@ -195,6 +195,6 @@ gulp.task('business', ['libs'], function() { | ||
195 | 195 | ||
196 | //页面需要直接标签引用的JS | 196 | //页面需要直接标签引用的JS |
197 | gulp.task('script', function() { | 197 | gulp.task('script', function() { |
198 | - gulp.src('plugin/page-use/*') | 198 | + gulp.src('plugin/page/**/*') |
199 | .pipe(gulp.dest(rootDist)); | 199 | .pipe(gulp.dest(rootDist)); |
200 | }); | 200 | }); |
1 | +<!-- Respond.js: min/max-width media query polyfill. Remote proxy (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs --> | ||
2 | +<!DOCTYPE html> | ||
3 | +<html> | ||
4 | +<head> | ||
5 | + <meta charset="utf-8" /> | ||
6 | + <title>Respond JS Proxy</title> | ||
7 | +</head> | ||
8 | +<body> | ||
9 | + <script> | ||
10 | + (function () { | ||
11 | + var domain, css, query, getQueryString, ajax, xmlHttp; | ||
12 | + | ||
13 | + /* | ||
14 | + http://stackoverflow.com/questions/4963673/get-url-array-variables-in-javascript-jquery/4963817#4963817 | ||
15 | + */ | ||
16 | + getQueryString = function() { | ||
17 | + var ret = {}, parts, i, p; | ||
18 | + | ||
19 | + parts = (document.location.toString().split("?")[1]).split("&"); | ||
20 | + | ||
21 | + for (i = 0; i < parts.length; i++) { | ||
22 | + | ||
23 | + p = parts[i].split("="); | ||
24 | + // so strings will be correctly parsed: | ||
25 | + p[1] = decodeURIComponent(p[1].replace(/\+/g, " ")); | ||
26 | + | ||
27 | + if (p[0].search(/\[\]/) >= 0) { // then it"s an array | ||
28 | + p[0] = p[0].replace("[]", ""); | ||
29 | + | ||
30 | + if (typeof ret[p[0]] != "object") { | ||
31 | + ret[p[0]] = []; | ||
32 | + } | ||
33 | + ret[p[0]].push(p[1]); | ||
34 | + } else { | ||
35 | + ret[p[0]] = p[1]; | ||
36 | + } | ||
37 | + } | ||
38 | + return ret; | ||
39 | + }; | ||
40 | + | ||
41 | + ajax = function( url, callback ) { | ||
42 | + var req = xmlHttp(); | ||
43 | + if (!req){ | ||
44 | + return; | ||
45 | + } | ||
46 | + req.open( "GET", url, true ); | ||
47 | + req.onreadystatechange = function () { | ||
48 | + if ( req.readyState != 4 || req.status != 200 && req.status != 304 ){ | ||
49 | + return; | ||
50 | + } | ||
51 | + callback( req.responseText ); | ||
52 | + }; | ||
53 | + if ( req.readyState == 4 ){ | ||
54 | + return; | ||
55 | + } | ||
56 | + req.send(); | ||
57 | + }; | ||
58 | + | ||
59 | + //define ajax obj | ||
60 | + xmlHttp = (function() { | ||
61 | + var xmlhttpmethod = false, | ||
62 | + attempts = [ | ||
63 | + function(){ return new XMLHttpRequest(); }, | ||
64 | + function(){ return new ActiveXObject("Microsoft.XMLHTTP"); }, | ||
65 | + function(){ return new ActiveXObject("MSXML2.XMLHTTP.3.0"); } | ||
66 | + ], | ||
67 | + al = attempts.length; | ||
68 | + | ||
69 | + while( al-- ){ | ||
70 | + try { | ||
71 | + xmlhttpmethod = attempts[ al ](); | ||
72 | + } | ||
73 | + catch(e) { | ||
74 | + continue; | ||
75 | + } | ||
76 | + break; | ||
77 | + } | ||
78 | + return function(){ | ||
79 | + return xmlhttpmethod; | ||
80 | + }; | ||
81 | + })(); | ||
82 | + | ||
83 | + query = getQueryString(); | ||
84 | + css = query["css"]; | ||
85 | + domain = query["url"]; | ||
86 | + | ||
87 | + if (css && domain) { | ||
88 | + ajax(css, function (response) { | ||
89 | + window.name = response; | ||
90 | + window.location.href = domain; | ||
91 | + }); | ||
92 | + } | ||
93 | + }()); | ||
94 | + </script> | ||
95 | +</body> | ||
96 | +</html> |
1 | +/*! Respond.js: min/max-width media query polyfill. Remote proxy (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ | ||
2 | +(function(win, doc, undefined){ | ||
3 | + var docElem = doc.documentElement, | ||
4 | + proxyURL = doc.getElementById("respond-proxy").href, | ||
5 | + redirectURL = (doc.getElementById("respond-redirect") || location).href, | ||
6 | + baseElem = doc.getElementsByTagName("base")[0], | ||
7 | + urls = [], | ||
8 | + refNode; | ||
9 | + | ||
10 | + function encode(url){ | ||
11 | + return win.encodeURIComponent(url); | ||
12 | + } | ||
13 | + | ||
14 | + function fakejax( url, callback ){ | ||
15 | + | ||
16 | + var iframe, | ||
17 | + AXO; | ||
18 | + | ||
19 | + // All hail Google http://j.mp/iKMI19 | ||
20 | + // Behold, an iframe proxy without annoying clicky noises. | ||
21 | + if ( "ActiveXObject" in win ) { | ||
22 | + AXO = new ActiveXObject( "htmlfile" ); | ||
23 | + AXO.open(); | ||
24 | + AXO.write( '<iframe id="x"></iframe>' ); | ||
25 | + AXO.close(); | ||
26 | + iframe = AXO.getElementById( "x" ); | ||
27 | + } else { | ||
28 | + iframe = doc.createElement( "iframe" ); | ||
29 | + iframe.style.cssText = "position:absolute;top:-99em"; | ||
30 | + docElem.insertBefore(iframe, docElem.firstElementChild || docElem.firstChild ); | ||
31 | + } | ||
32 | + | ||
33 | + iframe.src = checkBaseURL(proxyURL) + "?url=" + encode(redirectURL) + "&css=" + encode(checkBaseURL(url)); | ||
34 | + | ||
35 | + function checkFrameName() { | ||
36 | + var cssText; | ||
37 | + | ||
38 | + try { | ||
39 | + cssText = iframe.contentWindow.name; | ||
40 | + } | ||
41 | + catch (e) { } | ||
42 | + | ||
43 | + if (cssText) { | ||
44 | + // We've got what we need. Stop the iframe from loading further content. | ||
45 | + iframe.src = "about:blank"; | ||
46 | + iframe.parentNode.removeChild(iframe); | ||
47 | + iframe = null; | ||
48 | + | ||
49 | + | ||
50 | + // Per http://j.mp/kn9EPh, not taking any chances. Flushing the ActiveXObject | ||
51 | + if (AXO) { | ||
52 | + AXO = null; | ||
53 | + | ||
54 | + if (win.CollectGarbage) { | ||
55 | + win.CollectGarbage(); | ||
56 | + } | ||
57 | + } | ||
58 | + | ||
59 | + callback(cssText); | ||
60 | + } | ||
61 | + else{ | ||
62 | + win.setTimeout(checkFrameName, 100); | ||
63 | + } | ||
64 | + } | ||
65 | + | ||
66 | + win.setTimeout(checkFrameName, 500); | ||
67 | + } | ||
68 | + | ||
69 | + // http://stackoverflow.com/a/472729 | ||
70 | + function checkBaseURL(href) { | ||
71 | + var el = document.createElement('div'), | ||
72 | + escapedURL = href.split('&').join('&'). | ||
73 | + split('<').join('<'). | ||
74 | + split('"').join('"'); | ||
75 | + | ||
76 | + el.innerHTML = '<a href="' + escapedURL + '">x</a>'; | ||
77 | + return el.firstChild.href; | ||
78 | + } | ||
79 | + | ||
80 | + function checkRedirectURL() { | ||
81 | + // IE6 & IE7 don't build out absolute urls in <link /> attributes. | ||
82 | + // So respond.proxy.gif remains relative instead of http://example.com/respond.proxy.gif. | ||
83 | + // This trickery resolves that issue. | ||
84 | + if (~ !redirectURL.indexOf(location.host)) { | ||
85 | + | ||
86 | + var fakeLink = doc.createElement("div"); | ||
87 | + | ||
88 | + fakeLink.innerHTML = '<a href="' + redirectURL + '"></a>'; | ||
89 | + docElem.insertBefore(fakeLink, docElem.firstElementChild || docElem.firstChild ); | ||
90 | + | ||
91 | + // Grab the parsed URL from that dummy object | ||
92 | + redirectURL = fakeLink.firstChild.href; | ||
93 | + | ||
94 | + // Clean up | ||
95 | + fakeLink.parentNode.removeChild(fakeLink); | ||
96 | + fakeLink = null; | ||
97 | + } | ||
98 | + } | ||
99 | + | ||
100 | + function buildUrls(){ | ||
101 | + var links = doc.getElementsByTagName( "link" ); | ||
102 | + | ||
103 | + for( var i = 0, linkl = links.length; i < linkl; i++ ){ | ||
104 | + | ||
105 | + var thislink = links[i], | ||
106 | + href = links[i].href, | ||
107 | + extreg = (/^([a-zA-Z:]*\/\/(www\.)?)/).test( href ), | ||
108 | + ext = (baseElem && !extreg) || extreg; | ||
109 | + | ||
110 | + //make sure it's an external stylesheet | ||
111 | + if( thislink.rel.indexOf( "stylesheet" ) >= 0 && ext ){ | ||
112 | + (function( link ){ | ||
113 | + fakejax( href, function( css ){ | ||
114 | + link.styleSheet.rawCssText = css; | ||
115 | + respond.update(); | ||
116 | + } ); | ||
117 | + })( thislink ); | ||
118 | + } | ||
119 | + } | ||
120 | + | ||
121 | + | ||
122 | + } | ||
123 | + | ||
124 | + if( !respond.mediaQueriesSupported ){ | ||
125 | + checkRedirectURL(); | ||
126 | + buildUrls(); | ||
127 | + } | ||
128 | + | ||
129 | +})( window, document ); |
@@ -74,7 +74,7 @@ class HomeModel | @@ -74,7 +74,7 @@ class HomeModel | ||
74 | 'index_main' => 0, | 74 | 'index_main' => 0, |
75 | 'is_hot' => $val['is_hot'] == 'Y' ? true : false, | 75 | 'is_hot' => $val['is_hot'] == 'Y' ? true : false, |
76 | 'is_new' => $val['is_new'] == 'Y' ? true : false, | 76 | 'is_new' => $val['is_new'] == 'Y' ? true : false, |
77 | - 'subnav' => array() | 77 | + // 'subnav' => array() |
78 | ); | 78 | ); |
79 | foreach ($val['sub'] as $sub) { // 二级 | 79 | foreach ($val['sub'] as $sub) { // 二级 |
80 | $index_sub = 0; | 80 | $index_sub = 0; |
@@ -84,7 +84,7 @@ class HomeModel | @@ -84,7 +84,7 @@ class HomeModel | ||
84 | 'link' => $sub['sort_url'], | 84 | 'link' => $sub['sort_url'], |
85 | 'is_hot' => $sub['is_hot'] == 'Y' ? true : false, | 85 | 'is_hot' => $sub['is_hot'] == 'Y' ? true : false, |
86 | 'is_new' => $sub['is_new'] == 'Y' ? true : false, | 86 | 'is_new' => $sub['is_new'] == 'Y' ? true : false, |
87 | - 'thirdnav' => array(), | 87 | + // 'thirdnav' => array(), |
88 | 'index_sub' => $index_sub ++ | 88 | 'index_sub' => $index_sub ++ |
89 | ); | 89 | ); |
90 | if (isset($sub['sub'])) { | 90 | if (isset($sub['sub'])) { |
@@ -93,7 +93,7 @@ class HomeModel | @@ -93,7 +93,7 @@ class HomeModel | ||
93 | 'title' => $thirdsub['sort_name'], | 93 | 'title' => $thirdsub['sort_name'], |
94 | 'name_en' => $thirdsub['sort_name_en'], | 94 | 'name_en' => $thirdsub['sort_name_en'], |
95 | 'link' => $thirdsub['sort_url'], | 95 | 'link' => $thirdsub['sort_url'], |
96 | - 'branditems' => array() | 96 | + // 'branditems' => array() |
97 | ); | 97 | ); |
98 | if (isset($thirdsub['sub'])) { | 98 | if (isset($thirdsub['sub'])) { |
99 | foreach ($thirdsub['sub'] as $fourthnav) { // 四级 | 99 | foreach ($thirdsub['sub'] as $fourthnav) { // 四级 |
@@ -107,6 +107,7 @@ class HomeModel | @@ -107,6 +107,7 @@ class HomeModel | ||
107 | $subnav['thirdnav'][] = $thirdnav; | 107 | $subnav['thirdnav'][] = $thirdnav; |
108 | } | 108 | } |
109 | } | 109 | } |
110 | + | ||
110 | $item['subnav'][] = $subnav; | 111 | $item['subnav'][] = $subnav; |
111 | } | 112 | } |
112 | $menu[] = $item; | 113 | $menu[] = $item; |
@@ -20,7 +20,7 @@ class RegisterController extends WebAction | @@ -20,7 +20,7 @@ class RegisterController extends WebAction | ||
20 | 'actionUrl' => '/passport/register/mobileregister', | 20 | 'actionUrl' => '/passport/register/mobileregister', |
21 | 'region' => RegData::getAreasData(), | 21 | 'region' => RegData::getAreasData(), |
22 | 'location' => '+86', | 22 | 'location' => '+86', |
23 | - 'captchaUrl' => 'http://web.dev.yohobuy.com/passport/images?t=1449799445', | 23 | + 'captchaUrl' => '/passport/images?t=1449799445', |
24 | 'itemUrl' => '##', | 24 | 'itemUrl' => '##', |
25 | 'referUrl' => $refer, | 25 | 'referUrl' => $refer, |
26 | 'loginUrl' => '/signin.html?refer='.$refer, | 26 | 'loginUrl' => '/signin.html?refer='.$refer, |
@@ -48,7 +48,7 @@ class RegisterController extends WebAction | @@ -48,7 +48,7 @@ class RegisterController extends WebAction | ||
48 | 'actionUrl' => '/passport/register/mobileregister', | 48 | 'actionUrl' => '/passport/register/mobileregister', |
49 | 'region' => RegData::getAreasData(), | 49 | 'region' => RegData::getAreasData(), |
50 | 'location' => '+86', | 50 | 'location' => '+86', |
51 | - 'captchaUrl' => 'http://web.dev.yohobuy.com/passport/images?t=1449799445', | 51 | + 'captchaUrl' => '/passport/images?t=1449799445', |
52 | 'itemUrl' => '##', | 52 | 'itemUrl' => '##', |
53 | 'referUrl' => $refer, | 53 | 'referUrl' => $refer, |
54 | 'skipUrl' => '/signin.html?refer='.$refer, | 54 | 'skipUrl' => '/signin.html?refer='.$refer, |
@@ -198,6 +198,10 @@ class Index1Controller extends AbstractAction | @@ -198,6 +198,10 @@ class Index1Controller extends AbstractAction | ||
198 | 'name' => '240-329' | 198 | 'name' => '240-329' |
199 | ) | 199 | ) |
200 | ), | 200 | ), |
201 | + 'customPrice' => array( | ||
202 | + 'min' => 1, | ||
203 | + 'max' => 99 | ||
204 | + ), | ||
201 | 'color' => array( | 205 | 'color' => array( |
202 | array( | 206 | array( |
203 | 'href' => '', | 207 | 'href' => '', |
35 Bytes
-
Please register or login to post a comment