Skip to content

Commit 6f08b78

Browse files
author
A pessimistic guide to living
committed
fix: 微信小程序封装的http请求中的responseType不支持json,会导致请求无法回来
1 parent 538e1fb commit 6f08b78

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/http.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const http = <T>(options: CustomRequestOptions) => {
77
uni.request({
88
...options,
99
dataType: 'json',
10-
responseType: 'json',
10+
responseType: 'text',
1111
// 响应成功
1212
success(res) {
1313
// 状态码 2xx,参考 axios 的设计

0 commit comments

Comments
 (0)