mirror of
https://gitee.com/bootx/dax-pay-h5
synced 2026-08-11 15:15:34 +08:00
feat(system): 新增系统API及商户进件功能
- 移除FileUpload.api.ts中冗余的headers参数 - System.api.ts新增地区树、OCR识别等相关接口与类型定义 - BUpload.vue组件移除webHeader属性及相关逻辑 - 路由配置新增进件相关路由(DaxPayOnboardedRoute, DaxPayMiniRoute) - 新增token状态管理模块(useTokenStore)- axios请求拦截器集成token和clientCode自动注入- OnbMchApply.api.ts重构,移除重复定义并优化接口调用 - HkrtApply.vue和LeshuaApply.vue移除web-header绑定,使用全局token管理 - 所有API调用统一去除headers参数传递,改为全局拦截器处理
This commit is contained in:
@@ -4,24 +4,22 @@ import { http } from '@/utils/http/axios'
|
||||
/**
|
||||
* 对象存储预签名
|
||||
*/
|
||||
export function getUploadParams(param: FileUploadRequestParams, headers) {
|
||||
export function getUploadParams(param: FileUploadRequestParams) {
|
||||
return http.request<Result<FileUploadParamsResult>>({
|
||||
url: '/file/getUploadParams',
|
||||
method: 'post',
|
||||
data: param,
|
||||
headers,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前端直传文件信息
|
||||
*/
|
||||
export function saveOssFileInfo(fileInfo: UpdateFileInfo, headers) {
|
||||
export function saveOssFileInfo(fileInfo: UpdateFileInfo) {
|
||||
return http.request<Result<UpdateFileInfo>>({
|
||||
url: '/file/saveFileInfo',
|
||||
method: 'post',
|
||||
data: fileInfo,
|
||||
headers,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { Result } from '#/axios'
|
||||
import type { MchEntity, Result } from '#/axios'
|
||||
import { http } from '@/utils/http/axios'
|
||||
|
||||
/**
|
||||
* 对象存储预签名
|
||||
* 获取站点信息
|
||||
*/
|
||||
export function getWebsite() {
|
||||
return http.request<Result<PlatformWebsiteConfig>>({
|
||||
@@ -11,6 +11,53 @@ export function getWebsite() {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 地区树
|
||||
*/
|
||||
export function findAllProvinceAndCityAndArea() {
|
||||
return http.request<Result<Region[]>>({
|
||||
url: '/china/region/findAllProvinceAndCityAndArea',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取
|
||||
*/
|
||||
|
||||
/**
|
||||
* 身份证OCR
|
||||
*/
|
||||
export function idCardOcr(uri, type: 'ID_CARD_FRONT' | 'ID_CARD_BACK') {
|
||||
return http.request<Result<IdCardOCRResult>>({
|
||||
url: '/ocr/idCard',
|
||||
method: 'post',
|
||||
params: { uri, type },
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 营业执照识别
|
||||
*/
|
||||
export function licenseOcr(uri) {
|
||||
return http.request<Result<BusinessLicenseOCRResult>>({
|
||||
url: '/ocr/businessLicense',
|
||||
method: 'post',
|
||||
params: { uri },
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 银行卡识别
|
||||
*/
|
||||
export function bankCardOcr(uri) {
|
||||
return http.request<Result<BankCardOCRResult>>({
|
||||
url: '/ocr/bankCard',
|
||||
method: 'post',
|
||||
params: { uri },
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 站点显示内容配置
|
||||
* @author xxm
|
||||
@@ -50,4 +97,154 @@ export interface PlatformWebsiteConfig {
|
||||
/** 版权信息链接 */
|
||||
copyrightLink?: string
|
||||
}
|
||||
/**
|
||||
* 区域
|
||||
*/
|
||||
export interface Region {
|
||||
code: string
|
||||
name: string
|
||||
/** 省市区街道 */
|
||||
level: 1 | 2 | 3 | 4
|
||||
isLeaf?: boolean
|
||||
children: Region[]
|
||||
}
|
||||
|
||||
/**
|
||||
* 商户主体信息参数
|
||||
*/
|
||||
export interface MchMainBody {
|
||||
// 基础信息
|
||||
base: MchBaseProfile
|
||||
// 法人信息
|
||||
legal: MchLegalProfile
|
||||
// 营业执照信息
|
||||
license: MchLicenseProfile
|
||||
}
|
||||
|
||||
/**
|
||||
* 商户基础信息
|
||||
*/
|
||||
export interface MchBaseProfile extends MchEntity {
|
||||
// 商户类型
|
||||
merchantType?: string
|
||||
// 商户名称
|
||||
merchantName?: string
|
||||
// 商户简称
|
||||
merchantShortName?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 商户法人信息
|
||||
*/
|
||||
export interface MchLegalProfile extends MchEntity {
|
||||
// 法人姓名
|
||||
legalName?: string
|
||||
// 法人证件号
|
||||
certNo?: string
|
||||
// 联系手机号
|
||||
contactPhone?: string
|
||||
// 长期有效
|
||||
periodLong?: boolean
|
||||
// 法人证件开始日期
|
||||
startDate?: string
|
||||
// 法人证件结束日期
|
||||
endDate?: string
|
||||
// 身份证地址
|
||||
address?: string
|
||||
// 法人身份证正面照片
|
||||
frontPic?: string
|
||||
// 法人身份证反面照片
|
||||
backPic?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 商户营业执照信息
|
||||
*/
|
||||
export interface MchLicenseProfile extends MchEntity {
|
||||
// 营业执照号
|
||||
licenseNo?: string
|
||||
// 营业执照名称
|
||||
licenseName?: string
|
||||
// 执照地址-省市区编码
|
||||
regionCode?: string[]
|
||||
// 营业执照详细地址
|
||||
address?: string
|
||||
// 营业执照长期有效
|
||||
periodLong?: boolean
|
||||
// 营业执照开始日期
|
||||
startDate?: string
|
||||
// 营业执照结束日期
|
||||
endDate?: string
|
||||
// 营业执照照片
|
||||
licensePic?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 身份证识别结果
|
||||
*/
|
||||
export interface IdCardOCRResult {
|
||||
/** 身份证号 */
|
||||
idNumber?: string
|
||||
/** 姓名 */
|
||||
name?: string
|
||||
/** 性别 */
|
||||
sex?: string
|
||||
/** 生日 */
|
||||
birthDate?: string
|
||||
/** 地址 */
|
||||
address?: string
|
||||
/** 民族 */
|
||||
nation?: string
|
||||
/** 签发机关 */
|
||||
issue?: string
|
||||
/** 有效期限 */
|
||||
expire?: string
|
||||
/** 是否长期有效 */
|
||||
periodLong?: boolean
|
||||
/** 开始时间 */
|
||||
startDate?: string
|
||||
/** 结束时间 */
|
||||
endDate?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 营业执照识别结果
|
||||
*/
|
||||
export interface BusinessLicenseOCRResult {
|
||||
/** 公司名称 */
|
||||
name?: string
|
||||
/** 公司编号 */
|
||||
number?: string
|
||||
/** 注册地址 */
|
||||
address?: string
|
||||
/** 法人 */
|
||||
legalPerson?: string
|
||||
/** 是否长期有效 */
|
||||
periodLong?: boolean
|
||||
/** 营业期开始时间 */
|
||||
startDate?: string
|
||||
/** 营业期结束时间 */
|
||||
endDate?: string
|
||||
/** 公司类型 */
|
||||
companyType?: string
|
||||
/** 经营范围 */
|
||||
businessScope?: string
|
||||
/** 注册时间 */
|
||||
registeredDate?: string
|
||||
/** 证件签发时间 */
|
||||
issueDate?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 银行卡识别结果
|
||||
*/
|
||||
export interface BankCardOCRResult {
|
||||
/** 银行名称 */
|
||||
bankName?: string
|
||||
/** 银行卡号 */
|
||||
cardNumber?: string
|
||||
/** 银行卡类型 */
|
||||
cardType?: string
|
||||
/** 有效期 */
|
||||
validToDate?: string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user