1
2
3
4
5
6
7
8
9
10
11
12
| function getBaseUrl() {
| let url = "";
| if (process.env.NODE_ENV == 'development') {
| // 跨域请求
| url = 'http://localhost:8108/pis/';
| } else {
| url = location.protocol + '//' + location.host + '/pis/';
| }
| return url;
| }
|
| export default getBaseUrl;
|
|