Commit 8e2f3e8cc57c099b3206d33fa93fd3fab0863528
1 parent
f8996584
feat(src/api/external): 修复大屏动态请求post问题
Showing
1 changed file
with
8 additions
and
1 deletions
@@ -129,17 +129,24 @@ export const customRequest = async (request: RequestConfigType) => { | @@ -129,17 +129,24 @@ export const customRequest = async (request: RequestConfigType) => { | ||
129 | 129 | ||
130 | const body = transformBodyValue(Body, requestParamsBodyType) | 130 | const body = transformBodyValue(Body, requestParamsBodyType) |
131 | 131 | ||
132 | + /** | ||
133 | + * ft 修改post请求针对这种接口(/api/yt/device,设备列表分页),是post请求,body体一定要携带内容,空内容也可以 | ||
134 | + * 修改后的代码在注释之间,并标注好源代码和修改后代码,方便回溯 | ||
135 | + * 源代码 data: body, | ||
136 | + * 修改后代码 data: !body? {"":null} :body, | ||
137 | + */ | ||
132 | Params = handleParams(Params) | 138 | Params = handleParams(Params) |
133 | return customHttp.request<any>({ | 139 | return customHttp.request<any>({ |
134 | url: requestUrl, | 140 | url: requestUrl, |
135 | baseURL: getOriginUrl(requestOriginUrl!), | 141 | baseURL: getOriginUrl(requestOriginUrl!), |
136 | method: requestHttpType, | 142 | method: requestHttpType, |
137 | params: Params, | 143 | params: Params, |
138 | - data: body, | 144 | + data: !body? {"":null} :body, |
139 | headers: extraValue(Header) | 145 | headers: extraValue(Header) |
140 | }, { | 146 | }, { |
141 | joinPrefix: false, | 147 | joinPrefix: false, |
142 | apiUrl: '', | 148 | apiUrl: '', |
143 | withShareToken: isShareMode() | 149 | withShareToken: isShareMode() |
144 | }) | 150 | }) |
151 | + //ft | ||
145 | } | 152 | } |