diff --git a/config/prod.env.js b/config/prod.env.js index 6e3c1f4..ef9b850 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -5,6 +5,6 @@ var testUrl = '112.29.103.165:21624/' module.exports = { NODE_ENV: '"production"', //post用当前域名 - // API_ROOT: '"http://' + testUrl + '/iot"' + API_ROOT: 'http://192.168.0.62:21624/sgzbgl-api/' // API_ROOT: '/sgzbgl-api/', } diff --git a/src/api/index.js b/src/api/index.js index 1e40008..dd9d00c 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -10,7 +10,8 @@ import axios from 'axios'; const axiosService = axios.create({ - baseURL: "http://192.168.8.163:21624/sgzbgl-api/",// you can use "process.env.VUE_APP_BASE_API" too + // baseURL: "http://192.168.0.62:21624/sgzbgl-api/",// you can use "process.env.VUE_APP_BASE_API" too + baseURL: process.env.API_ROOT, timeout: 30000 }) axiosService.interceptors.request.use(