|
|
@ -1,18 +1,18 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="home">
|
|
|
|
<div class="home">
|
|
|
|
<Header />
|
|
|
|
<Header />
|
|
|
|
<Swiper />
|
|
|
|
<Swiper :banner="banner"/>
|
|
|
|
<back-top />
|
|
|
|
|
|
|
|
<Category :cateList="cateList" />
|
|
|
|
<Category :cateList="cateList" />
|
|
|
|
<Goods />
|
|
|
|
<Goods />
|
|
|
|
|
|
|
|
<back-top />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
|
|
|
|
import { getBanner } from '@/api/home'
|
|
|
|
import Header from './modules/Header'
|
|
|
|
import Header from './modules/Header'
|
|
|
|
import Swiper from './modules/Swiper'
|
|
|
|
import Swiper from './modules/Swiper'
|
|
|
|
import Category from './modules/Category'
|
|
|
|
import Category from './modules/Category'
|
|
|
|
|
|
|
|
|
|
|
|
import Goods from './modules/Goods'
|
|
|
|
import Goods from './modules/Goods'
|
|
|
|
import BackTop from '@/components/BackTop'
|
|
|
|
import BackTop from '@/components/BackTop'
|
|
|
|
|
|
|
|
|
|
|
@ -27,14 +27,12 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
val: '11111',
|
|
|
|
banner: [],
|
|
|
|
value: 0,
|
|
|
|
|
|
|
|
switch1: false,
|
|
|
|
|
|
|
|
switch2: false,
|
|
|
|
|
|
|
|
cateList: {}
|
|
|
|
cateList: {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
mounted() {
|
|
|
|
|
|
|
|
this.getBanner()
|
|
|
|
const data = [
|
|
|
|
const data = [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
categoryName: '食品',
|
|
|
|
categoryName: '食品',
|
|
|
@ -150,6 +148,11 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
getBanner() {
|
|
|
|
|
|
|
|
getBanner().then(res => {
|
|
|
|
|
|
|
|
this.banner = res.entry
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
onConfirm() {
|
|
|
|
onConfirm() {
|
|
|
|
this.$refs.item.toggle()
|
|
|
|
this.$refs.item.toggle()
|
|
|
|
}
|
|
|
|
}
|
|
|
|