Authored by zhangxiaoru

冲突

... ... @@ -8,15 +8,32 @@
const service = global.yoho.ServiceAPI;
const helpers = global.yoho.helpers;
const _ = require('lodash');
const index = () => {
const _indexBoys = () => {
return service.get('/operations/api/v5/resource/home', {
content_code: '797c299afc4170452cf7b2048806b6b8',
gender: 1,
limit: 1000,
page: 1
});
};
const _index = () => {
return service.get('/operations/api/v5/resource/home', {
content_code: '5a9b5bcfd2e13d56c9ba6b867a325dc1',
content_code: '8512bf0755cc549ac323f852c9fd945d',
gender: 1,
limit: 1000,
page: 1,
debug: 'XYZ'
}).then(result => {
page: 1
});
};
const index = () => {
return service.all([
_indexBoys(),
_index()
]).then(result => {
let resu = {
swiper: [],
... ... @@ -25,17 +42,17 @@ const index = () => {
download: []
};
if (result.data.list[0]) {
if (result[0].data.list[0] && result[0].data) {
let headerTip = result.data.list[0].data.text;
let headerTip = result[0].data.list[0].data.text;
resu = Object.assign(resu, { headerTip });
}
if (result.data.list[1]) {
if (result[1].data.list[0].data && result[1].data) {
let adList = result.data.list[1].data.list;
let adList = result[1].data.list[0].data;
let build = [];
... ... @@ -48,9 +65,13 @@ const index = () => {
resu.swiper = build;
let floorList = result.data.list[1].data.list;
}
if (result[0].data.list[1] && result[0].data) {
let floorList = result[0].data.list[1].data.list;
let floorAdListTitle = result.data.list[1].data.title.title;
let floorAdListTitle = result[0].data.list[1].data.title.title;
resu = _.assign(resu, { floorAdListTitle });
... ... @@ -73,9 +94,9 @@ const index = () => {
}
if (result.data.list[2]) {
if (result[0].data.list[2] && result[0].data) {
let newsList = result.data.list[2].data.list[0];
let newsList = result[0].data.list[2].data.list[0];
let news = [{
img: helpers.image(newsList.src, 640, 370),
... ... @@ -88,9 +109,9 @@ const index = () => {
}
if (result.data.list[3]) {
if (result[0].data.list[3] && result[0].data) {
let downlist = result.data.list[3].data[0];
let downlist = result[0].data.list[3].data[0];
let down = [{
img: helpers.image(downlist.src, 640, 275),
... ...
... ... @@ -38,7 +38,7 @@ let _processCateData = (list, channel) => {
secondItem.url = helpers.urlFormat('/', {
sort: _.get(secondItem, 'relationParameter.sort'),
sort_name: secondItem.categoryName,
gender: genderMap[channel] || ''
gender: genderMap[key] || ''
}, 'list');
});
... ... @@ -47,14 +47,14 @@ let _processCateData = (list, channel) => {
url: helpers.urlFormat('/', {
sort: _.get(firstItem, 'relationParameter.sort'),
sort_name: firstItem.categoryName,
gender: genderMap[channel] || ''
gender: genderMap[key] || ''
}, 'list')
});
} else {
firstItem.url = helpers.urlFormat('/', {
sort: _.get(firstItem, 'relationParameter.sort'),
sort_name: firstItem.categoryName,
gender: genderMap[channel] || ''
gender: genderMap[key] || ''
}, 'list');
}
});
... ...
<div class="resources">
<!--banner-->
{{#each result.focus1}}
{{> resources/banner-top}}
<div class="banner-top">
<div class="banner-swiper swiper-container">
<ul class="swiper-wrapper">
{{#each data}}
{{#if @first}}
<li class="swiper-slide">
<a href="{{url}}">
<img src="{{image src 750 364}}">
</a>
</li>
{{^}}
<li class="swiper-slide">
<a href="{{url}}">
<img class="swiper-lazy" data-src="{{image src 750 364}}">
</a>
<div class="swiper-lazy-preloader"></div>
</li>
{{/if}}
{{/each}}
</ul>
</div>
<div class="swiper-pagination">
<div class="pagination-inner">
</div>
</div>
</div>
{{/each}}
{{#each result.title_image}}
... ...
This diff could not be displayed because it is too large.
... ... @@ -920,6 +920,9 @@ const _detailDataPkg = (origin, uid, vipLevel, ua) => {
};
let _getShopsInfo = (brandId) => {
if(!brandId) {
return Promise.resolve([]);
}
return api.get('', {
method: 'app.shop.queryShopsByBrandId',
brand_id: _.toString(brandId)
... ... @@ -1005,7 +1008,7 @@ let getProductData = (data) => {
}
result = result.data;
return Promise.all([
_getShopsInfo(result.brandInfo.brandId),
_getShopsInfo(_.get(result, 'brandInfo.brandId', 0)),
_getPromotionInfo(result.productSkn),
comment.getCommentInfo({
productId: result.productId
... ...
... ... @@ -16,9 +16,9 @@ module.exports = {
siteUrl: '//m.yohobuy.com',
assetUrl: '//localhost:5001',
domains: {
api: 'http://api.yoho.cn/',
service: 'http://service.yoho.cn/',
liveApi: 'http://testapi.live.yohops.com:9999/'
api: 'http://api.yoho.yohoops.org/',
service: 'http://service.yoho.yohoops.org/',
liveApi: 'http://api.live.yoho.cn/'
},
subDomains: {
host: '.m.yohobuy.com',
... ...
{
"name": "m-yohobuy-node",
"version": "4.9.12",
"version": "4.9.27",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ... @@ -31,20 +31,20 @@
},
"license": "MIT",
"dependencies": {
"bluebird": "^3.4.1",
"bluebird": "^3.4.3",
"body-parser": "^1.15.2",
"cheerio": "^0.22.0",
"connect-memcached": "^0.2.0",
"cookie-parser": "^1.4.3",
"express": "^4.14.0",
"express-handlebars": "^3.0.0",
"express-session": "^1.14.0",
"express-session": "^1.14.1",
"influxdb-winston": "^1.0.1",
"lodash": "^4.15.0",
"md5": "^2.1.0",
"memcached": "^2.2.1",
"moment": "^2.14.1",
"morgan": "^1.7.0",
"oneapm": "^1.2.20",
"passport": "^0.3.2",
"passport-local": "^1.0.0",
"passport-qq": "0.0.3",
... ... @@ -55,15 +55,14 @@
"serve-favicon": "^2.3.0",
"uuid": "^2.0.2",
"winston": "^2.2.0",
"winston-daily-rotate-file": "^1.2.0",
"yoho-node-lib": "0.0.43"
"winston-daily-rotate-file": "^1.3.0",
"yoho-node-lib": "0.0.49"
},
"devDependencies": {
"autoprefixer": "^6.3.7",
"ava": "^0.16.0",
"babel-preset-es2015": "^6.9.0",
"babel-register": "^6.9.0",
"cheerio": "^0.22.0",
"babel-preset-es2015": "^6.14.0",
"babel-register": "^6.14.0",
"eslint": "^3.0.1",
"eslint-config-yoho": "^1.0.1",
"gulp": "^3.9.1",
... ... @@ -73,11 +72,11 @@
"gulp-sourcemaps": "^2.0.0-alpha",
"gulp-util": "^3.0.7",
"husky": "^0.11.4",
"nodemon": "^1.10.0",
"nodemon": "^1.10.2",
"nyc": "^8.1.0",
"postcss-assets": "^4.0.1",
"postcss-cachebuster": "^0.1.3",
"postcss-calc": "^5.2.1",
"postcss-calc": "^5.3.1",
"postcss-center": "^1.0.0",
"postcss-clearfix": "^1.0.0",
"postcss-crip": "^2.0.0",
... ... @@ -91,8 +90,8 @@
"shelljs": "^0.7.0",
"stylelint": "^7.1.0",
"stylelint-config-yoho": "^1.2.7",
"webpack": "^1.13.1",
"webpack-dev-server": "^1.14.1",
"webpack": "^1.13.2",
"webpack-dev-server": "^1.15.0",
"webpack-stream": "^3.1.0",
"yoho-fastclick": "^1.0.6",
"yoho-hammer": "^2.0.7",
... ...
... ... @@ -14,16 +14,17 @@ var $nav = $('.category-nav'),
require('../common');
(function() {
function resetHeight() {
var $header = $('.yoho-header'),
$search = $('#search-input');
var h = $(window).height() - $header.outerHeight() - $search.outerHeight() - $nav.outerHeight();
var h = document.body.scrollHeight - $header.outerHeight() - $search.outerHeight() - $nav.outerHeight();
$categoryContainer.css('min-height', h);
$contents.height(h);
}());
}
resetHeight();
$('#search-input').focus(function() {
$(this).blur();
... ... @@ -39,6 +40,7 @@ $nav.on('touchend touchcancel', function(e) {
var $this = $(e.target).closest('li'),
selector = '.' + $this.data('channel');
resetHeight();
if ($this.hasClass('focus')) {
return;
}
... ...
... ... @@ -125,7 +125,7 @@ $(function() {
if (!(window.queryString.app_version || window.queryString.appVersion)) {
$('.tab-nav').css({
position: 'absolute'
position: 'relative'
});
$footer.css({
... ...
... ... @@ -33,6 +33,7 @@ $('.detail-tab span').on('click', function() {
if ($(this).index() === 1) {
setDetailText();
lazyLoad($('img.lazy'));
}
});
... ...
... ... @@ -62,19 +62,18 @@
background: #f6f6f6;
.title-image {
a {
display: block;
}
.image {
width: 100%;
height: 364px;
height: 310px;
}
img {
width: 100%;
height: 100%;
height: inherit;
}
}
... ... @@ -104,20 +103,17 @@
}
.focus {
.swipe {
height: 100%;
}
.swipe-1 {
.swipe-indicators {
display: none;
}
}
.swipe-item {
a {
display: block;
}
... ... @@ -126,7 +122,6 @@
width: 100%;
height: 100%;
}
}
.swipe-indicators {
... ... @@ -168,8 +163,8 @@
a {
display: inline-block;
margin: 0 15px;
width: 250px;
height: 250px;
width: 213px;
height: 213px;
}
img {
... ...
... ... @@ -4,7 +4,7 @@
}
li {
width: 580px;
width: 100%;
height: 200px;
margin-bottom: 30px;
position: relative;
... ...
.installment-help {
padding: 30px;
margin: 0;
background-color: #fff;
font-family: "微软雅黑";
color: #444;
font-weight: 300;
.help-title {
text-align: center;
font-size: 28px;
margin-top: 10px;
font-weight: bold;
}
.help-group {
text-align: left;
margin: 0 5px 45px;
h2 {
font-size: 26px;
font-weight: bold;
}
p {
font-size: 26px;
line-height: 40px;
margin-top: 10px;
}
.remind {
color: #f00;
}
.underline {
text-decoration: underline;
}
.bold {
font-weight: bold;
}
ul {
list-style: disc;
list-style-position: inside;
margin-left: 22px;
}
table {
width: 92%;
text-align: center;
margin: 0 4%;
border: 1px solid #000;
font-size: 22px;
td {
text-align: center;
border-right: 1px solid #000;
}
tr:last-child {
border-top: 1px solid #000;
}
}
}
}
.installment-agreement {
p {
text-indent: 2em;
}
ul {
list-style-type: none;
li {
display: inline-block;
}
}
.indent2 {
text-indent: 2em;
display: inline-block;
}
}
.installment-help {
padding: 30px;
margin: 0;
background-color: #fff;
font-family: "微软雅黑";
color: #444;
font-weight: 300;
.help-title {
text-align: center;
font-size: 28px;
margin-top: 10px;
font-weight: bold;
}
.help-group {
text-align: left;
margin: 0 5px 45px;
h2 {
font-size: 26px;
font-weight: bold;
}
p {
font-size: 26px;
line-height: 40px;
margin-top: 10px;
}
.remind {
color: #f00;
}
.underline {
text-decoration: underline;
}
.bold {
font-weight: bold;
}
ul {
list-style: disc;
list-style-position: inside;
margin-left: 22px;
}
table {
width: 92%;
text-align: center;
margin: 0 4%;
border: 1px solid #000;
font-size: 22px;
td {
text-align: center;
border-right: 1px solid #000;
}
tr:last-child {
border-top: 1px solid #000;
}
}
}
}
.installment-agreement {
p {
text-indent: 2em;
}
ul {
list-style-type: none;
li {
display: inline-block;
}
}
.indent2 {
text-indent: 2em;
display: inline-block;
}
}
... ...
... ... @@ -88,7 +88,28 @@
}
#goods-list {
margin: 15px 0 0 15px;
padding: 0 15px;
margin: 15px 0 0;
width: 100%;
box-sizing: border-box;
}
.good-info {
float: left;
padding: 0 15px;
margin: 10px 0 40px;
box-sizing: border-box;
width: 50%;
height: auto;
}
.good-detail-img {
height: auto;
background: #c3c3c3;
img {
height: 100%;
}
}
}
... ...
... ... @@ -82,7 +82,7 @@
.title-box {
margin-left: 22px;
width: 240px;
width: 210px;
.product-name {
overflow: hidden;
... ... @@ -126,7 +126,7 @@
.info-box {
margin-left: 22px;
float: left;
width: 452px;
width: 402px;
}
h3 {
... ... @@ -154,7 +154,7 @@
.installment-box {
text-align: center;
float: left;
width: 213.333px;
width: 33%;
font-size: 22px;
}
... ...
... ... @@ -294,7 +294,7 @@
border-top: 1px solid #e0e0e0;
label {
margin-left: 75px;
margin-left: 60px;
width: 320px;
height: 120px;
float: left;
... ...