docs(changelog): 续签H5全字段全附件回显待前端渲染 (PR #3920/#3921, 司机H5)
后端 init 已返续签全套回显数据(driver 16字段+8类司机附件URL+currentVehicle车辆块 含8类车辆附件URL),测试服实测确认。H5续签页当前只渲染3项,前端需:拉最新后端+ 渲染车辆块+附件回显上传+输入框预填。补此前 #3920/#3921 漏发的契约周知。
这个提交包含在:
父节点
4b02859399
当前提交
29ba67669a
@ -0,0 +1,72 @@
|
||||
【前端待办·司机H5】续签 init 已返完整回显数据(车辆块+全附件+全字段),H5 续签页需渲染+预填
|
||||
|
||||
> 服务:hl-fleet-service(车务)
|
||||
> 关联 PR:#3920(续签司机侧全字段全附件)+ #3921(续签车辆侧常驻车回显,Closes #3919),均已合并 dev-v3 + 部署测试服双实例
|
||||
> 类型:**前端待办**(后端零改动,本条补此前漏发的契约周知)
|
||||
> 端点:`GET /app/h5/driver-onboard/init?token=`(renew 模式)
|
||||
|
||||
## ⚠️ 关键说明
|
||||
|
||||
续签 H5 第 2 步当前只显示了「驾照有效期 / 手机 / 常驻车牌」3 项的灰字提示,**车辆字段块、各类附件上传区都没出来,输入框也没预填当前值**。
|
||||
|
||||
排查结论:**不是后端缺数据,是前端未渲染**。最新后端 `init` 的 `data.prefill` 已返回续签全套回显数据(已在测试服 `api.test.1814.love:9443` 真实验证,蒙A-H7777 实测)。前端需要:① 确保本地后端已拉最新 dev-v3(否则 init 不返这些字段);② 渲染车辆块 + 附件回显/上传;③ 把当前值预填进输入框。
|
||||
|
||||
## 1. init.data.prefill 完整字段(renew 模式)
|
||||
|
||||
### 1.1 司机字段
|
||||
| 字段 | 含义 | 可改 | 备注 |
|
||||
|------|------|------|------|
|
||||
| name / idCard / gender / nation | 姓名/身份证/性别/民族 | 只读 | 供核对,续签不可改;idCard 脱敏 |
|
||||
| phone | 手机号 | 可改 | 脱敏(135****5019);不改直接提交,后端识别含 `*` 跳过更新 |
|
||||
| drivingYears | 驾龄 | 可改 | |
|
||||
| licenseNo / licenseType / licenseExpire / licenseDaysLeft | 驾照号/类型/有效期/剩余天数 | 可改 | licenseNo 脱敏 |
|
||||
| emergencyName / emergencyPhone / emergencyRelation | 紧急联系人 | 可改 | emergencyPhone 脱敏 |
|
||||
| preferredCategory / preferredModel | 常开车型偏好 | 可改 | |
|
||||
| vehicleSource / vehicleNotes | 车辆来源/备注 | 可改 | |
|
||||
|
||||
### 1.2 司机附件 URL(8 类,回显 + 可加传更新)
|
||||
`idCardUrls` / `portraitUrls` / `driverLicenseUrls` / `healthCertUrls` / `trainingCertUrls` / `awardUrls` / `qualificationUrls` / `driverOtherUrls`(均为 `string[]`)
|
||||
|
||||
### 1.3 currentVehicle 车辆块(司机有常驻车则非 null)
|
||||
| 字段 | 含义 |
|
||||
|------|------|
|
||||
| plate | 车牌 |
|
||||
| vehicleModelId / modelName / seats | 车型库车型 ID / 名称 / 座位 |
|
||||
| fleet | 车队 |
|
||||
| vin | 车架号 |
|
||||
| regDate / insureDue / inspectDue | 注册日期 / 保险到期 / 年检到期 |
|
||||
| regCertUsage / regCertNo / regCertOwner | 使用性质 / 行驶证号 / 所有人 |
|
||||
| regCertFrontUrls / regCertBackUrls / exteriorUrls / interiorUrls / insuranceUrls / inspectionUrls / operationLicenseUrls / otherUrls | 车辆 8 类附件 URL(`string[]`,回显 + 可加传) |
|
||||
|
||||
## 2. 真实响应示例(测试服实测,URL 已略)
|
||||
|
||||
```json
|
||||
{ "code":200, "data":{ "mode":"renew", "tokenState":"fresh",
|
||||
"prefill":{
|
||||
"name":"阿拉坦", "idCard":"152***********0195", "gender":"1", "nation":"鄂温克族",
|
||||
"phone":"135****5019", "drivingYears":6,
|
||||
"licenseNo":"152***********3000", "licenseType":"B1", "licenseExpire":"2034-04-15", "licenseDaysLeft":2859,
|
||||
"emergencyName":"联系人03", "emergencyPhone":"139****9003", "emergencyRelation":"朋友",
|
||||
"preferredModel":"别克GL8", "vehicleSource":"own",
|
||||
"idCardUrls":["..."], "portraitUrls":["..."], "driverLicenseUrls":["..."], "healthCertUrls":["..."],
|
||||
"trainingCertUrls":["..."], "awardUrls":["..."], "qualificationUrls":["..."], "driverOtherUrls":["..."],
|
||||
"currentVehicle":{
|
||||
"plate":"蒙A-H7777", "vehicleModelId":"2064998010110029826", "modelName":"丰田汉兰达", "seats":7, "fleet":"coopA",
|
||||
"vin":null, "regDate":"2020-09-05", "insureDue":"2026-09-20", "inspectDue":"2026-09-04",
|
||||
"regCertUsage":"", "regCertNo":"", "regCertOwner":"",
|
||||
"regCertFrontUrls":["..."], "regCertBackUrls":["..."], "exteriorUrls":["..."], "interiorUrls":["..."],
|
||||
"insuranceUrls":["..."], "inspectionUrls":["..."], "operationLicenseUrls":["..."], "otherUrls":["..."]
|
||||
}
|
||||
} } }
|
||||
```
|
||||
|
||||
## 3. 前端待办(mmg)
|
||||
|
||||
1. **确保本地/联调后端为最新 dev-v3**——init 才会返 `currentVehicle` + 各 `*Urls` + 完整 driver 字段(旧后端只返 name/phone/license 少数字段)。
|
||||
2. **渲染车辆块**:currentVehicle 非 null 时,把车型/座位/VIN/注册日期/保险到期/年检/使用性质/行驶证号/所有人渲染为可编辑表单(提交走 `submit/renew` 的 `vehicleChanged + vehicle`)。
|
||||
3. **渲染附件回显 + 上传**:driver 8 类 + vehicle 8 类,按类目显示现有 URL 缩略图 + 提供「加传/替换」入口(提交时把各类目最终 URL 列表回传,后端按类目覆盖式合并)。
|
||||
4. **输入框预填当前值**:phone/驾照有效期/常驻车牌等不再只做灰字「当前 xxx」提示,按需预填进输入框(脱敏值原样回传后端会跳过更新,安全)。
|
||||
|
||||
## 4. 待定(后端可配合,等管理侧拍板)
|
||||
|
||||
`phone / idCard / licenseNo / emergencyPhone` 当前**脱敏**返回。若要让司机在续签页核对「系统里存的完整号码」,后端可对 renew 自己的数据返**明文**(token 单次且绑定本司机,等价司机看自己资料)。是否放开明文待管理侧确认,**不影响前端渲染逻辑**(前端原样渲染 prefill 值即可)。
|
||||
正在加载...
x
在新工单中引用
屏蔽一个用户