|
@@ -155,7 +155,10 @@ export default request
|
|
* @param {Object} url
|
|
* @param {Object} url
|
|
* @param {Object} params
|
|
* @param {Object} params
|
|
*/
|
|
*/
|
|
-export const get = (url) => (params) => {
|
|
|
|
|
|
+export const get = (url) => (params,baseUrl=null) => {
|
|
|
|
+ if (baseUrl) {
|
|
|
|
+ request.baseUrl = baseUrl
|
|
|
|
+ }
|
|
return request.get(url, params)
|
|
return request.get(url, params)
|
|
}
|
|
}
|
|
|
|
|
|
@@ -164,7 +167,10 @@ export const get = (url) => (params) => {
|
|
* @param {Object} url
|
|
* @param {Object} url
|
|
* @param {Object} params
|
|
* @param {Object} params
|
|
*/
|
|
*/
|
|
-export const post = (url) => (params) => {
|
|
|
|
|
|
+export const post = (url) => (params,baseUrl=null) => {
|
|
|
|
+ if (baseUrl) {
|
|
|
|
+ request.baseUrl = baseUrl
|
|
|
|
+ }
|
|
return request.post(url, params)
|
|
return request.post(url, params)
|
|
}
|
|
}
|
|
|
|
|