fix(address-edit): 修复地址编辑页粘贴文本智能识别问题

- 优化姓名匹配优先查找标签“收件人”等后面的名字,提升识别准确率
- 清理详细地址中标签文本,去除“收件人”“手机号码”“所在地区”“详细地址”等冗余字段
- 保留街道及详细地址完整信息,避免误删有效内容
- 类型定义中新增 country,调整 isDefault 类型为 boolean,增加 address 字段
- 使用 Python 测试验证解析效果,确保姓名、电话、省市区和详细地址准确提取
- 通过类型检查无误,提升代码健壮性和维护便利性
This commit is contained in:
2026-07-15 11:10:29 +08:00
parent 81324cbb82
commit 3955e64844
3 changed files with 48 additions and 7 deletions

View File

@@ -4,6 +4,7 @@ export interface ShopUserAddress {
userId?: number;
name?: string; // 收货人姓名
phone?: string; // 收货人电话
country?: string; // 国家
province?: string; // 省份
city?: string; // 城市
district?: string; // 区县
@@ -11,7 +12,8 @@ export interface ShopUserAddress {
detail?: string; // 详细地址
lng?: string; // 经度
lat?: string; // 纬度
isDefault?: number; // 是否默认 0-否 1-是
isDefault?: boolean; // 是否默认 0-否 1-是
createTime?: string;
updateTime?: string;
address?: string;
}