goods.vue 982 Bytes
<template>
    <div class="goods">
        <product-list v-bind:data="productList"></product-list>
    </div>
</template>

<script>
    const titleFloor = require('component/resources/title-floor.vue');
    const productList = require('product/list.vue');

    module.exports = {
        data() {
            return {
                productList: []
            };
        },
        props: ['floor'],
        components: {
            titleFloor: titleFloor,
            productList
        },
        created() {
            let productSkn = [];

            this.floor.forEach(item => {
                productSkn.push(item.id);
            });

            $.ajax({
                url: '/channel/goods.json',
                data: {
                    productSkn: productSkn.join(',')
                }
            }).then(result => {
                console.log(result);
                this.productList = result;
            });
        }
    };
</script>

<style>
</style>