老师,麻烦看下我这里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

//img.mukewang.com/szimg/5c7553f70001fe3b07680336.jpg老师,找到原因了,这里多个project,这是因为版本不同的原因吗?

0
5
沧海的雨季
回复
YRNH
上面不是说的有吗
2019-03-02
共5条回复

Vue2.5-2.6-3.0开发去哪儿网App 零基础入门到实战

课程紧跟Vue3版本迭代,企业主流版本Vue2+Vue3全掌握

10675 学习 · 8191 问题

查看课程