import React from 'react'
import { Swiper, Grid } from 'antd-mobile'
import axios from 'axios';
import WidthUseNavigate from '../WidthUseNavigate';
import './index.css'
import ImgZZ from './../../assets/images/nav-1.png'
import ImgHZ from './../../assets/images/nav-2.png'
import ImgDTZF from './../../assets/images/nav-3.png'
import ImgQCZ from './../../assets/images/nav-4.png'
const localCatalog = [
{ "imgSrc": ImgZZ, "title": "整租", "path": "/todo" },
{ "imgSrc": ImgHZ, "title": "合租", "path": "/todo" },
{ "imgSrc": ImgDTZF, "title": "地图找房", "path": "/message" },
{ "imgSrc": ImgQCZ, "title": "去出租", "path": "/me" }
]
class HomeInner extends React.Component {
state = {
swipers: [],
isSwiperLoaded: false
}
async getSwitpers() {
const res = await axios.get('http://localhost:8080/home/swiper')
this.setState(
{
swipers: res.data.body,
isSwiperLoaded: true
},
// ()=>{
// return{swipers:res.data.body}
// }
)
}
componentDidMount() {
this.getSwitpers()
}
renderSwipers() {
return this.state.swipers.map(item => (