Authored by lore-w

Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into develop

... ... @@ -489,6 +489,10 @@
},
...
],
customPrice: {
min: 1,
max: 99
},
color: [
{
href: '',
... ...
... ... @@ -15,8 +15,8 @@
{{# list}}
{{#unless @last}}
<li>
<a href="{{href}}">
<img class="lazy" data-original="{{img}}" alt="">
<a href="{{href}}" target= "_blank">
<img class="lazy" data-original="{{img}}" alt="" >
</a>
</li>
{{/unless}}
... ... @@ -26,7 +26,7 @@
{{# list}}
{{#if @last}}
<div class="last-item">
<a href="{{href}}">
<a href="{{href}}" target= "_blank">
<img class="lazy" data-original="{{img}}" alt="">
</a>
</div>
... ... @@ -43,7 +43,7 @@
<ul class="img-list clearfix">
{{# imgBrand}}
<li class="img-item">
<a href="{{href}}">
<a href="{{href}}" target= "_blank">
<img src="{{img}}" alt="">
</a>
</li>
... ... @@ -70,7 +70,7 @@
{{! 广告}}
{{# adbanner}}
<div class="floor-ad">
<a href="{{href}}" target= "_blank"><img class="lazy" data-original="{{img}}"/></a>
<a href="{{href}}" target= "_blank"><img class="lazy" data-original="{{img}}"/></a>
</div>
{{/ adbanner}}
... ...
... ... @@ -12,27 +12,38 @@
{{#if rlsEnv}}
<link rel="stylesheet" href="http://cdn.yoho.cn/yohobuy/{{version}}/index.css">
<!--[if lt IE 9]>
<script src="http://cdn.yoho.cn/yohobuy/respond.min.js"></script>
<script src="http://cdn.yoho.cn/yohobuy/respond/respond.min.js"></script>
<link href="http://cdn.yoho.cn/yohobuy/respond/respond-proxy.html" id="respond-proxy" rel="respond-proxy" />
<script src="http://cdn.yoho.cn/yohobuy/respond/respond.proxy.js"></script>
<![endif]-->
{{/if}}
{{#if preEnv}}
<link rel="stylesheet" href="http://cdn.yoho.cn/yohobuy/{{version}}/index.css">
<!--[if lt IE 9]>
<script src="http://cdn.yoho.cn/yohobuy/respond.min.js"></script>
<script src="http://cdn.yoho.cn/yohobuy/respond/respond.min.js"></script>
<link href="http://cdn.yoho.cn/yohobuy/respond/respond-proxy.html" id="respond-proxy" rel="respond-proxy" />
<script src="http://cdn.yoho.cn/yohobuy/respond/respond.proxy.js"></script>
<![endif]-->
{{/if}}
{{#if testEnv}}
<link rel="stylesheet" href="http://static.buy.test.yoho.cn/dist/yohobuy/{{version}}/index.css">
<!--[if lt IE 9]>
<script src="http://static.buy.test.yoho.cn/dist/yohobuy/respond.min.js"></script>
<script src="http://static.buy.test.yoho.cn/dist/yohobuy/respond/respond.min.js"></script>
<link href="http://static.buy.test.yoho.cn/dist/yohobuy/respond/respond-proxy.html" id="respond-proxy" rel="respond-proxy" />
<script src="http://static.buy.test.yoho.cn/dist/yohobuy/respond/respond.proxy.js"></script>
<![endif]-->
{{/if}}
{{#if devEnv}}
<link rel="stylesheet" href="http://webstatic.dev.yohobuy.com/css/index.css">
<!--[if lt IE 9]>
<script src="http://webstatic.dev.yohobuy.com/plugin/page-use/respond.min.js"></script>
<script src="http://webstatic.dev.yohobuy.com/plugin/page/respond/respond.min.js"></script>
<link href="http://webstatic.dev.yohobuy.com/plugin/page/respond/respond-proxy.html" id="respond-proxy" rel="respond-proxy" />
<script src="http://webstatic.dev.yohobuy.com/plugin/page/respond/respond.proxy.js"></script>
<![endif]-->
{{/if}}
<!--[if lt IE 9]>
<link href="proxy/respond.proxy.gif" id="respond-redirect" rel="respond-redirect" />
<![endif]-->
</head>
<body>
{{> layout/page-header}}
\ No newline at end of file
... ...
... ... @@ -133,9 +133,9 @@
<div class="ud-price-range">
¥
<input type="text" class="min limit">
<input type="text" class="min limit" value="{{customPrice.min}}">
<span class="price-sep">-</span>
<input type="text" class="max limit">
<input type="text" class="max limit" value="{{customPrice.max}}">
<button class="price-sure hide">确定</button>
</div>
... ...
... ... @@ -195,6 +195,6 @@ gulp.task('business', ['libs'], function() {
//页面需要直接标签引用的JS
gulp.task('script', function() {
gulp.src('plugin/page-use/*')
gulp.src('plugin/page/**/*')
.pipe(gulp.dest(rootDist));
});
\ No newline at end of file
... ...
<!-- Respond.js: min/max-width media query polyfill. Remote proxy (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Respond JS Proxy</title>
</head>
<body>
<script>
(function () {
var domain, css, query, getQueryString, ajax, xmlHttp;
/*
http://stackoverflow.com/questions/4963673/get-url-array-variables-in-javascript-jquery/4963817#4963817
*/
getQueryString = function() {
var ret = {}, parts, i, p;
parts = (document.location.toString().split("?")[1]).split("&");
for (i = 0; i < parts.length; i++) {
p = parts[i].split("=");
// so strings will be correctly parsed:
p[1] = decodeURIComponent(p[1].replace(/\+/g, " "));
if (p[0].search(/\[\]/) >= 0) { // then it"s an array
p[0] = p[0].replace("[]", "");
if (typeof ret[p[0]] != "object") {
ret[p[0]] = [];
}
ret[p[0]].push(p[1]);
} else {
ret[p[0]] = p[1];
}
}
return ret;
};
ajax = function( url, callback ) {
var req = xmlHttp();
if (!req){
return;
}
req.open( "GET", url, true );
req.onreadystatechange = function () {
if ( req.readyState != 4 || req.status != 200 && req.status != 304 ){
return;
}
callback( req.responseText );
};
if ( req.readyState == 4 ){
return;
}
req.send();
};
//define ajax obj
xmlHttp = (function() {
var xmlhttpmethod = false,
attempts = [
function(){ return new XMLHttpRequest(); },
function(){ return new ActiveXObject("Microsoft.XMLHTTP"); },
function(){ return new ActiveXObject("MSXML2.XMLHTTP.3.0"); }
],
al = attempts.length;
while( al-- ){
try {
xmlhttpmethod = attempts[ al ]();
}
catch(e) {
continue;
}
break;
}
return function(){
return xmlhttpmethod;
};
})();
query = getQueryString();
css = query["css"];
domain = query["url"];
if (css && domain) {
ajax(css, function (response) {
window.name = response;
window.location.href = domain;
});
}
}());
</script>
</body>
</html>
\ No newline at end of file
... ...
/*! Respond.js: min/max-width media query polyfill. Remote proxy (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */
(function(win, doc, undefined){
var docElem = doc.documentElement,
proxyURL = doc.getElementById("respond-proxy").href,
redirectURL = (doc.getElementById("respond-redirect") || location).href,
baseElem = doc.getElementsByTagName("base")[0],
urls = [],
refNode;
function encode(url){
return win.encodeURIComponent(url);
}
function fakejax( url, callback ){
var iframe,
AXO;
// All hail Google http://j.mp/iKMI19
// Behold, an iframe proxy without annoying clicky noises.
if ( "ActiveXObject" in win ) {
AXO = new ActiveXObject( "htmlfile" );
AXO.open();
AXO.write( '<iframe id="x"></iframe>' );
AXO.close();
iframe = AXO.getElementById( "x" );
} else {
iframe = doc.createElement( "iframe" );
iframe.style.cssText = "position:absolute;top:-99em";
docElem.insertBefore(iframe, docElem.firstElementChild || docElem.firstChild );
}
iframe.src = checkBaseURL(proxyURL) + "?url=" + encode(redirectURL) + "&css=" + encode(checkBaseURL(url));
function checkFrameName() {
var cssText;
try {
cssText = iframe.contentWindow.name;
}
catch (e) { }
if (cssText) {
// We've got what we need. Stop the iframe from loading further content.
iframe.src = "about:blank";
iframe.parentNode.removeChild(iframe);
iframe = null;
// Per http://j.mp/kn9EPh, not taking any chances. Flushing the ActiveXObject
if (AXO) {
AXO = null;
if (win.CollectGarbage) {
win.CollectGarbage();
}
}
callback(cssText);
}
else{
win.setTimeout(checkFrameName, 100);
}
}
win.setTimeout(checkFrameName, 500);
}
// http://stackoverflow.com/a/472729
function checkBaseURL(href) {
var el = document.createElement('div'),
escapedURL = href.split('&').join('&amp;').
split('<').join('&lt;').
split('"').join('&quot;');
el.innerHTML = '<a href="' + escapedURL + '">x</a>';
return el.firstChild.href;
}
function checkRedirectURL() {
// IE6 & IE7 don't build out absolute urls in <link /> attributes.
// So respond.proxy.gif remains relative instead of http://example.com/respond.proxy.gif.
// This trickery resolves that issue.
if (~ !redirectURL.indexOf(location.host)) {
var fakeLink = doc.createElement("div");
fakeLink.innerHTML = '<a href="' + redirectURL + '"></a>';
docElem.insertBefore(fakeLink, docElem.firstElementChild || docElem.firstChild );
// Grab the parsed URL from that dummy object
redirectURL = fakeLink.firstChild.href;
// Clean up
fakeLink.parentNode.removeChild(fakeLink);
fakeLink = null;
}
}
function buildUrls(){
var links = doc.getElementsByTagName( "link" );
for( var i = 0, linkl = links.length; i < linkl; i++ ){
var thislink = links[i],
href = links[i].href,
extreg = (/^([a-zA-Z:]*\/\/(www\.)?)/).test( href ),
ext = (baseElem && !extreg) || extreg;
//make sure it's an external stylesheet
if( thislink.rel.indexOf( "stylesheet" ) >= 0 && ext ){
(function( link ){
fakejax( href, function( css ){
link.styleSheet.rawCssText = css;
respond.update();
} );
})( thislink );
}
}
}
if( !respond.mediaQueriesSupported ){
checkRedirectURL();
buildUrls();
}
})( window, document );
... ...
... ... @@ -74,7 +74,7 @@ class HomeModel
'index_main' => 0,
'is_hot' => $val['is_hot'] == 'Y' ? true : false,
'is_new' => $val['is_new'] == 'Y' ? true : false,
'subnav' => array()
// 'subnav' => array()
);
foreach ($val['sub'] as $sub) { // 二级
$index_sub = 0;
... ... @@ -84,7 +84,7 @@ class HomeModel
'link' => $sub['sort_url'],
'is_hot' => $sub['is_hot'] == 'Y' ? true : false,
'is_new' => $sub['is_new'] == 'Y' ? true : false,
'thirdnav' => array(),
// 'thirdnav' => array(),
'index_sub' => $index_sub ++
);
if (isset($sub['sub'])) {
... ... @@ -93,7 +93,7 @@ class HomeModel
'title' => $thirdsub['sort_name'],
'name_en' => $thirdsub['sort_name_en'],
'link' => $thirdsub['sort_url'],
'branditems' => array()
// 'branditems' => array()
);
if (isset($thirdsub['sub'])) {
foreach ($thirdsub['sub'] as $fourthnav) { // 四级
... ... @@ -107,6 +107,7 @@ class HomeModel
$subnav['thirdnav'][] = $thirdnav;
}
}
$item['subnav'][] = $subnav;
}
$menu[] = $item;
... ...
... ... @@ -20,7 +20,7 @@ class RegisterController extends WebAction
'actionUrl' => '/passport/register/mobileregister',
'region' => RegData::getAreasData(),
'location' => '+86',
'captchaUrl' => 'http://web.dev.yohobuy.com/passport/images?t=1449799445',
'captchaUrl' => '/passport/images?t=1449799445',
'itemUrl' => '##',
'referUrl' => $refer,
'loginUrl' => '/signin.html?refer='.$refer,
... ... @@ -48,7 +48,7 @@ class RegisterController extends WebAction
'actionUrl' => '/passport/register/mobileregister',
'region' => RegData::getAreasData(),
'location' => '+86',
'captchaUrl' => 'http://web.dev.yohobuy.com/passport/images?t=1449799445',
'captchaUrl' => '/passport/images?t=1449799445',
'itemUrl' => '##',
'referUrl' => $refer,
'skipUrl' => '/signin.html?refer='.$refer,
... ...
... ... @@ -198,6 +198,10 @@ class Index1Controller extends AbstractAction
'name' => '240-329'
)
),
'customPrice' => array(
'min' => 1,
'max' => 99
),
'color' => array(
array(
'href' => '',
... ...