Skip to content

Commit dd86d0b

Browse files
authored
fix(client-sdk): fix bugs in compiling uniapp into WeChat mini programs (#1105)
1 parent 3cf45cd commit dd86d0b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/client-sdk/src/cloud.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ class Cloud {
1919
if (this.config?.requestClass) {
2020
ret = this.config?.requestClass;
2121
} else if (env === EnvironmentType.UNI_APP) {
22-
ret = UniRequest;
22+
const { uniPlatform } = uni.getSystemInfoSync();
23+
if (uniPlatform == 'mp-weixin') {
24+
ret = WxmpRequest;
25+
} else {
26+
ret = UniRequest;
27+
}
2328
} else if (env === EnvironmentType.WX_MP) {
2429
ret = WxmpRequest;
2530
} else {

0 commit comments

Comments
 (0)