|
|
@@ -60,12 +60,18 @@ export default {
|
|
|
},
|
|
|
|
|
|
getHostPageBaseURL: function () {
|
|
|
- return this.getRootPath() + '/';
|
|
|
+ //return this.getRootPath() + '/';
|
|
|
+ // changed by jack 增加代理的配置。
|
|
|
+ if(typeof REMOTE_DEV_PORT !== 'undefined' && REMOTE_DEV_PORT != null){
|
|
|
+ return this.getRootPath() + '/proxy/' + REMOTE_DEV_PORT + '/';
|
|
|
+ }else{
|
|
|
+ return this.getRootPath() + '/';
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
// 获取图片路径url
|
|
|
getFileServerUrl: function () {
|
|
|
- return this.getRootPath() + '/';
|
|
|
+ return this.getHostPageBaseURL() + '/';
|
|
|
},
|
|
|
|
|
|
// 获取API的地址
|
|
|
@@ -80,12 +86,12 @@ export default {
|
|
|
*/
|
|
|
getApiUrl2: function (apiName) {
|
|
|
if (apiName === undefined || apiName === null || apiName.length === 0) {
|
|
|
- return this.getRootPath();
|
|
|
+ return this.getHostPageBaseURL();
|
|
|
}
|
|
|
if (apiName[0] === '/') {
|
|
|
- return this.getRootPath() + apiName;
|
|
|
+ return this.getHostPageBaseURL() + apiName;
|
|
|
} else {
|
|
|
- return this.getRootPath() + '/' + apiName;
|
|
|
+ return this.getHostPageBaseURL() + '/' + apiName;
|
|
|
}
|
|
|
},
|
|
|
|
|
|
@@ -204,9 +210,9 @@ export default {
|
|
|
getRedirectUrl: function (url) {
|
|
|
var href = window.location.href;
|
|
|
if (href.indexOf('pcapp') >= 0) {
|
|
|
- return this.getRootPath() + '/pcapp/' + url;
|
|
|
+ return this.getHostPageBaseURL() + '/pcapp/' + url;
|
|
|
} else {
|
|
|
- return this.getRootPath() + '/' + url;
|
|
|
+ return this.getHostPageBaseURL() + '/' + url;
|
|
|
}
|
|
|
},
|
|
|
|