fix: repair local development post request proxy to https error problem (#63)

This commit is contained in:
vben
2020-10-28 23:00:03 +08:00
parent 06e1d3879b
commit 34c09fcea8
6 changed files with 16 additions and 9 deletions

View File

@@ -20,7 +20,7 @@
moment.locale('zh-cn');
export default defineComponent({
name: 'App1',
name: 'App',
components: { ConfigProvider },
setup() {
useInitAppConfigStore();

View File

@@ -116,20 +116,20 @@ const transform: AxiosTransform = {
} else {
// 兼容restful风格
config.url = config.url + config.params + `?_t=${now}`;
config.params = {};
config.params = undefined;
}
} else {
if (!isString(config.params)) {
formatDate && formatRequestDate(config.params);
config.data = config.params;
config.params = {};
config.params = undefined;
if (joinParamsToUrl) {
config.url = setObjToUrlParams(config.url as string, config.data);
}
} else {
// 兼容restful风格
config.url = config.url + config.params;
config.params = {};
config.params = undefined;
}
}
return config;