打赏

相对路径 绝对路径

绝对路径

axios.get('/static/modelplat/menuCon.json').then(res => {
                    this.menuCon = res.data.menuCon;

                    // 初始化数据
                    this.sceneModelCon = this.menuCon[0].modelArr;
            }).catch(() => {
        this.$message({
          type: 'info',
          message: '请求数据出错'
        });
            });

相对路径:

axios.get('./static/modelplat/menuCon.json').then(res => {
                    this.menuCon = res.data.menuCon;

                    // 初始化数据
                    this.sceneModelCon = this.menuCon[0].modelArr;
            }).catch(() => {
        this.$message({
          type: 'info',
          message: '请求数据出错'
        });
            });
axios.get('static/modelplat/menuCon.json').then(res => {
                    this.menuCon = res.data.menuCon;

                    // 初始化数据
                    this.sceneModelCon = this.menuCon[0].modelArr;
            }).catch(() => {
        this.$message({
          type: 'info',
          message: '请求数据出错'
        });
            });

 

posted @ 2018-06-03 01:49  孟繁贵  阅读(675)  评论(0编辑  收藏  举报
TOP