From 3020f7bae3b09df36b96fa1aea0d417adadde313 Mon Sep 17 00:00:00 2001 From: ren <2075295574@qq.com> Date: Tue, 8 Jul 2025 22:35:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B9=90=E5=88=B7=E8=BF=9B=E4=BB=B6=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=90=AD=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 +- package.json | 3 +- pnpm-lock.yaml | 8 + src/router/daxpay.ts | 8 + .../daxpay/h5/onboarded/common/axios.d.ts | 71 ++ .../daxpay/h5/onboarded/common/base.d.ts | 61 ++ .../h5/onboarded/common/onBoarded.api.ts | 270 ++++++ .../h5/onboarded/components/upLoadView.vue | 20 + .../daxpay/h5/onboarded/leshua/index.vue | 844 ++++++++++++++++++ .../daxpay/h5/onboarded/leshua/leshua.api.ts | 125 +++ 10 files changed, 1411 insertions(+), 3 deletions(-) create mode 100644 src/views/daxpay/h5/onboarded/common/axios.d.ts create mode 100644 src/views/daxpay/h5/onboarded/common/base.d.ts create mode 100644 src/views/daxpay/h5/onboarded/common/onBoarded.api.ts create mode 100644 src/views/daxpay/h5/onboarded/components/upLoadView.vue create mode 100644 src/views/daxpay/h5/onboarded/leshua/index.vue create mode 100644 src/views/daxpay/h5/onboarded/leshua/leshua.api.ts diff --git a/.env.development b/.env.development index 5c1a6d5..ce53c9d 100644 --- a/.env.development +++ b/.env.development @@ -7,8 +7,8 @@ VITE_PUBLIC_PATH=/ # 跨域代理,可以配置多个,请注意不要换行 # VITE_PROXY=[["/server","http://daxpay-api.test.yibeiguangnian.cn/"]] # VITE_PROXY=[["/server","http://192.168.11.229:19999/"]] - VITE_PROXY=[["/server","https://pay1.bootx.cn/"]] - # VITE_PROXY=[["/server","https://dev.server.daxpay.cn/"]] + # VITE_PROXY=[["/server","https://pay1.bootx.cn/"]] + VITE_PROXY=[["/server","https://dev.server.daxpay.cn/"]] # VITE_PROXY=[["/server","http://127.0.0.1:19999/"]] diff --git a/package.json b/package.json index 772ccb8..90346f8 100644 --- a/package.json +++ b/package.json @@ -26,8 +26,8 @@ "dependencies": { "@types/lodash-es": "^4.17.12", "@unocss/reset": "^0.58.9", + "@vant/area-data": "^2.0.0", "@vueuse/core": "^10.11.1", - "vue-qr": "^4.0.9", "axios": "^1.7.9", "date-fns": "^3.6.0", "lodash-es": "^4.17.21", @@ -37,6 +37,7 @@ "qs": "^6.13.1", "vant": "^4.9.10", "vue": "^3.5.13", + "vue-qr": "^4.0.9", "vue-router": "4.2.5" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b06467f..93fd605 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,6 +14,9 @@ importers: '@unocss/reset': specifier: ^0.58.9 version: 0.58.9 + '@vant/area-data': + specifier: ^2.0.0 + version: 2.0.0 '@vueuse/core': specifier: ^10.11.1 version: 10.11.1(vue@3.5.13(typescript@5.7.2)) @@ -1194,6 +1197,9 @@ packages: peerDependencies: vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 + '@vant/area-data@2.0.0': + resolution: {integrity: sha512-zgP4AA8z09S9QTNgVCCHo9cHjcybrv22RJDYPjuCkecn4SB98T5EoPQh2TwqbQXmUhbaOGgiZGy3OUaUxnY7qg==} + '@vant/popperjs@1.3.0': resolution: {integrity: sha512-hB+czUG+aHtjhaEmCJDuXOep0YTZjdlRR+4MSmIFnkCQIxJaXLQdSsR90XWvAI2yvKUI7TCGqR8pQg2RtvkMHw==} @@ -5497,6 +5503,8 @@ snapshots: transitivePeerDependencies: - rollup + '@vant/area-data@2.0.0': {} + '@vant/popperjs@1.3.0': {} '@vant/use@1.6.0(vue@3.5.13(typescript@5.7.2))': diff --git a/src/router/daxpay.ts b/src/router/daxpay.ts index 57071e4..d533c4e 100644 --- a/src/router/daxpay.ts +++ b/src/router/daxpay.ts @@ -98,6 +98,14 @@ export const DaxPayH5Route: RouteRecordRaw = { title: '支付失败页面', }, }, + { + path: '/onboarded/leshua', + name: 'leshua', + component: () => import('@/views/daxpay/h5/onboarded/leshua/index.vue'), + meta: { + title: '乐刷进件', + }, + }, ], } /** diff --git a/src/views/daxpay/h5/onboarded/common/axios.d.ts b/src/views/daxpay/h5/onboarded/common/axios.d.ts new file mode 100644 index 0000000..9442cb6 --- /dev/null +++ b/src/views/daxpay/h5/onboarded/common/axios.d.ts @@ -0,0 +1,71 @@ +export type ErrorMessageMode = 'none' | 'modal' | 'message' | undefined +export type SuccessMessageMode = ErrorMessageMode + +export interface RequestOptions { + // Splicing request parameters to url + joinParamsToUrl?: boolean + // Format request parameter time + formatDate?: boolean + // Whether to process the request result + isTransformResponse?: boolean + // Whether to return native response headers + // For example: use this attribute when you need to get the response headers + isReturnNativeResponse?: boolean + // 是否加入网址 + joinPrefix?: boolean + // 接口地址,如果将其留空,请使用默认 apiUrl + apiUrl?: string + // 请求拼接路径 + urlPrefix?: string + // 错误消息提示类型 + errorMessageMode?: ErrorMessageMode + // Success message prompt type + successMessageMode?: SuccessMessageMode + // Whether to add a timestamp + joinTime?: boolean + ignoreCancelToken?: boolean + // Whether to send token in header + withToken?: boolean + // 请求重试机制 + retryRequest?: RetryRequest +} + +export interface RetryRequest { + isOpenRetry: boolean + count: number + waitTime: number +} + +/** + * 通用响应类 + */ +export interface Result { + code: number + type: 'success' | 'error' | 'warning' + msg: string + traceId: string | null | undefined + data: T +} + +/** + * 分页响应类 + */ +export interface PageResult { + current: number + records: Array + size: number + total: number +} + +// multipart/form-data: upload file +export interface UploadFileParams { + // Other parameters + data?: Recordable + // File parameter interface field name + name?: string + // file name + file: File | Blob + // file name + filename?: string + [key: string]: any +} diff --git a/src/views/daxpay/h5/onboarded/common/base.d.ts b/src/views/daxpay/h5/onboarded/common/base.d.ts new file mode 100644 index 0000000..fc1f82a --- /dev/null +++ b/src/views/daxpay/h5/onboarded/common/base.d.ts @@ -0,0 +1,61 @@ +import type { PageResult } from './axios' + +/** + * 分页参数 + */ +export interface PageParam { + // 每页数量 + size: number + // 当前页数 + current: number +} + +/** + * 分页表格列表对象 + */ +export interface TablePageModel { + // 分页参数 + pages: PageParam + // 查询参数 + queryParam: any + // 结果 + pagination: PageResult +} + +/** + * 基础实体对象 + */ +export interface BaseEntity { + id?: number | string | null + createTime?: string | null +} + +/** + * 商户应用基础实体对象 + */ +export interface MchEntity extends BaseEntity { + // 服务商号 + isvNo?: string + // 服务商名称 + isvName?: string + // 代理商号 + agentNo?: string + // 代理商名称 + agentName?: string + // 商户号 + mchNo?: string + // 商户名称 + mchName?: string + // 应用号 + appId?: string + // 应用名称 + appName?: string +} + +/** + * 键值对对象 + */ +export interface KeyValue { + key: string + value: string +} diff --git a/src/views/daxpay/h5/onboarded/common/onBoarded.api.ts b/src/views/daxpay/h5/onboarded/common/onBoarded.api.ts new file mode 100644 index 0000000..edbda0e --- /dev/null +++ b/src/views/daxpay/h5/onboarded/common/onBoarded.api.ts @@ -0,0 +1,270 @@ +import { unref } from 'vue' +import type { MchEntity } from './base' +import { http } from '@/utils/http/axios' +import type { PageResult, Result } from '#/axios' + +/** + * 获取单条 + */ +export function findById(id) { + return http.request>({ + url: '/isv/mch/apply/findById', + method: 'get', + params: { id: unref(id) }, + }) +} + +/** + * 分页 + */ +export function page(params) { + return http.request>>({ + url: '/isv/mch/apply/page', + method: 'get', + params, + }) +} + +/** + * 保存 + */ +export function save(obj: IsvMchApply) { + return http.request>({ + url: '/isv/mch/apply/create', + method: 'post', + data: obj, + }) +} + +/** + * 更新 + */ +export function update(obj: IsvMchApply) { + return http.request({ + url: '/isv/mch/apply/update', + method: 'post', + data: obj, + }) +} + +/** + * 提交 + */ +export function submit(id) { + return http.request({ + url: '/isv/mch/apply/submit', + method: 'post', + params: { id }, + }) +} + +/** + * 根据通道查询进件申请类型下拉列表 + */ +export function dropdownByChannel(channel) { + return http.request({ + url: '/isv/mch/apply/type/dropdownByChannel', + method: 'get', + params: { channel }, + }) +} + +/** + * 删除 + */ +export function del(id) { + return http.request({ + url: '/isv/mch/apply/delete', + method: 'post', + params: { id }, + }) +} + +/** + * 同步 + */ +export function syncInfo(id) { + return http.request({ + url: '/isv/mch/apply/sync', + method: 'post', + params: { id }, + }) +} + +/** + * 生成进件商户 + */ +export function genMchInfo(param) { + return http.request({ + url: '/isv/mch/apply/genMchInfo', + method: 'post', + data: param, + }) +} + +/** + * 商户进件申请单 + */ +export interface IsvMchApply extends MchEntity { + // 进件通道 + channel?: string + // 进件类型 + applyType?: string + // 服务商 + isvNo?: string + // 进件的商户类型 + applyMchType?: string + // 商户号 + mchNo?: string + // 单据名称 + name?: string + // 表单数据 + formData?: string + // 外部状态 + outStatus?: string + // 状态 + status?: string + // 错误提示 + errorMsg?: string +} + +/** + * 进件商户申请信息 + * @author xxm + * @since 2025/6/9 + */ +export interface OnbMerchantApply { + /** 商户类型 @see OnbMerchantTypeEnum */ + merchantType?: string + /** 商户全称 */ + merchantName?: string + /** 商户简称 */ + merchantShortName?: string +} +/** + * 进件申请法人信息 + * @author xxm + * @since 2025/6/9 + */ +export interface OnbLegalApply { + /** 法人姓名 */ + legalName?: string + /** 身份证号 */ + certNo?: string + /** 身份证有效期类型 */ + certPeriodLong?: boolean + /** 身份证开始时间 */ + certStartDate?: string + /** 身份证结束时间 */ + certEndDate?: string + /** 身份证正面照片 */ + certFrontPic?: string + /** 身份证正面照片路径 */ + certFrontPicUrl?: string + /** 身份证反面照片 */ + certBackPic?: string + /** 身份证反面照片路径 */ + certBackPicUrl?: string +} +/** + * 进件营业执照信息 + * @author xxm + * @since 2025/6/9 + */ +export interface OnbLicenseApply { + /** 营业执照号 */ + licenseNo?: string + /** 营业执照名称 */ + licenseName?: string + /** 执照地址-省市区编码 */ + licenseRegionCode?: string[] + /** 营业执照详细地址 */ + licenseAddress?: string + /** 营业执照有效期类型 */ + licensePeriodLong?: boolean + /** 营业执照开始日期 */ + licenseStartDate?: string + /** 营业执照结束日期 */ + licenseEndDate?: string + /** 营业执照照片 */ + licensePic?: string + /** 营业执照照片路径 */ + licensePicUrl?: string +} +/** + * 经营场所信息 + * @author xxm + * @since 2025/6/9 + */ +export interface OnbShopApply { + /** 经营场所名称 */ + shopName?: string + /** 省市区编码 */ + shopRegionCode?: string[] + /** 经营场所详细地址 */ + shopAddress?: string + /** 门头照 */ + shopDoorPic?: string + /** 门头照路径 */ + shopDoorPicUrl?: string + /** 室内照 */ + shopInsidePic?: string + /** 室内照路径 */ + shopInsidePicUrl?: string + /** 收银台照片 */ + shopCashierPic?: string + /** 收银台照片路径 */ + shopCashierPicUrl?: string +} + +/** + * 进件结算卡信息 + * @author xxm + * @since 2025/6/9 + */ +export interface OnbBankAccountApply { + /** 账户类型 */ + bankAccountType?: string + /** 银行卡账户名 */ + bankAccountName?: string + /** 银行卡号 */ + bankCardNo?: string + /** 银行卡开户行联行号 */ + bankBranchNo?: string + /** 银行预留手机号 */ + bankPhone?: string + /** 银行卡正面照片 */ + bankCardPic?: string + /** 银行卡正面照片路径 */ + bankCardPicUrl?: string +} + +/** + * 持卡人信息 + * @author xxm + * @since 2025/6/9 + */ +export interface OnbCardHolderApply { + /** 持卡人姓名 */ + holderName?: string + /** 身份证号 */ + certNo?: string + /** 身份证有效期类型 */ + certPeriodLong?: boolean + /** 身份证开始时间 */ + certStartDate?: string + /** 身份证结束时间 */ + certEndDate?: string + /** 身份证正面照片 */ + certFrontPic?: string + /** 身份证正面照片路径 */ + certFrontPicUrl?: string + /** 身份证反面照片 */ + certBackPic?: string + /** 身份证反面照片路径 */ + certBackPicUrl?: string + /** 非法人结算授权函图片 */ + letterOfAuthPic?: string + /** 非法人结算授权函图片路径 */ + letterOfAuthPicUrl?: string +} diff --git a/src/views/daxpay/h5/onboarded/components/upLoadView.vue b/src/views/daxpay/h5/onboarded/components/upLoadView.vue new file mode 100644 index 0000000..c2e335e --- /dev/null +++ b/src/views/daxpay/h5/onboarded/components/upLoadView.vue @@ -0,0 +1,20 @@ + + + diff --git a/src/views/daxpay/h5/onboarded/leshua/index.vue b/src/views/daxpay/h5/onboarded/leshua/index.vue new file mode 100644 index 0000000..8612e0e --- /dev/null +++ b/src/views/daxpay/h5/onboarded/leshua/index.vue @@ -0,0 +1,844 @@ + + + + + + + + + diff --git a/src/views/daxpay/h5/onboarded/leshua/leshua.api.ts b/src/views/daxpay/h5/onboarded/leshua/leshua.api.ts new file mode 100644 index 0000000..0541a15 --- /dev/null +++ b/src/views/daxpay/h5/onboarded/leshua/leshua.api.ts @@ -0,0 +1,125 @@ +import type { + OnbBankAccountApply, + OnbCardHolderApply, + OnbLegalApply, + OnbLicenseApply, + OnbMerchantApply, + OnbShopApply, +} from '../common/onBoarded.api' +import { http } from '@/utils/http/axios' +import type { Result } from '#/axios' + +/** + * 查询 + */ +export function getInfo(id) { + return http.request>({ + method: 'get', + url: '/leshua/mch/apply/findById', + params: { id }, + }) +} + +/** + * 保存 + */ +export function save(param: MerchantApply) { + return http.request>({ + method: 'post', + url: '/leshua/mch/apply/save', + data: param, + }) +} + +/** + * 乐刷经营类目树 + */ +export function mccTree() { + return http.request>({ + method: 'get', + url: '/leshua/mcc/tree', + }) +} + +/** + * 地区树 + */ +export function findAllProvinceAndCityAndArea() { + return http.request>({ + url: '/china/region/findAllProvinceAndCityAndArea', + method: 'get', + }) +} +/** + * 乐刷商户申请参数 + */ +export interface MerchantApply { + /** 申请单ID */ + applyId?: string + /** 商户申请参数 */ + mchApply: MchApply +} + +/** + * 商户申请信息 + */ +export interface MchApply { + /** 商户信息 */ + merchant: OnbMerchantApply + /** 法人信息 */ + legal: OnbLegalApply + /** 商户资质图片信息 */ + license: OnbLicenseApply + /** 经营场所名称 */ + shop: OnbShopApply + /** 结算卡信息 */ + bankAccount: OnbBankAccountApply + /** 持卡人信息 */ + cardHolder: OnbCardHolderApply + /** 其他申请信息 */ + other: OtherApply +} + +/** + * 其他申请数据 + */ +export interface OtherApply { + /** 联系人手机号 */ + contactPhone?: string + /** 经营类目代码 */ + mccCodes?: string[] + /** 开户银行省市 */ + bankRegionCode?: string[] + /** 开户银行网点名称 */ + bankName?: string + /** 法人手持结算授权合影 */ + legaHandAuthPic?: string + /** 法人手持结算授权合影 */ + legaHandAuthPicUrl?: string +} + +/** + * 乐刷经营类目 + */ +export interface MccConst { + /** 类目 */ + code: string + /** 类目名称 */ + name: string + /** 父类目 */ + parentCode: string + /** 子类目 */ + children?: MccConst[] +} + +/** + * 区域 + */ +export interface Region { + code: string + name: string + /** 省市区街道 */ + level: 1 | 2 | 3 | 4 + isLeaf?: boolean + children: Region[] +}