fix(request): 接口响应字段由 data 统一为 result 并调整成功码判断

ApiResponse 业务数据字段由 data 改为 result,成功码由字符串 '00000' 改为数字 200,
登录与补充资料页面同步改为读取 res.result。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
17792275749
2026-08-20 11:19:03 +08:00
co-authored by Claude Sonnet 4.6
parent cdef8e6513
commit e5f76fc0a9
5 changed files with 24 additions and 28 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
// TODO: 替换为实际接口地址
const IS_DEV = false
const IS_DEV = true
export const BASE_URL = IS_DEV
? ''
? 'http://10.10.10.10:8889/'
: ''
export const TIMEOUT = 30000
+1 -1
View File
@@ -39,7 +39,7 @@ const request = <T = any>(
success: (res) => {
if (loading) _hideLoading()
const body = res.data as ApiResponse<T>
if (body.code === '00000') {
if (body.code === 200) {
resolve(body)
} else {
wx.showToast({ title: body.msg || '请求失败', icon: 'none' })
+2 -2
View File
@@ -1,7 +1,7 @@
export interface ApiResponse<T = any> {
code: string
code: number
msg: string
data: T
result: T
}
export type HttpMethod = 'GET' | 'POST' | 'PUT'