登录注册接入数据库

This commit is contained in:
2026-03-10 17:01:56 +08:00
parent 8561d1debc
commit 4df88ea502
6 changed files with 210 additions and 172 deletions

View File

@@ -786,7 +786,12 @@ export class AkSupa {
};
}
async signUp(email : string, password : string) : Promise<UTSJSONObject> {
async signUp(email : string, password : string, options ?: UTSJSONObject) : Promise<UTSJSONObject> {
const body = { email, password } as UTSJSONObject;
if (options != null && options.get('data') != null) {
body['data'] = options.get('data');
}
const res = await AkReq.request({
url: this.baseUrl + '/auth/v1/signup',
method: 'POST',
@@ -794,7 +799,7 @@ export class AkSupa {
apikey: this.apikey,
'Content-Type': 'application/json'
} as UTSJSONObject,
data: { email, password } as UTSJSONObject,
data: body,
contentType: 'application/json'
}, false);
return res.data as UTSJSONObject;