export var config={ //服务器地址 server:"http://127.0.0.1", // 接口 interface:{ //图片解析 image_parse:"/api/BaiduImage.php", // 文本查询 text_query:"/api/QueryText.php", // 生成题库 create_question:"/api/QuestionAPI.php" } } export var getInterface=function(url){ if(process.env.NODE_ENV === 'development'){ console.log("开发环境,通过XDEBUG调试接口") return config.server+url+"?XDEBUG_SESSION_START=PHPSTORM" }else{ console.log('生产环境') return config.server+url } }