feat: 详细报告接入 v3 测量历史接口,设备列表接入设备接口
- 详细报告按 scaleType 区分 4/8 电极渲染,节段卡片 8 电极专属 - 设备列表改为接口驱动并新增空态 - 登录后统一跳首页,请求层兼容 code 0 返回风格 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
fce9701254
commit
d6e59df4e9
@@ -39,10 +39,12 @@ const request = <T = any>(
|
||||
success: (res) => {
|
||||
if (loading) _hideLoading()
|
||||
const body = res.data as ApiResponse<T>
|
||||
if (body.code === 200) {
|
||||
const code = body.code
|
||||
// 兼容两种后端返回风格:code 200(自定义)或 code 0(jeecg)
|
||||
if (code === 200 || code === 0 || code === '0') {
|
||||
resolve(body)
|
||||
} else {
|
||||
wx.showToast({ title: body.msg || '请求失败', icon: 'none' })
|
||||
wx.showToast({ title: body.msg || body.message || '请求失败', icon: 'none' })
|
||||
reject(body)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
export interface ApiResponse<T = any> {
|
||||
code: number
|
||||
code: number | string
|
||||
msg: string
|
||||
message?: string
|
||||
success?: boolean | string
|
||||
result: T
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user