test(api): 更新API客户端契约测试以符合YAML规范

- 更新登录响应模拟数据以匹配真实的AppLoginVo结构
- 添加认证客户端租户和授权字段验证
- 增加操作码枚举验证测试用例
- 移除对旧token别名的兼容性测试
- 修复测试用例中的短信验证码长度一致性问题
- 更新区域接口路径为PC专用路径
- 调整分片上传接口参数以符合新契约定义

refactor(api): 重构API客户端实现以严格遵循YAML契约

- 添加认证操作码和短信操作码枚举验证
- 实现严格的token响应解析只接受access_token字段
- 使用pickDefined函数过滤请求体中未定义的字段
- 重构认证接口参数映射以符合契约定义
- 更新区域接口路径为PC专用路径/genealogy/pc/region/*
- 优化分片上传接口参数结构与契约保持一致
- 添加操作码枚举验证函数toRequiredOperationCode
- 实现请求体字段选择性提取功能

feat(auth): 优化认证页面的验证码处理流程

- 添加takeCaptchaToken函数用于一次性获取验证码票据
- 更新短信验证码长度验证从4-6位改为精确4位
- 在登录和密码重置流程中集成验证码票据处理
- 修复验证码发送后票据清理逻辑
- 更新HTML模板中的验证码输入字段属性

chore(config): 提取常量配置并扩展配置对象结构

- 将客户端ID、租户ID和令牌键提取为常量
- 扩展配置对象返回客户端配置信息
- 更新配置测试用例以验证新增配置项

docs(planning): 更新PC接口对接规划文档

- 更新契约源说明以反映YAML冻结契约
- 添加YAML与在线Apifox复核对比内容
- 更新阻断项状态表格
- 修订登录响应token字段处理规范
- 更新文件上传和行政区划接口规范说明

style(profile): 优化相册管理页面的文件上传交互

- 将封面和照片OSS ID输入改为隐藏字段
- 添加文件选择标签以改善用户体验
- 移除手动输入OSS ID的选项保持界面简洁
This commit is contained in:
fizzleaf
2026-07-28 15:06:34 +08:00
parent 735a06e330
commit ce4f05b60f
26 changed files with 886 additions and 196 deletions
+34 -9
View File
@@ -68,15 +68,29 @@
id="profileNickName"
name="nickName"
type="text"
maxlength="30"
autocomplete="nickname"
placeholder="请输入昵称"
/>
</div>
<div class="editor-field">
<label for="profileRealName">真实姓名</label>
<input
id="profileRealName"
name="realName"
type="text"
maxlength="30"
autocomplete="name"
placeholder="请输入真实姓名"
/>
</div>
</div>
<div class="editor-two">
<div class="editor-field">
<label for="profileAvatarFile">头像</label>
<input
id="profileAvatarOssId"
name="avatarOssId"
id="profileAvatar"
name="avatar"
type="hidden"
/>
<label class="upload-control" for="profileAvatarFile">选择头像文件</label>
@@ -85,13 +99,13 @@
class="upload-input"
type="file"
accept="image/*"
data-upload-target="#profileAvatarOssId"
data-upload-target="#profileAvatar"
data-upload-status="#profileAvatarStatus"
data-upload-mode="resumable"
data-upload-biz-type="avatar"
data-upload-usage-scene="profile_avatar"
/>
<p id="profileAvatarStatus" class="upload-status">当前 PC 文件上传响应未定义头像回填字段,暂不能上传头像</p>
<p id="profileAvatarStatus" class="upload-status">请选择头像文件</p>
</div>
</div>
<div class="editor-two">
@@ -101,6 +115,7 @@
<option value="">请选择</option>
<option value="0"></option>
<option value="1"></option>
<option value="2">未知</option>
</select>
</div>
<div class="editor-field">
@@ -108,6 +123,17 @@
<input id="profileBirthday" name="birthday" type="date" />
</div>
</div>
<div class="editor-field">
<label for="profileEmail">邮箱</label>
<input
id="profileEmail"
name="email"
type="email"
maxlength="100"
autocomplete="email"
placeholder="请输入邮箱"
/>
</div>
<div class="bottom-actions profile-form-actions">
<button class="btn primary magnetic" type="submit">保存资料</button>
<span class="form-status" data-profile-status></span>
@@ -164,8 +190,7 @@
</section>
<section class="module-panel">
<h2>现居地区</h2>
<!-- 地区资料表单:字段对应 ProfileUpdateBody 的省市区编码。 -->
<form class="editor-form region-profile-form" data-region-profile-form>
<div class="editor-form region-profile-form">
<div class="region-picker profile-region-picker" data-region-picker>
<select class="input" name="provinceCode" data-region-level="province">
<option value="">请选择省</option>
@@ -178,10 +203,10 @@
</select>
</div>
<div class="bottom-actions">
<button class="btn primary magnetic" type="submit">保存地区</button>
<span class="form-status" data-region-profile-status></span>
<button class="btn primary magnetic" type="button" disabled>暂不支持保存地区</button>
<span class="form-status">当前 YAML 的 ProfileUpdateBody 没有地区字段</span>
</div>
</form>
</div>
<form class="editor-form" data-region-search-form data-region-search-panel>
<div class="editor-two">
<div class="editor-field">