|
@@ -55,9 +55,9 @@ function getUrl(path) {
|
|
|
// console.log(555555555, path);
|
|
|
// 如果是dev、qa、prod环境
|
|
|
if (window.ininjectConfig) {
|
|
|
- if (path.indexOf('/profileApi') > -1) {
|
|
|
+ if (path.indexOf(`/${window.profileApi}`) > -1) {
|
|
|
// return `${window.ininjectConfig.profileApi}${path}`
|
|
|
- return `/profileApi${path}`
|
|
|
+ return `/${window.profileApi}${path}`
|
|
|
}
|
|
|
if (/weixinApi/g.test(path)) {
|
|
|
return path;
|
|
@@ -68,7 +68,7 @@ function getUrl(path) {
|
|
|
}
|
|
|
// 本地开发环境
|
|
|
// path.indexOf('http') > -1 &&
|
|
|
- if (path.indexOf('/profileApi') > -1 || path) {
|
|
|
+ if (path.indexOf(`/${window.profileApi}`) > -1 || path) {
|
|
|
return path;
|
|
|
} else if (/\/qaPayment/g.test(path)) {
|
|
|
// 支付
|
|
@@ -129,7 +129,7 @@ export default {
|
|
|
config
|
|
|
}
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- const url = getUrl(/\/sns|http/g.test(path) ? path : `/profileApi${path}`);
|
|
|
+ const url = getUrl(/\/sns|http/g.test(path) ? path : `/${window.profileApi}${path}`);
|
|
|
// console.log(130, url);
|
|
|
const { header } = handleConfig(config)
|
|
|
log.info(`===>request-kip url: ${url}`)
|