Authored by 李奇

容错处理

... ... @@ -27,24 +27,6 @@ export default {
}
return this.src;
}
},
mounted() {
// let timer;
// let img = new Image();
// let maxRetry = 30 * 1000;
// let start = Date.now();
//
// timer = setInterval(() => {
// img.src = this.$refs.image.src;
//
// if (!img.src) {
// clearInterval(timer);
// }
//
// if (img.complete || Date.now() - start > maxRetry) {
// clearInterval(timer);
// }
// }, 3000);
}
};
</script>
... ...
... ... @@ -13,7 +13,7 @@
<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) )"
v-for="(component, index) in (floors || []).filter(c => ['twoPicture', 'goods', 'tfGoodsList', 'focus', 'blkCategory', 'newSingleImage', 'BlkNewProductFloorResource'].some(k => k === c.template_name) )"
:value="component.data"
:key="index"></component>
</scroller>
... ...
... ... @@ -29,12 +29,12 @@ export function createChannel() {
gender: 'men',
men: {
sort: {},
floors: {},
floors: [],
isFetching: false
},
women: {
sort: {},
floors: {},
floors: [],
isFetching: false
},
fethingHome: false,
... ...