We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6f08b78 commit edb15e5Copy full SHA for edb15e5
src/utils/http.ts
@@ -5,9 +5,11 @@ export const http = <T>(options: CustomRequestOptions) => {
5
// 1. 返回 Promise 对象
6
return new Promise<IResData<T>>((resolve, reject) => {
7
uni.request({
8
- ...options,
9
dataType: 'json',
10
- responseType: 'text',
+ // #ifndef WP-WEIXIN
+ responseType: 'json',
11
+ // #endif
12
+ ...options,
13
// 响应成功
14
success(res) {
15
// 状态码 2xx,参考 axios 的设计
0 commit comments