重构了云函数

This commit is contained in:
walkpan
2025-10-19 20:10:19 +08:00
parent cfb6819bc7
commit 1c40c10210
1942 changed files with 363888 additions and 435 deletions

View File

@@ -1,3 +1,5 @@
import { get } from "http";
export type CloudReturnType<T = any> = {
code: number,// 200成功
msg?:string,
@@ -81,4 +83,12 @@ export class WxCloudApi{
}
});
}
public static async get(): Promise<CloudCallFunctionResult<CloudReturnType<{}>>> {
return await wx?.cloud.callFunction({
name: 'cocos_cloud',
data: {
cmd: 'get',
}
});
}
}