请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

老师,麻烦看下我这里404是啥问题...

<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>

![![图片描述图片描述
找了半天也没发现啥问题…

正在回答 回答被采纳积分+3

1回答

提问者 沧海的雨季 2019-02-26 22:58:25

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

0 回复 有任何疑惑可以回复我~
  • Dell #1
    版本不同?没懂,什么版本?
    回复 有任何疑惑可以回复我~ 2019-02-27 17:22:02
  • 提问者 沧海的雨季 回复 Dell #2
    我这里为啥会有个project
    回复 有任何疑惑可以回复我~ 2019-02-27 17:22:54
  • Dell 回复 提问者 沧海的雨季 #3
    你用的是我的代码?还是你自己的,你自己的有 project 就说明这是你自己写的呀
    回复 有任何疑惑可以回复我~ 2019-02-27 18:22:59
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号