fix(shopUserAddress): 兼容多种地址列表响应格式并优化错误处理

- 支持响应为数组、标准包装格式和分页对象多种格式
- 兼容 code 为 0 或 200 的成功响应
- 在请求地址列表时增加日志输出,方便调试响应数据
- 删除 ShopUserAddress 接口定义,避免冗余
- request工具中支持 code 为 200 的请求成功判断
- useAddress钩子中添加加载地址日志和错误日志辅助调试
This commit is contained in:
2026-06-25 00:59:49 +08:00
parent b36205b066
commit 1d30897ab6
4 changed files with 26 additions and 22 deletions

View File

@@ -1,17 +0,0 @@
/** 收货地址 */
export interface ShopUserAddress {
id?: number;
userId?: number;
name?: string; // 收货人姓名
phone?: string; // 收货人电话
province?: string; // 省份
city?: string; // 城市
district?: string; // 区县
region?: string; // 区域(部分接口用 region
detail?: string; // 详细地址
lng?: string; // 经度
lat?: string; // 纬度
isDefault?: number; // 是否默认 0-否 1-是
createTime?: string;
updateTime?: string;
}