完善登录逻辑和个人资料完善

This commit is contained in:
2026-05-26 11:29:06 +08:00
parent cecb51a8e2
commit 9680276b3f
27 changed files with 3934 additions and 1572 deletions

View File

@@ -290,6 +290,22 @@ export class AkReq {
data ?? {},
res.header as UTSJSONObject
);
if (res.statusCode >= 400) {
let bodyPreview = ''
try {
if (typeof res.data == 'string') {
bodyPreview = (res.data as string).substring(0, 500)
} else {
bodyPreview = JSON.stringify(res.data).substring(0, 500)
}
} catch (e) {
bodyPreview = '[unserializable response body]'
}
console.error('[ak-req] HTTP error response')
console.error('[ak-req] status:', res.statusCode)
console.error('[ak-req] url:', options.url)
console.error('[ak-req] body:', bodyPreview)
}
resolve(result);
},
fail: (err) => {