Authored by ccbikai

Merge branch 'feature/channel' into develop

<div id="app">
<tab></tab>
<resources v-bind:channel="'{{channel}}'" v-ref:resources></resources>
<resources v-bind:channel="'{{channel}}' || 'men'" v-ref:resources></resources>
</div>
... ...
... ... @@ -16,7 +16,7 @@ module.exports = {
siteUrl: '//m.yohobuy.com',
domains: {
api: 'http://devapi.yoho.cn:58078/',
service: 'http://123.206.1.104:28077/'
service: 'http://172.16.6.247:8085/gateway/'
},
subDomains: {
host: '.m.yohobuy.com',
... ...
... ... @@ -7,6 +7,8 @@
<focus-left-right v-if="floor.focus && floor.focusType === '2'" v-bind:floor="floor.data"></focus-left-right>
<!-- 标题图片 -->
<title-image v-if="floor.titleImage" v-bind:floor="floor.data"></title-image>
<!-- 楼层标题 -->
<title-floor v-if="floor.titleFloor" v-bind:title="floor.data.title"></title-floor>
<!-- 商品 -->
<goods v-if="floor.goods" v-bind:floor="floor.data"></goods>
</template>
... ... @@ -20,6 +22,7 @@
const focus = require('component/resources/focus.vue');
const focusLeftRight = require('component/resources/focus-left-right.vue');
const titleImage = require('component/resources/title-image.vue');
const titleFloor = require('component/resources/title-floor.vue');
const goods = require('component/resources/goods.vue');
module.exports = {
... ... @@ -33,6 +36,7 @@
focus,
focusLeftRight,
titleImage,
titleFloor,
goods
},
watch: {
... ...
<template>
<div class="focus-left-right">
<a v-for="item in floor" href="{{item.url}}" title="{{item.title}}">
<img v-bind:src="item.src | resize 80 80">
<img v-bind:src="item.src | resize 250 250">
</a>
</div>
</template>
... ... @@ -19,9 +19,26 @@
overflow-x: auto;
white-space: nowrap;
font-size: 0;
background: #fff;
border-bottom: 1px solid #eee;
-webkit-overflow-scrolling: touch;
/* stylelint-disable */
&::-webkit-scrollbar {
display:none;
}
/* stylelint-enable */
a {
display: inline-block;
padding: 0 15px;
width: 250px;
height: 250px;
}
img {
width: 100%;
height: 100%;
}
}
</style>
... ...
... ... @@ -5,12 +5,12 @@
</template>
<script>
const floorHeader = require('component/resources/floor-header.vue');
const titleFloor = require('component/resources/title-floor.vue');
module.exports = {
props: ['floor'],
components: {
floorHeader: floorHeader
titleFloor: titleFloor
}
};
</script>
... ...
<template>
<div class="floor-header">
{{title.title}}
{{title.name}}
<a class="more" href="{{title.moreUrl}}">
{{title.moreName}}
... ...
<template>
<div class="title-image">
<floor-header v-bind:title="floor.title"></floor-header>
<title-floor v-bind:title="{name: floor.title, moreName: floor.moreName, moreUrl: floor.moreUrl}"></title-floor>
<a class="image" v-bind:href="floor.image.url">
<img v-bind:src="floor.image.src | resize 750 364">
</a>
... ... @@ -8,12 +8,12 @@
</template>
<script>
const floorHeader = require('component/resources/floor-header.vue');
const titleFloor = require('component/resources/title-floor.vue');
module.exports = {
props: ['floor'],
components: {
floorHeader: floorHeader
titleFloor: titleFloor
}
};
</script>
... ...
const _ = require('lodash');
const processTime = require('./time-process');
const camelCase = global.yoho.camelCase;
/**
... ... @@ -17,58 +16,6 @@ module.exports = (list) => {
floor[_.camelCase(floor.templateName)] = true;
// 特殊资源位处理
// PLUS
if (floor.singleNameImage && floor.data) {
floor.data.title = {
title: floor.data.title
};
}
// 潮流时装/经典裤裙/时尚靴履/潮人配饰/潮流上装
if (floor.recommendContentOne && floor.data) {
if (floor.data.bigImage && floor.data.bigImage.length > 1) {
floor.data.bigImage = {
bigList: floor.data.bigImage
};
}
}
// OUTLETS
if (floor.titleImage && floor.data) {
if (floor.data.image) {
floor.data.bigImage = {
bigList: [floor.data.image]
};
}
floor.data.title = {
moreName: floor.data.moreName,
moreUrl: floor.data.moreUrl,
title: floor.data.title
};
}
// 折扣专场
if (floor.discountActivity && floor.data && floor.data.list.length) {
_.map(floor.data.list, (item) => {
Object.assign(item, processTime(item.leftTime));
});
}
// 断码区 , 此资源位数据结构比较坑
if (floor.offCodeArea && floor.data && floor.data.list.length) {
floor.data = {
title: floor.data.title,
data: [floor.data.list[0]],
left: [floor.data.list[1]],
right: floor.data.list.slice(2)
};
}
// 会员专享
if (floor.vipFloor && floor.data) {
floor.data.data = floor.data.image;
}
formatData.push(floor);
});
... ...