Authored by ccbikai

add goods

... ... @@ -2,11 +2,14 @@
<div class="resources">
<template v-for="floor in resources">
<div class="focus" v-if="floor.focus" v-bind:style="{height: '182px'}">
<focus v-bind:list="floor.data"></focus>
<focus v-bind:floor="floor.data"></focus>
</div>
<div class="title-image" v-if="floor.titleImage">
<title-image v-bind:floor="floor.data"></title-image>
</div>
<div class="goods" v-if="floor.goods">
<goods v-bind:floor="floor.data"></goods>
</div>
</template>
</div>
</template>
... ... @@ -16,6 +19,7 @@
const tip = require('common/tip');
const focus = require('component/resources/focus.vue');
const titleImage = require('component/resources/title-image.vue');
const goods = require('component/resources/goods.vue');
module.exports = {
data() {
... ... @@ -25,7 +29,8 @@
},
components: {
focus: focus,
titleImage: titleImage
titleImage: titleImage,
goods: goods
},
init() {
$.ajax({
... ...
<template>
<swipe class="swipe swipe-{{list.length}}">
<swipe-item v-for="item in list" v-bind:style="{backgroundColor: item.bgColor}">
<swipe class="swipe swipe-{{floor.length}}">
<swipe-item v-for="item in floor" v-bind:style="{backgroundColor: item.bgColor}">
<a href="{{item.url}}" title="{{item.title}}">
<img v-bind:src="item.src | resize 750 365">
</a>
... ... @@ -13,7 +13,7 @@
const swipe = require('vue-swipe');
module.exports = {
props: ['list'],
props: ['floor'],
components: {
swipe: swipe.Swipe,
swipeItem: swipe.SwipeItem
... ...
<template>
goods
</template>
<script>
const floorHeader = require('component/resources/floor-header.vue');
module.exports = {
props: ['floor'],
components: {
floorHeader: floorHeader
}
};
</script>
<style>
</style>
... ...