This commit is contained in:
菠萝战士2018 2018-08-15 18:39:22 +08:00
parent 3077eaf2ed
commit 838e843fc3
1 changed files with 9 additions and 1 deletions

View File

@ -4,8 +4,16 @@ import store from '../store'
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
// 创建axios实例 // 创建axios实例
// var BASE_API = '';
// if (process.env.NODE_ENV == 'production') {
// BASE_API = '"http://193.112.153.155:3001"';
// }else{
// BASE_API = '"http://193.112.153.155:3001"';
// }
const service = axios.create({ const service = axios.create({
baseURL: process.env.BASE_URL, // api的base_url baseURL: "http://193.112.153.155:3001", // api的base_url
timeout: 5000 // 请求超时时间 timeout: 5000 // 请求超时时间
}) })