老师,麻烦看下我这里404是啥问题...
来源:8-1 Vue项目城市选择页 - 路由配置
沧海的雨季
2019-02-26
<template>
<div>
<home-header :city="city"></home-header>
<home-swiper :list="swiperList"></home-swiper>
<home-icons :list="iconList"></home-icons>
<home-recommend :list="recommendList"></home-recommend>
<home-weekend :list="weekendList"></home-weekend>
</div>
</template>
<script>
import HomeHeader from './components/Header'
import HomeSwiper from './components/Swiper'
import HomeIcons from './components/icons'
import HomeRecommend from './components/Recommend'
import HomeWeekend from './components/weekend'
import axios from 'axios'
export default {
name:'Home',
components:{
HomeHeader,
HomeSwiper,
HomeIcons,
HomeRecommend,
HomeWeekend,
},
data () {
return {
city: '',
swiperList: [],
iconList:[],
recommendList:[],
weekendList:[]
}
},
methods: {
getHomeInfo () {
axios.get('/api/index.json')
.then(this.getHomeInfoSucc)
},
getHomeInfoSucc(res){
res=res.data
if(res.ret && res.data){
const data = res.data
this.city= data.city
this.swiperList=data.swiperList
this.iconList=data.iconList
this.recommendList=data.recommendList
this.weekendList=data.weekendList
}
}
},
mounted(){
this.getHomeInfo()
}
}
</script>
![![
找了半天也没发现啥问题…
写回答
1回答
-
沧海的雨季
提问者
2019-02-26
老师,找到原因了,这里多个project,这是因为版本不同的原因吗?
052019-03-02
相似问题