首页 > 其他 > 详细

相对路径 绝对路径

时间:2018-06-03 10:04:15      阅读:207      评论:0      收藏:0      [点我收藏+]

绝对路径

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: ‘请求数据出错‘
        });
            });

 

相对路径 绝对路径

原文:https://www.cnblogs.com/mengfangui/p/9127749.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!