|
@@ -156,7 +156,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)
|
|
}
|
|
}
|
|
|
|
|
|
@@ -165,7 +168,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)
|
|
}
|
|
}
|
|
|
|
|