"scripts": {
"dev": "npm run serve",
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"build:yxg": "vue-cli-service build --mode yxg --modern",
"build:cw": "vue-cli-service build --mode cw --modern"
},
main.js
console.log(process.env.VUE_APP_API_ROOT,'process.env.VUE_APP_API_ROOT,') let baseURL=process.env.VUE_APP_API_ROOT //自动识别环境