Compare commits

...

11 Commits

Author SHA1 Message Date
6abb49c911 feat(delivery): 优化身份证及凭证图片上传和提交校验
- 在提交前新增必填图片校验,确保身份证正反面及其他凭证全部上传
- 优化图片上传占位样式,新增上传提示文案
- uploadImage函数增加上传中loading提示及成功失败反馈toast
- 格式化后端错误提示,过滤错误码尾巴,提升用户体验
- 明确图片字段标签,标注为“身份证正面(人像面)”等,增强用户指引
2026-07-26 14:09:31 +08:00
96d153ac6d 20260720 2026-07-20 11:45:16 +08:00
yangqingyuan
6bcbdbe892 feat:紧急联系人改成紧急联系人电话 2024-09-29 10:02:59 +08:00
yangqingyuan
041d2a8b91 fix:修复下单失败的圈圈没有消失问题 2024-09-04 11:18:02 +08:00
yangqingyuan
e9cea6e194 feat:芝麻分免押判断 2024-09-03 15:34:02 +08:00
yangqingyuan
a7cfd63dc3 feat:退租信息标红 2024-09-03 15:33:38 +08:00
messi
bdd78601de fix 2024-08-27 18:03:10 +08:00
messi
dbd2d70005 fix 2024-08-19 20:32:55 +08:00
messi
4913dfd52c Merge branch 'dev' of http://git.gxwebsoft.com/gxwebsoft/yunxinwei-uniapp into dev 2024-08-19 17:17:52 +08:00
messi
4810dc79e3 fix 2024-08-19 17:17:46 +08:00
a7a251c1f3 update 2024-08-19 17:15:39 +08:00
539 changed files with 595 additions and 238 deletions

View File

@@ -1,2 +1,3 @@
VITE_APP_NAME=云芯威BMS VITE_APP_NAME=云芯威BMS
apiUrl=http://127.0.0.1:8081/api # apiUrl=https://yxw.wsdns.cn/api
apiUrl=http://127.0.0.1:9090/api

View File

@@ -1,2 +1,2 @@
VITE_APP_NAME=云芯威BMS VITE_APP_NAME=云芯威BMS
VITE_API_URL=https://yxw.wsdns.cn/api VITE_API_URL=https://yxw-api.websoft.top/api

1
.gitignore vendored Executable file → Normal file
View File

@@ -1,3 +1,4 @@
/unpackage /unpackage
/node_modules /node_modules
/utils/request-1.js /utils/request-1.js
/node_modules/

0
.hbuilderx/launch.json Executable file → Normal file
View File

6
.idea/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,6 @@
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

8
.idea/modules.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/yunxinwei-uniapp.iml" filepath="$PROJECT_DIR$/.idea/yunxinwei-uniapp.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

12
.idea/yunxinwei-uniapp.iml generated Normal file
View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@@ -0,0 +1,45 @@
# 2026-07-26
## 修复 `pages/order/delivery.vue` 身份证上传失败 Bug
**用户报告**:页面提交时弹"请上传身份证正面照片.FAILUREFP03333"。
**根因分析**
- 错误码 `FAILUREFP03333` 和提示文本"请上传身份证正面照片"都是后端 `POST /open/equipment/receipt` 返回的,前端代码无此内容。
- `orderSourceData` 数组下标与图片含义是固定绑定0=身份证正面、1=身份证反面、2=人车合照、3=车子照片、4=安装照片。
- 截图里只看到"其他"模块 3 张图,未见"身份证信息"模块——用户大概率跳过了身份证正反面上传就点了提交。
**修复内容**`pages/order/delivery.vue`
1.`handleSubmit` 提交前增加客户端必传校验5 个图片槽位任一为空就拦截,并按"身份证正面 > 身份证反面 > 其他"优先级提示用户补图。
2. 过滤后端返回的错误码尾巴(如 `.FAILUREFP03333`),新增 `formatErrorMsg()` 工具函数。
3. 优化占位图:未上传时显示"+ 点击上传身份证正面(人像面)"等说明,替代原来的灰色 `not-dealer.png` 占位。
4. `chooseImage``uni.showLoading` 上传中提示,成功/失败分别 toast 明确文案。
5. 字段标签明确化:"正面/反面"→"身份证正面(人像面)/身份证反面(国徽面)"。
**关于 `FAILUREFP03333` 的判断**
- 非前端错误码(前端 grep 无任何匹配)。
- 推测是后端在调用阿里云内容安全 / 第三方 OCRFace++、百度、腾讯云天御等)做身份证内容审核时返回的状态码。
- 真正根因在后端,前端只能加校验和友好提示,无法根本解决"图片本身被识别为非身份证"的场景。
- 建议后端同事确认 `/open/equipment/receipt` 接口的身份证正反面校验逻辑,以及是否依赖第三方图片识别服务。
## 后端 `yunxinwei-api` 同步修复FAILUREFP03333 根因)
**项目路径**`/Users/gxwebsoft/JAVA/yunxinwei-api`
**文件**`src/main/java/com/gxwebsoft/open/controller/OpenEquipmentController.java`
**根因确认**
- `receipt()` 接口(原 402-461 行)调用 `idcardService.verify(front, back)` 做阿里云市场 OCR`miitangs14.market.alicloudapi.com/v1/tools/ocr/idCard`),非 `FP00000` 时把 `verify.getMessage() + verify.getCode()` 直接拼进用户提示 → 用户看到"请上传身份证正面照片.FAILUREFP03333"。
- `idcardService.verify` 在 OCR 接口异常时返回 `null`,原代码紧接着 `verify.getCode()` 会 NPE → 500。
- `images.get(0/1)` 在图片不足 2 张时会 `IndexOutOfBounds`;用户跳过身份证上传只传 3 张其他图时,`images[0]` 被当成身份证人像面去 OCR → 失败但提示语仍是"请上传身份证正面照片"。
**修复内容**
1. 抽出私有方法 `verifyIdCard(orderSourceData, order)`,把身份证识别与实名回填逻辑内聚。
2. JSON 解析加 try-catch失败返回"身份证图片数据格式有误"。
3. 校验 `images` 至少 2 张且 `images[0]`/`images[1]` 非空,否则返回"请上传身份证正面和反面照片"(不再越界)。
4. `verify` 调用加 try-catch + `null` 判断,避免 NPEOCR 异常返回友好提示。
5. **内部错误码 `FAILUREFP03333` 不再回吐给用户**,仅 `log.warn` 记录;用户提示改为"身份证正面照片识别失败,请重新上传清晰的身份证人像面照片" / "身份证反面照片识别失败,请重新上传清晰的身份证国徽面照片"。
6. `userService.getById(...)``null` 防护,避免回填空指针。
**验证**`./mvnw -o -q compile` 离线编译通过EXIT=0依赖已本地缓存
**前后端配合结论**前端delivery.vue做提交前必传校验 + 友好占位后端OpenEquipmentController做空安全 + 内部码隔离 + 分正反面提示,两端共同消除该 Bug。

0
App.vue Executable file → Normal file
View File

0
androidPrivacy.json Executable file → Normal file
View File

0
api/address.js Executable file → Normal file
View File

0
api/article/category.js Executable file → Normal file
View File

0
api/article/index.js Executable file → Normal file
View File

0
api/balance.js Executable file → Normal file
View File

0
api/balance/log.js Executable file → Normal file
View File

0
api/bargain/active.js Executable file → Normal file
View File

0
api/bargain/checkout.js Executable file → Normal file
View File

0
api/bargain/task.js Executable file → Normal file
View File

0
api/captcha.js Executable file → Normal file
View File

0
api/cart.js Executable file → Normal file
View File

0
api/cashier/index.js Executable file → Normal file
View File

0
api/category/index.js Executable file → Normal file
View File

0
api/checkout.js Executable file → Normal file
View File

0
api/comment.js Executable file → Normal file
View File

0
api/coupon.js Executable file → Normal file
View File

0
api/dealer/apply.js Executable file → Normal file
View File

0
api/dealer/index.js Executable file → Normal file
View File

0
api/dealer/order.js Executable file → Normal file
View File

0
api/dealer/poster.js Executable file → Normal file
View File

0
api/dealer/setting.js Executable file → Normal file
View File

0
api/dealer/team.js Executable file → Normal file
View File

0
api/dealer/withdraw.js Executable file → Normal file
View File

0
api/express.js Executable file → Normal file
View File

0
api/goods/index.js Executable file → Normal file
View File

0
api/goods/service.js Executable file → Normal file
View File

0
api/groupon/checkout.js Executable file → Normal file
View File

0
api/groupon/goods.js Executable file → Normal file
View File

0
api/groupon/setting.js Executable file → Normal file
View File

0
api/groupon/task.js Executable file → Normal file
View File

0
api/help.js Executable file → Normal file
View File

0
api/live/room.js Executable file → Normal file
View File

0
api/login/index.js Executable file → Normal file
View File

0
api/myCoupon.js Executable file → Normal file
View File

11
api/order.js Executable file → Normal file
View File

@@ -9,7 +9,8 @@ const api = {
cancel: 'order/cancel', cancel: 'order/cancel',
extractQrcode: 'order/extractQrcode', extractQrcode: 'order/extractQrcode',
receipt: '/open/equipment/receipt', receipt: '/open/equipment/receipt',
pay: 'order/pay' pay: 'order/pay',
updateOrderNo: '/shop/order-pay/change-order-no',
} }
// 当前用户待处理的订单数量 // 当前用户待处理的订单数量
@@ -46,3 +47,11 @@ export function receipt(data) {
export function extractQrcode(orderId, param) { export function extractQrcode(orderId, param) {
return request.get(api.extractQrcode, { orderId, ...param }) return request.get(api.extractQrcode, { orderId, ...param })
} }
// 核销二维码
export function updateOrderNo() {
return request.get(api.updateOrderNo)
}

0
api/order/comment.js Executable file → Normal file
View File

0
api/page.js Executable file → Normal file
View File

0
api/points/log.js Executable file → Normal file
View File

0
api/recharge.js Executable file → Normal file
View File

0
api/recharge/order.js Executable file → Normal file
View File

0
api/recharge/plan.js Executable file → Normal file
View File

0
api/refund.js Executable file → Normal file
View File

0
api/region.js Executable file → Normal file
View File

0
api/setting.js Executable file → Normal file
View File

0
api/sharp/checkout.js Executable file → Normal file
View File

0
api/sharp/goods.js Executable file → Normal file
View File

0
api/sharp/home.js Executable file → Normal file
View File

0
api/shop.js Executable file → Normal file
View File

0
api/shop/order.js Executable file → Normal file
View File

0
api/upload.js Executable file → Normal file
View File

0
api/user.js Executable file → Normal file
View File

0
api/user/coupon.js Executable file → Normal file
View File

0
api/wxofficial.js Executable file → Normal file
View File

0
app.scss Executable file → Normal file
View File

0
common/constant/index.js Executable file → Normal file
View File

0
common/constant/paginate.js Executable file → Normal file
View File

0
common/enum/Client.js Executable file → Normal file
View File

0
common/enum/coupon/ApplyRange.js Executable file → Normal file
View File

0
common/enum/coupon/CouponType.js Executable file → Normal file
View File

0
common/enum/coupon/ExpireType.js Executable file → Normal file
View File

0
common/enum/coupon/index.js Executable file → Normal file
View File

0
common/enum/dealer/apply/ApplyStatus.js Executable file → Normal file
View File

0
common/enum/dealer/apply/ApplyType.js Executable file → Normal file
View File

0
common/enum/dealer/apply/index.js Executable file → Normal file
View File

0
common/enum/dealer/withdraw/ApplyStatus.js Executable file → Normal file
View File

0
common/enum/dealer/withdraw/PayType.js Executable file → Normal file
View File

0
common/enum/dealer/withdraw/index.js Executable file → Normal file
View File

0
common/enum/enum.js Executable file → Normal file
View File

0
common/enum/goods/GoodsType.js Executable file → Normal file
View File

0
common/enum/goods/SpecType.js Executable file → Normal file
View File

0
common/enum/goods/index.js Executable file → Normal file
View File

0
common/enum/groupon/ActiveStatus.js Executable file → Normal file
View File

0
common/enum/groupon/ActiveType.js Executable file → Normal file
View File

0
common/enum/groupon/GoodsStatus.js Executable file → Normal file
View File

0
common/enum/groupon/TaskStatus.js Executable file → Normal file
View File

0
common/enum/groupon/index.js Executable file → Normal file
View File

0
common/enum/live/LiveStatus.js Executable file → Normal file
View File

0
common/enum/live/index.js Executable file → Normal file
View File

0
common/enum/order/DeliveryStatus.js Executable file → Normal file
View File

0
common/enum/order/DeliveryType.js Executable file → Normal file
View File

0
common/enum/order/OrderSource.js Executable file → Normal file
View File

0
common/enum/order/OrderStatus.js Executable file → Normal file
View File

0
common/enum/order/OrderType.js Executable file → Normal file
View File

0
common/enum/order/PayStatus.js Executable file → Normal file
View File

0
common/enum/order/PayType.js Executable file → Normal file
View File

0
common/enum/order/ReceiptStatus.js Executable file → Normal file
View File

0
common/enum/order/delivery/DeliveryMethod.js Executable file → Normal file
View File

0
common/enum/order/delivery/index.js Executable file → Normal file
View File

0
common/enum/order/index.js Executable file → Normal file
View File

0
common/enum/order/refund/AuditStatus.js Executable file → Normal file
View File

Some files were not shown because too many files have changed in this diff Show More