Authored by 陈峰

comit

... ... @@ -18,17 +18,17 @@ module.exports = {
app_type: 1
},
domains: {
// api: 'http://api-test3.yohops.com:9999/',
// service: 'http://service-test3.yohops.com:9999/',
// singleApi: 'http://api-test3.yohops.com:9999/'
api: 'http://api-test3.yohops.com:9999/',
service: 'http://service-test3.yohops.com:9999/',
singleApi: 'http://api-test3.yohops.com:9999/'
// api: 'http://dev-api.yohops.com:9999/',
// service: 'http://dev-service.yohops.com:9999/',
// singleApi: 'http://192.168.102.27:8092/'
// //
api: 'http://api.yoho.cn/',
service: 'http://service.yoho.cn/',
singleApi: 'http://single.yoho.cn/'
// api: 'http://api.yoho.cn/',
// service: 'http://service.yoho.cn/',
// singleApi: 'http://single.yoho.cn/'
},
subDomains: {
host: '.m.yohoblk.com',
... ...
... ... @@ -265,7 +265,7 @@ export default {
if (filter.gender) {
if (window._yas && window._yas.sendAppLogs) {
window._yas.sendAppLogs({
appop: 'YB_BLK_LIST_GENDER_C',
appop: 'YB_H5_BLK_LIST_GENDER_C',
param: JSON.stringify({
gender: filter.gender
})
... ...
... ... @@ -15,5 +15,5 @@ export {
ResourceProductList,
ResourceFocusImage,
ResourceTfGoodsList,
ResourceBlkNewProductList
ResourceBlkNewProductList,
};
... ...
<template>
<div class="resource-box">
<slot></slot>
</div>
</template>
<script>
import {REPORT_YAS} from 'store/yoho/types';
import _ from 'lodash';
export default {
name: 'ResourceBox',
data() {
return {
componentStatus: {}
};
},
mounted() {
if (_.get(this.$parent, '$options.name') === 'Scroller') {
this.$scrollEl = this.$parent.$el;
} else {
this.$scrollEl = document.querySelector('.layout-content');
}
if (this.$scrollEl) {
this.$scrollEl.addEventListener('scroll', this.resouceScroll);
_.each(this.$children, (component, index) => {
const visiable = this.isVisiable(component.$el, this.$scrollEl);
this.componentStatus[index] = visiable;
if (visiable) {
this.report(component, index + 1);
}
});
}
},
destroyed() {
if (this.$scrollEl) {
this.$scrollEl.removeEventListener('scroll', this.resouceScroll);
}
},
methods: {
resouceScroll() {
_.each(this.$children, (component, index) => {
const visiable = this.isVisiable(component.$el, this.$scrollEl);
if (visiable && this.componentStatus[index] !== visiable) {
this.report(component, index + 1);
}
this.componentStatus[index] = visiable;
});
},
report(component, index) {
const reportData = _.get(component, '$options.propsData.value');
if (reportData) {
const param = {
P_PARAM: this.$route.query,
P_NAME: this.$route.name,
F_NAME: reportData.template_name,
F_ID: reportData.template_id,
F_INDEX: index
};
this.$store.dispatch(REPORT_YAS, {
params: {
appop: 'YB_SHOW_EVENT',
param
}
});
}
},
isVisiable($el, $parent) {
const rect = $el.getBoundingClientRect();
const parentRect = $parent.getBoundingClientRect();
return ((parentRect.top >= rect.top && parentRect.top <= (rect.top + rect.height)) ||
((parentRect.top + parentRect.height) >= rect.top && (parentRect.top + parentRect.height) <= (rect.top + rect.height)) ||
(rect.top >= parentRect.top && (rect.top + rect.height) <= (parentRect.top + parentRect.height)));
}
}
};
</script>
\ No newline at end of file
... ...
<template>
<div class="resource-category">
<resource class="resource-category">
<a-link class="cate-label" :href="brandLink" :yas="value" :yas-f="index">品牌<i class="icon icon-right"></i></a-link>
<div v-for="(item, index) in sort" v-if="item.sub" :key="index">
<p class="cate-label" @click="toggle(index)">{{item.category_name
... ... @@ -20,7 +20,7 @@
</a-link>
</div>
</div>
</div>
</resource>
</template>
<script>
... ... @@ -83,6 +83,8 @@ export default {
<style lang="scss">
.resource-category {
padding-left: 20px;
padding-right: 0 !important;
padding-top: 0 !important;
.cate-label {
display: block;
... ...
<template>
<div class="focus-image">
<resource class="focus-image">
<awesome-swiper name="mySwiper" :options="swiperOption" class="swipe">
<div class="swiper-wrapper" @click="activeLink">
<div class="swiper-slide"
... ... @@ -12,7 +12,7 @@
<div class="swiper-pagination"></div>
</awesome-swiper>
<a-link ref="linkA" :href="activeHref" :yas="value" :yas-f="index" :yas-i="imageIndex"></a-link>
</div>
</resource>
</template>
<script>
... ... @@ -59,6 +59,7 @@
<style lang="scss">
.focus-image {
padding: 0 !important;
height: 480px;
overflow: hidden;
... ...
... ... @@ -14,12 +14,14 @@
<p class="paragraph"><i>BLK</i>买手团队引入众多国际设计师品牌同时携手国内设计新星,为年轻的消费者们提供进阶品味的且多元化的商品选择。</p>
<p class="paragraph"><i>BLK</i>致力呈现其对街头的独特见解,以“新街头主义”携手国内外设计师与年轻的时尚潮流爱好者们共同推动中国时尚潮流的发展与更优质的时尚潮流体验。</p>
</div>
<component
:is="component.template_name"
v-for="(component, index) in channel.about.filter(c => ['newSingleImage'].some(k => k === c.template_name) )"
:value="component"
:index="index"
:key="index"></component>
<resource-box>
<component
:is="component.template_name"
v-for="(component, index) in channel.about.filter(c => ['newSingleImage'].some(k => k === c.template_name) )"
:value="component"
:index="index"
:key="index"></component>
</resource-box>
</layout-body>
</template>
... ... @@ -31,6 +33,7 @@ import {mapState} from 'vuex';
import {
ResourceSingleImage
} from 'components/resources';
import ResourceBox from 'components/resources/resource-box';
export default {
name: 'About',
... ... @@ -51,7 +54,8 @@ export default {
return store.dispatch(FETCH_ABOUT_REQUEST);
},
components: {
newSingleImage: ResourceSingleImage
newSingleImage: ResourceSingleImage,
ResourceBox
}
};
</script>
... ...
... ... @@ -11,13 +11,15 @@
</span>
</header-box>
<scroller ref="scroller" @loading="loading" class="channel-scroll">
<component
:is="component.template_name"
v-for="(component, index) in (floors || []).filter(c => ['twoPicture', 'goods', 'tfGoodsList', 'focus', 'blkCategory', 'newSingleImage', 'BlkNewProductFloorResource'].some(k => k === c.template_name) )"
:lazy="index > 5"
:value="component"
:index="index"
:key="index"></component>
<resource-box>
<component
:is="component.template_name"
v-for="(component, index) in (floors || []).filter(c => ['twoPicture', 'goods', 'tfGoodsList', 'focus', 'blkCategory', 'newSingleImage', 'BlkNewProductFloorResource'].some(k => k === c.template_name) )"
:lazy="index > 5"
:value="component"
:index="index"
:key="index"></component>
</resource-box>
</scroller>
</layout-body>
</div>
... ... @@ -41,6 +43,7 @@
ResourceTfGoodsList
} from 'components/resources';
import {SearchSlider} from 'components/search';
import ResourceBox from 'components/resources/resource-box';
export default {
name: 'ChannelHome',
... ... @@ -60,7 +63,7 @@
if (this.searchSlider) {
this.$store.dispatch(REPORT_YAS, {
params: {
appop: 'YB_SECOND_HOME_BLK_SEARCH_C',
appop: 'YB_H5_SECOND_HOME_BLK_SEARCH_C',
param: {
POS_ID: this.gender === 'men' ? 103 : 102
}
... ... @@ -104,7 +107,8 @@
BlkNewProductFloorResource: ResourceBlkNewProductList,
tfGoodsList: ResourceTfGoodsList,
ResourceProductList,
SearchSlider
SearchSlider,
ResourceBox
}
};
</script>
... ...
... ... @@ -16,16 +16,18 @@
</span>
</header-box>
<scroller ref="scroller" @loading="loading">
<div class="resources">
<component
:is="component.template_name"
v-for="(component, index) in (channel.home || []).filter(c => ['twoPicture', 'tfGoodsList', 'newSingleImage', 'BlkNewProductFloorResource'].some(k => k === c.template_name) )"
:lazy="index > 5"
v-if="loadComponent || index < 6"
:value="component"
:index="index"
:key="index"></component>
</div>
<resource-box>
<div class="resources">
<component
:is="component.template_name"
v-for="(component, index) in (channel.home || []).filter(c => ['twoPicture', 'tfGoodsList', 'newSingleImage', 'BlkNewProductFloorResource'].some(k => k === c.template_name) )"
:lazy="index > 5"
v-if="loadComponent || index < 6"
:value="component"
:index="index"
:key="index"></component>
</div>
</resource-box>
</scroller>
</layout-body>
</div>
... ... @@ -44,6 +46,7 @@ import {SearchSlider} from 'components/search';
import {mapState} from 'vuex';
import {HomeSlider} from './components';
import {REPORT_YAS} from 'store/yoho/types';
import ResourceBox from 'components/resources/resource-box';
export default {
name: 'Channel',
... ... @@ -67,7 +70,7 @@ export default {
if (this.homeSlider) {
this.$store.dispatch(REPORT_YAS, {
params: {
appop: 'YB_SECOND_HOME_BLK_SIDEBAR_C'
appop: 'YB_H5_SECOND_HOME_BLK_SIDEBAR_C'
}
});
}
... ... @@ -78,7 +81,7 @@ export default {
if (this.searchSlider) {
this.$store.dispatch(REPORT_YAS, {
params: {
appop: 'YB_SECOND_HOME_BLK_SEARCH_C',
appop: 'YB_H5_SECOND_HOME_BLK_SEARCH_C',
param: {
POS_ID: 101
}
... ... @@ -93,7 +96,7 @@ export default {
goBack() {
this.$store.dispatch(REPORT_YAS, {
params: {
appop: 'YB_SECOND_HOME_BLK_BACK_C'
appop: 'YB_H5_SECOND_HOME_BLK_BACK_C'
}
});
this.$yoho.goNewBack();
... ... @@ -114,7 +117,8 @@ export default {
newSingleImage: ResourceSingleImage,
BlkNewProductFloorResource: ResourceNewProductList,
SearchSlider,
HomeSlider
HomeSlider,
ResourceBox
},
async mounted() {
setTimeout(() => {
... ...