From 982b8723a4cac6d68d2f98b3b335008ed755e453 Mon Sep 17 00:00:00 2001 From: halo Date: Sat, 8 Aug 2026 10:31:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=81=E4=B8=9A=E5=BC=80=E6=88=B7=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fryl_h5/src/api/enterpriseOpen.js | 25 +- fryl_h5/src/views/EnterpriseOpenMobile.vue | 30 +- .../enterprise/EnterpriseAgreementStep.vue | 302 +++++++++++++++--- .../enterprise/EnterpriseSmsVerifyStep.vue | 10 +- mock-server/db/seedBaseConfig.js | 34 +- src/components/BankSelector.vue | 63 ++-- 6 files changed, 382 insertions(+), 82 deletions(-) diff --git a/fryl_h5/src/api/enterpriseOpen.js b/fryl_h5/src/api/enterpriseOpen.js index 415bf4d..365e1ec 100644 --- a/fryl_h5/src/api/enterpriseOpen.js +++ b/fryl_h5/src/api/enterpriseOpen.js @@ -8,9 +8,15 @@ import request from './request' // (该接口本身是透传给短信网关的通用参数,技术上可复用,待后端确认是否允许非个人开户场景调用)。 // tradeNo/tradeType 固定值取自个人开户H5当前已修正的正确取值(2026-08-06 修正记录,见 // personalOpen.js 同名字段注释):tradeNo 固定 "221506",tradeType 固定 "0"。 +// - fetchBankAgreementApi/uploadFileApi:与个人开户H5共用同一对通用接口(协议模板下载、通用 +// 文件上传均不区分业务类型),原样从 personalOpen.js 复制一份到本文件,保持"各开户流程独立 +// api文件"的项目既有风格(不跨文件 import),详见 2026-08-06-agreement-pdf-fill-and-upload-design.md。 // - confirm:后端已提供的真实接口,语义为"申请人扫码核实信息后点击确认,提交凡荣e链", // 与个人开户的 mobile/submit 不同,请求体是 {channelNo, verifyCode, confirmBto:{id, // applicationStatus, confirmTime}},confirmBto.id 取自本次假设的 draft-detail 接口。 +// 2026-08-07 新增 payAgreementFileNo(顶层字段,与 confirmBto 同级):真实接口当前请求体没有 +// 这个字段,是前端参照个人开户 mobile/submit 新增 payAgreementFileNo 字段的先例假设新增, +// 已登记《缺失的后端接口.md》,待后端确认字段名/位置。 export const fetchDraftDetailApi = (applicationNo) => request.post('/api/wallet-management/enterprise-open-application/mobile/draft-detail', { applicationNo }) @@ -29,15 +35,32 @@ export const sendVerifyCodeApi = ({ channelNo, mobile, cardNo, cardName, idNo }) idNo }) +// 获取银行协议模板文件(base64),与个人开户H5共用同一个通用接口,详见 +// docs/superpowers/specs/2026-08-06-agreement-pdf-fill-and-upload-design.md。 +// 响应 data:{ fileType, fileName, fileContent(base64) }。 +export const fetchBankAgreementApi = (fileType) => + request.get('/api/customer-info/bank-agreement/base64', { params: { fileType } }) + +// 通用文件上传(与主项目 src/api/customer.js 的 uploadCustomerFileApi 对接同一个后端接口), +// 用于把"填好企业信息后的《用户支付服务协议》PDF"(base64)上传换取 fileNo。channelNo 后端 +// 标记必填,取自 draft-detail 响应字段(同 send-verify-code/general 的取值来源)。 +export const uploadFileApi = ({ fileBase64, channelNo }) => + request.post('/api/customer-info/personal/upload-file', { fileBase64, channelNo }) + // confirm 为真实已有接口,直接对接真实后端(不在 mock-server 实现),applicationStatus 固定传 // 'CONFIRMED'(枚举含义"已确认",对应"申请人扫码确认"这一步),confirmTime 为提交时的当前时间。 -export const confirmApplicationApi = ({ channelNo, verifyCode, id, confirmTime }) => +// payAgreementFileNo 为本次新增的假设字段(见文件头注释),放在请求体顶层,与 channelNo/ +// verifyCode 同级,不放进 confirmBto(该 Bto 对应后端已定义的 ConfirmEnterpriseAccountOpenBto, +// 只有 id/applicationStatus/confirmTime 三个字段,不属于这个 Bto 的既有结构)。 +export const confirmApplicationApi = ({ channelNo, verifyCode, id, confirmTime, payAgreementFileNo }) => request.post('/api/wallet-management/enterprise-open-application/confirm', { channelNo, verifyCode, + payAgreementFileNo, confirmBto: { id, applicationStatus: 'CONFIRMED', confirmTime } }) + diff --git a/fryl_h5/src/views/EnterpriseOpenMobile.vue b/fryl_h5/src/views/EnterpriseOpenMobile.vue index c6348e5..1b4322f 100644 --- a/fryl_h5/src/views/EnterpriseOpenMobile.vue +++ b/fryl_h5/src/views/EnterpriseOpenMobile.vue @@ -8,7 +8,11 @@ 后端契约缺口(详见《缺失的后端接口.md》与 src/api/enterpriseOpen.js 顶部注释): - mobile/draft-detail 是本次前端假设新增的接口,后端目前未提供 - 发验证码复用个人开户H5在用的通用接口 - - 提交确认(confirm)是真实已有接口,本地 mock-server 未实现,只能连真实后端环境验证 --> + - 提交确认(confirm)是真实已有接口,本地 mock-server 未实现,只能连真实后端环境验证 + - 2026-08-07 新增:相关协议步骤按产品要求对齐个人开户H5的"协议模板下载+自动填充+上传" + 机制(详见 EnterpriseAgreementStep.vue),填入PDF签名区块的是企业名称+统一社会信用 + 代码(不是法人姓名/身份证号),生成的 payAgreementFileNo 随 confirm 请求体顶层字段 + 一并提交,该字段是前端假设新增,详见 enterpriseOpen.js 顶部注释 -->