From 906804ea4032873f4d5bf9190efc6a666b54e511 Mon Sep 17 00:00:00 2001 From: bootx Date: Tue, 11 Nov 2025 16:30:04 +0800 Subject: [PATCH] =?UTF-8?q?ref=20=E5=88=A0=E5=87=8F=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/System.api.ts | 198 --- src/router/daxpay.ts | 133 -- src/router/index.ts | 5 +- src/views/daxpay/h5/code/CashierCode.api.ts | 44 +- .../h5/code/alipay/AlipayCashierCode.vue | 139 +- .../h5/code/wechat/WechatCashierCode.vue | 276 ++-- .../daxpay/h5/onboarded/common/Base.d.ts | 180 --- .../h5/onboarded/common/OnbMchApply.api.ts | 61 - .../h5/onboarded/common/OnbMchApplyUtil.ts | 56 - .../daxpay/h5/onboarded/hkrt/HkrtApply.api.ts | 242 --- .../daxpay/h5/onboarded/hkrt/HkrtApply.vue | 1216 -------------- .../h5/onboarded/leshua/LeshuaApply.api.ts | 117 -- .../h5/onboarded/leshua/LeshuaApply.vue | 1032 ------------ .../daxpay/h5/onboarded/sand/SandApply.api.ts | 153 -- .../daxpay/h5/onboarded/sand/SandApply.vue | 875 ---------- .../h5/onboarded/vbill/VbillApply.api.ts | 262 --- .../daxpay/h5/onboarded/vbill/VbillApply.vue | 1418 ----------------- .../agent/merchant/profile/MchMainBody.vue | 805 ---------- .../agent/merchant/profile/MchSettleInfo.vue | 373 ----- .../agent/merchant/profile/MchShopInfo.vue | 276 ---- .../merchant/profile/MerchantProfile.api.ts | 292 ---- .../agent/wallet/cashouts/Cashouts.api.ts | 174 -- .../agent/wallet/cashouts/CashoutsApply.vue | 429 ----- .../agent/wallet/cashouts/CashoutsDetail.vue | 354 ---- .../agent/wallet/cashouts/CashoutsEdit.vue | 430 ----- .../miniapp/merchant/profile/MchMainBody.vue | 799 ---------- .../merchant/profile/MchSettleInfo.vue | 369 ----- .../miniapp/merchant/profile/MchShopInfo.vue | 271 ---- .../merchant/profile/MerchantProfile.api.ts | 243 --- 29 files changed, 298 insertions(+), 10924 deletions(-) delete mode 100644 src/views/daxpay/h5/onboarded/common/Base.d.ts delete mode 100644 src/views/daxpay/h5/onboarded/common/OnbMchApply.api.ts delete mode 100644 src/views/daxpay/h5/onboarded/common/OnbMchApplyUtil.ts delete mode 100644 src/views/daxpay/h5/onboarded/hkrt/HkrtApply.api.ts delete mode 100644 src/views/daxpay/h5/onboarded/hkrt/HkrtApply.vue delete mode 100644 src/views/daxpay/h5/onboarded/leshua/LeshuaApply.api.ts delete mode 100644 src/views/daxpay/h5/onboarded/leshua/LeshuaApply.vue delete mode 100644 src/views/daxpay/h5/onboarded/sand/SandApply.api.ts delete mode 100644 src/views/daxpay/h5/onboarded/sand/SandApply.vue delete mode 100644 src/views/daxpay/h5/onboarded/vbill/VbillApply.api.ts delete mode 100644 src/views/daxpay/h5/onboarded/vbill/VbillApply.vue delete mode 100644 src/views/daxpay/miniapp/agent/merchant/profile/MchMainBody.vue delete mode 100644 src/views/daxpay/miniapp/agent/merchant/profile/MchSettleInfo.vue delete mode 100644 src/views/daxpay/miniapp/agent/merchant/profile/MchShopInfo.vue delete mode 100644 src/views/daxpay/miniapp/agent/merchant/profile/MerchantProfile.api.ts delete mode 100644 src/views/daxpay/miniapp/agent/wallet/cashouts/Cashouts.api.ts delete mode 100644 src/views/daxpay/miniapp/agent/wallet/cashouts/CashoutsApply.vue delete mode 100644 src/views/daxpay/miniapp/agent/wallet/cashouts/CashoutsDetail.vue delete mode 100644 src/views/daxpay/miniapp/agent/wallet/cashouts/CashoutsEdit.vue delete mode 100644 src/views/daxpay/miniapp/merchant/profile/MchMainBody.vue delete mode 100644 src/views/daxpay/miniapp/merchant/profile/MchSettleInfo.vue delete mode 100644 src/views/daxpay/miniapp/merchant/profile/MchShopInfo.vue delete mode 100644 src/views/daxpay/miniapp/merchant/profile/MerchantProfile.api.ts diff --git a/src/api/System.api.ts b/src/api/System.api.ts index 6cc6cba..73894b0 100644 --- a/src/api/System.api.ts +++ b/src/api/System.api.ts @@ -11,53 +11,6 @@ export function getWebsite() { }) } -/** - * 地区树 - */ -export function findAllProvinceAndCityAndArea() { - return http.request>({ - url: '/china/region/findAllProvinceAndCityAndArea', - method: 'get', - }) -} - -/** - * 获取 - */ - -/** - * 身份证OCR - */ -export function idCardOcr(uri, type: 'ID_CARD_FRONT' | 'ID_CARD_BACK') { - return http.request>({ - url: '/ocr/idCard', - method: 'post', - params: { uri, type }, - }) -} - -/** - * 营业执照识别 - */ -export function licenseOcr(uri) { - return http.request>({ - url: '/ocr/businessLicense', - method: 'post', - params: { uri }, - }) -} - -/** - * 银行卡识别 - */ -export function bankCardOcr(uri) { - return http.request>({ - url: '/ocr/bankCard', - method: 'post', - params: { uri }, - }) -} - /** * 站点显示内容配置 * @author xxm @@ -97,154 +50,3 @@ 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 -} diff --git a/src/router/daxpay.ts b/src/router/daxpay.ts index 7502d7d..287a14f 100644 --- a/src/router/daxpay.ts +++ b/src/router/daxpay.ts @@ -112,139 +112,6 @@ export const DaxPayH5Route: RouteRecordRaw = { ], } -/** - * 进件相关 - */ -export const DaxPayOnboardedRoute: RouteRecordRaw = { - path: '/onboarded', - name: 'onboarded', - children: [ - { - path: '/onboarded/leshua_pay', - name: 'leshua', - component: () => import('@/views/daxpay/h5/onboarded/leshua/LeshuaApply.vue'), - meta: { - title: '乐刷进件申请', - }, - }, - { - path: '/onboarded/hkrt_pay', - name: 'hkrt', - component: () => import('@/views/daxpay/h5/onboarded/hkrt/HkrtApply.vue'), - meta: { - title: '海科进件申请', - }, - }, - { - path: '/onboarded/vbill_pay', - name: 'vbill', - component: () => import('@/views/daxpay/h5/onboarded/vbill/VbillApply.vue'), - meta: { - title: '随行付进件申请', - }, - }, - { - path: '/onboarded/sand_pay', - name: 'sand', - component: () => import('@/views/daxpay/h5/onboarded/sand/SandApply.vue'), - meta: { - title: '杉德进件申请', - }, - }, - ], -} - -/** - * 商户端小程序内嵌页面 - */ -export const DaxPayMchMiniRoute: RouteRecordRaw = { - path: '/mini/mch', - name: 'merchantMini', - children: [ - { - path: '/mini/mch/profile/main', - name: 'MchMainBody', - component: () => import('@/views/daxpay/miniapp/merchant/profile/MchMainBody.vue'), - meta: { - title: '主体信息', - }, - }, - { - path: '/mini/mch/profile/shop', - name: 'MchShopInfo', - component: () => import('@/views/daxpay/miniapp/merchant/profile/MchShopInfo.vue'), - meta: { - title: '经营信息', - }, - }, - { - path: '/mini/mch/profile/settle', - name: 'MchSettleInfo', - component: () => import('@/views/daxpay/miniapp/merchant/profile/MchSettleInfo.vue'), - meta: { - title: '结算信息', - }, - }, - ], -} -/** - * 代理端小程序内嵌页面 - */ -export const DaxPayAgentMiniRoute: RouteRecordRaw = { - path: '/mini/agent', - name: 'agentMini', - children: [ - { - path: '/mini/agent/mch/profile/main', - name: 'AgentMchMainBody', - component: () => import('@/views/daxpay/miniapp/agent/merchant/profile/MchMainBody.vue'), - meta: { - title: '主体信息', - }, - }, - { - path: '/mini/agent/mch/profile/shop', - name: 'AgentMchShopInfo', - component: () => import('@/views/daxpay/miniapp/agent/merchant/profile/MchShopInfo.vue'), - meta: { - title: '经营信息', - }, - }, - { - path: '/mini/agent/mch/profile/settle', - name: 'AgentMchSettleInfo', - component: () => import('@/views/daxpay/miniapp/agent/merchant/profile/MchSettleInfo.vue'), - meta: { - title: '结算信息', - }, - }, - { - path: '/mini/agent/wallet/cashouts', - name: 'AgentCashoutsApply', - component: () => import('@/views/daxpay/miniapp/agent/wallet/cashouts/CashoutsApply.vue'), - meta: { - title: '提现申请', - }, - }, - { - path: '/mini/agent/wallet/cashouts/detail', - name: 'AgentCashoutsDetail', - component: () => import('@/views/daxpay/miniapp/agent/wallet/cashouts/CashoutsDetail.vue'), - meta: { - title: '提现详情', - }, - }, - { - path: '/mini/agent/wallet/cashouts/edit', - name: 'AgentCashoutsEdit', - component: () => import('@/views/daxpay/miniapp/agent/wallet/cashouts/CashoutsEdit.vue'), - meta: { - title: '编辑提现申请', - }, - }, - ], -} - /** * pc页面 */ diff --git a/src/router/index.ts b/src/router/index.ts index a47f58a..7d74b6f 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -5,16 +5,13 @@ import { ErrorPageRoute, routeModuleList } from '@/router/base' import { useRouteStoreWidthOut } from '@/store/modules/route' // 菜单 -import { DaxPayAgentMiniRoute, DaxPayH5Route, DaxPayMchMiniRoute, DaxPayOnboardedRoute, DaxPayPcRoute } from '@/router/daxpay' +import { DaxPayH5Route, DaxPayPcRoute } from '@/router/daxpay' import { getSystemTitle } from '@/settings/initWebsiteConfig' // 普通路由 export const constantRouter: RouteRecordRaw[] = [ DaxPayH5Route, DaxPayPcRoute, - DaxPayOnboardedRoute, - DaxPayMchMiniRoute, - DaxPayAgentMiniRoute, ErrorPageRoute, ] diff --git a/src/views/daxpay/h5/code/CashierCode.api.ts b/src/views/daxpay/h5/code/CashierCode.api.ts index c840185..d05d0b9 100644 --- a/src/views/daxpay/h5/code/CashierCode.api.ts +++ b/src/views/daxpay/h5/code/CashierCode.api.ts @@ -5,22 +5,22 @@ import type { AuthResult } from '@/views/daxpay/h5/auth/ChannelAuth.api' /** * 获取码牌配置 */ -export function getCashierCodeConfig(cashierCode, scene) { - return http.request>({ - url: '/unipay/gateway/cashier/getCodeConfig', +export function getCashierCodeConfig(code, scene) { + return http.request>({ + url: '/unipay/gateway/cashier/code/getCodeConfig', method: 'GET', - params: { cashierCode, scene }, + params: { code, scene }, }) } /** * 获取码牌收银台所需授权链接, 用于获取OpenId一类的信息 */ -export function generateAuthUrl(cashierCode, cashierScene) { +export function generateAuthUrl(code, scene) { return http.request>({ url: '/unipay/gateway/cashier/code/generateAuthUrl', method: 'POST', - data: { cashierCode, cashierScene }, + data: { code, scene }, }) } @@ -38,7 +38,7 @@ export function auth(param: CashierCodeAuthParam) { /** * 发起支付 */ -export function cashierPay(param: CashierPayParam) { +export function cashierPay(param: GatewayCashierCodePayParam) { return http.request>({ url: '/unipay/gateway/cashier/code/pay', method: 'POST', @@ -49,11 +49,11 @@ export function cashierPay(param: CashierPayParam) { /** * 码牌收银支付参数 */ -export interface CashierPayParam { +export interface GatewayCashierCodePayParam { // 收银码牌编码 - cashierCode?: string + code?: string // 收银台类型 - cashierScene?: string + scene?: string // 支付金额 amount?: number // 唯一标识 @@ -95,14 +95,22 @@ export interface WxJsapiSignResult { } /** - * 收银台配置信息 + * 码牌配置信息 */ -export interface GatewayCashierConfig { - // 商家名称 +export interface GatewayCashierCodeConfig { + // 码牌名称 name?: string + // 是否启用 + enable?: boolean + // 金额类型 + amountType?: string + // 金额 + amount?: string + // 支付通道 + channel?: string // 支付调起方式 callType?: string - // 判断是否需要 + // 判断是否需要获取openId needOpenId?: boolean // 备注 remark?: string @@ -112,10 +120,10 @@ export interface GatewayCashierConfig { * 码牌用户标识认证类 */ export interface CashierCodeAuthParam { - // 码牌编码 - cashierCode?: string + // 收银码牌编码 + code?: string // 支付场景 - cashierScene?: string + scene?: string // 授权码 - authCode: string + authCode?: string } diff --git a/src/views/daxpay/h5/code/alipay/AlipayCashierCode.vue b/src/views/daxpay/h5/code/alipay/AlipayCashierCode.vue index 4773676..fa4aab4 100644 --- a/src/views/daxpay/h5/code/alipay/AlipayCashierCode.vue +++ b/src/views/daxpay/h5/code/alipay/AlipayCashierCode.vue @@ -1,5 +1,5 @@ @@ -71,9 +82,9 @@ import { onMounted, ref } from 'vue' import { useRoute, useRouter } from 'vue-router' import { showNotify } from 'vant' -import type { CashierPayParam, GatewayCashierConfig } from '../CashierCode.api' +import type { GatewayCashierCodeConfig, GatewayCashierCodePayParam } from '../CashierCode.api' import { cashierPay, getCashierCodeConfig } from '../CashierCode.api' -import { AggregateEnum, CashierCodeTypeEnum } from '@/enums/daxpay/DaxPayEnum' +import { AggregateEnum, CashierSceneEnum } from '@/enums/daxpay/DaxPayEnum' import { useKeyboard } from '@/hooks/daxpay/useKeyboard' const route = useRoute() @@ -82,7 +93,7 @@ const { code } = route.params const showRemark = ref(false) // 是否展示备注 const loading = ref(false) // 加载状态 -const cashierInfo = ref() +const cashierInfo = ref({}) const amount = ref('0') // 金额 const description = ref() @@ -98,14 +109,25 @@ onMounted(() => { function initData() { // 获取信息 loading.value = true - getCashierCodeConfig(code, CashierCodeTypeEnum.ALIPAY) + getCashierCodeConfig(code, CashierSceneEnum.ALIPAY) .then((res) => { if (res.code) { router.replace({ name: 'payFail', query: { msg: res.msg } }) return } - loading.value = false cashierInfo.value = res.data as any + // 是否启用 + if (!cashierInfo.value?.enable) { + router.replace({ name: 'payFail', query: { msg: '收银码牌未启用' } }) + } + // 判断类型 + if (cashierInfo.value?.amountType === 'fixed') { + amount.value = res.data.amount as string + } + else { + amount.value = '0' + } + loading.value = false }) .catch((res) => { router.replace({ name: 'payFail', query: { msg: res.message } }) @@ -124,10 +146,10 @@ function pay() { loading.value = true const from = { amount: amountValue, - cashierCode: code, + code, scene: AggregateEnum.ALI, description: description.value, - } as CashierPayParam + } as GatewayCashierCodePayParam cashierPay(from).then((res) => { if (res.code) { router.replace({ name: 'payFail', query: { msg: res.msg } }) @@ -147,58 +169,79 @@ function pay() { background: @color; } -.container { - background: linear-gradient(to bottom, #1e90ff, #1e90ff, #ffffff); // 从蓝色渐变到白色 - width: 100%; - padding: 40px; - height: 40%; - border-radius: 10px; - text-align: center; - color: white; +.mpPay { + position: relative; + .container { + background: linear-gradient(to bottom, #1e90ff, #1e90ff, #ffffff); // 从蓝色渐变到白色 + width: 100%; + padding: 40px; + height: 40%; + border-radius: 10px; + text-align: center; + color: white; - .payName { - margin: 5px 0; - font-size: 16px; + .payName { + margin: 5px 0; + font-size: 16px; - .paytext { - font-size: 20px; - margin-left: 5px; - font-weight: 600; + .paytext { + font-size: 20px; + margin-left: 5px; + font-weight: 600; + } + } + + .amount-display { + background-color: white; + color: @color; + border-radius: 20px; + padding: 20px; + margin: 20px 0; + display: flex; + gap: 1.875rem; + align-items: center; + + p { + font-size: 32px; + } + + .title { + font-size: 20px; + } } } - .amount-display { - background-color: white; - color: @color; - border-radius: 20px; - padding: 20px; - margin: 20px 0; + .notes { + width: 100%; + height: 10%; display: flex; - gap: 1.875rem; + justify-content: center; align-items: center; - p { - font-size: 32px; + .remark { + color: @color; + cursor: pointer; + .remarkDecript { + max-width: 75vw; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } } - - .title { - font-size: 20px; + } + .redirectPayBtn { + width: 100%; + margin: 0 auto; + position: absolute; + bottom: 3.125rem; + display: flex; + justify-content: center; + .van-button { + width: 90%; } } } -.notes { - width: 100%; - height: 10%; - display: flex; - justify-content: center; - align-items: center; - - .remark { - color: @color; - cursor: pointer; - } -} /* loading */ .loadingMask { position: fixed; diff --git a/src/views/daxpay/h5/code/wechat/WechatCashierCode.vue b/src/views/daxpay/h5/code/wechat/WechatCashierCode.vue index 3736aa0..103dc2e 100644 --- a/src/views/daxpay/h5/code/wechat/WechatCashierCode.vue +++ b/src/views/daxpay/h5/code/wechat/WechatCashierCode.vue @@ -1,5 +1,5 @@ @@ -72,11 +83,11 @@ import { onMounted, ref } from 'vue' import { useRoute } from 'vue-router' import { showNotify } from 'vant' import type { - CashierPayParam, - GatewayCashierConfig, + CashierCodeAuthParam, + GatewayCashierCodeConfig, + GatewayCashierCodePayParam, WxJsapiSignResult, } from '../CashierCode.api' - import { auth, cashierPay, @@ -84,18 +95,18 @@ import { getCashierCodeConfig, } from '../CashierCode.api' -import { AggregateEnum, CashierCodeTypeEnum, GatewayCallTypeEnum } from '@/enums/daxpay/DaxPayEnum' +import { AggregateEnum, CashierSceneEnum, GatewayCallTypeEnum } from '@/enums/daxpay/DaxPayEnum' import router from '@/router' import { useKeyboard } from '@/hooks/daxpay/useKeyboard' +import { getChannelAuthResult } from '@/utils/channelAuthUtil' const route = useRoute() -const { code: cashierCode } = route.params -const { code: authCode } = route.query +const { channelAuth: isChannel, channel, code: cashierCode } = route.params const show = ref(false) const showRemark = ref(false) const loading = ref(false) -const cashierInfo = ref({}) +const cashierInfo = ref({}) const amount = ref('0') const description = ref() const openId = ref() @@ -106,13 +117,19 @@ onMounted(() => { init() }) +// 认证参数 +const authParam = reactive({ + code: cashierCode as string, + scene: CashierSceneEnum.WECHAT_PAY, +}) + /** * 初始化 */ async function init() { loading.value = true getCashierCodeConfig(cashierCode, AggregateEnum.WECHAT) - .then((res) => { + .then(async (res) => { if (res.code) { router.replace({ name: 'payFail', query: { msg: res.msg } }) return @@ -120,48 +137,95 @@ async function init() { loading.value = false const data = res.data cashierInfo.value = data as any + // 判断码牌类型 + if (cashierInfo.value?.amountType === 'fixed') { + amount.value = data.amount as string + } + else { + amount.value = '0' + } // 判断是否需要获取OpenId if (data.needOpenId) { - // 如果不是重定向跳转过来, 跳转到到重定向地址 - if (!authCode) { - // 重定向跳转到微信授权地址 - generateAuthUrl(cashierCode, CashierCodeTypeEnum.WECHAT_PAY).then((res) => { - if (res.code) { - router.replace({ name: 'payFail', query: { msg: res.msg } }) + // 不等于9说明是微信重定向过来的 + if (isChannel !== '9') { + if (isChannel === '1') { + // 通道认证 + await channelAuth() + return + } + else { + // 微信官方认证 + await commonAuth() + return + } + } + + // 生成认证链接 + generateAuthUrl(cashierCode, CashierSceneEnum.WECHAT_PAY) + .then((result) => { + if (res.code !== 0) { + // 如果异常,跳转异常页面 + router.replace({ + name: 'payFail', + query: { msg: result.msg }, + }) return } - const url = res.data - location.replace(url) - }).catch((res) => { - router.replace({ name: 'payFail', query: { msg: res.message } }) + location.replace(result.data) }) - } - else { - // 认证获取OpenId - auth({ cashierCode: cashierCode as string, scene: CashierCodeTypeEnum.WECHAT_PAY, authCode: authCode as string }) - .then((res) => { - if (res.code) { - router.replace({ name: 'payFail', query: { msg: res.msg } }) - return - } - openId.value = res.data.openId as string - show.value = true - }).catch((res) => { - router.replace({ name: 'payFail', query: { msg: res.message }, replace: true }) + .catch((result) => { + router.replace({ + name: 'payFail', + query: { msg: result.message }, }) - } + }) } else { show.value = true } }) - .catch((error) => { - router.replace({ name: 'payFail', query: { msg: error } }) +} + +/** + * 微信官方认证 + */ +async function commonAuth() { + // 认证获取OpenId + const { code: authCode } = route.query + authParam.authCode = authCode as string + await wxAuth() +} + +/** + * 通道微信认证 + */ +async function channelAuth() { + // 获取回调的参数结果 + const { openId } = getChannelAuthResult(channel as string, route.query) + authParam.authCode = openId + await wxAuth() +} + +/** + * 认证操作 + */ +async function wxAuth() { + await auth(authParam) + .then(({ data, code, msg }) => { + if (code) { + router.replace({ name: 'payFail', query: { msg }, replace: true }) + return + } + openId.value = data.openId as string + show.value = true + }) + .catch((res) => { + router.replace({ name: 'payFail', query: { msg: res.message }, replace: true }) }) } /** - * 微信jsapi方式支付 + * 调起支付, 需要根据调用类型发起 */ function pay() { const amountValue = Number(amount.value) @@ -175,31 +239,31 @@ function pay() { amount: amountValue, cashierCode, openId: openId.value, - scene: CashierCodeTypeEnum.WECHAT_PAY, + cashierScene: CashierSceneEnum.WECHAT_PAY, description: description.value, - } as CashierPayParam - cashierPay(from) - .then((res) => { - if (res.code) { - router.replace({ name: 'payFail', query: { msg: res.msg } }) - return - } - loading.value = false - // 根据类型拉起对应的支付。 支持跳转和jsapi - if (cashierInfo.value?.callType === GatewayCallTypeEnum.jsapi) { - const json = JSON.parse(res.data.payBody) - jsapiPay(json) - } - if (cashierInfo.value?.callType === GatewayCallTypeEnum.link) { - location.replace(res.data.payBody as any) - } - }) + } as GatewayCashierCodePayParam + cashierPay(from).then((res) => { + if (res.code) { + router.replace({ name: 'payFail', query: { msg: res.msg } }) + return + } + loading.value = false + // 根据类型拉起对应的支付。 支持跳转和jsapi + if (cashierInfo.value?.callType === GatewayCallTypeEnum.jsapi) { + const json = JSON.parse(res.data.payBody) + jsapiPay(json) + } + if (cashierInfo.value?.callType === GatewayCallTypeEnum.link) { + location.replace(res.data.payBody as any) + } + }) } /** * 拉起Jsapi支付窗口 */ function jsapiPay(data: WxJsapiSignResult) { + console.log(data) const form = { appId: data.appId, // 公众号ID,由商户传入 timeStamp: data.timeStamp, // 时间戳,自1970年以来的秒数 @@ -213,7 +277,7 @@ function jsapiPay(data: WxJsapiSignResult) { if (res.err_msg === 'get_brand_wcpay_request:ok') { // 跳转到成功页面 router.replace({ - path: '/paySuccess', + name: 'PaySuccess', query: { title: '支付成功' }, }) } @@ -227,56 +291,76 @@ function jsapiPay(data: WxJsapiSignResult) { :deep(.van-key--blue) { background: @color; } -.container { - background: linear-gradient(to bottom, #07c160, #07c160, #ffffff); // 从蓝色渐变到白色 - width: 100%; - padding: 40px; - height: 40%; - border-radius: 10px; - text-align: center; - color: white; +.wchatMpPay { + position: relative; + .container { + background: linear-gradient(to bottom, #07c160, #07c160, #ffffff); // 从蓝色渐变到白色 + width: 100%; + padding: 40px; + height: 40%; + border-radius: 10px; + text-align: center; + color: white; - .payName { - margin: 5px 0; - font-size: 16px; + .payName { + margin: 5px 0; + font-size: 16px; - .paytext { - font-size: 20px; - margin-left: 5px; - font-weight: 600; + .paytext { + font-size: 20px; + margin-left: 5px; + font-weight: 600; + } + } + + .amount-display { + background-color: white; + color: @color; + border-radius: 20px; + padding: 20px; + margin: 20px 0; + display: flex; + gap: 1.875rem; + align-items: center; + + p { + font-size: 32px; + } + + .title { + font-size: 20px; + } } } - .amount-display { - background-color: white; - color: @color; - border-radius: 20px; - padding: 20px; - margin: 20px 0; + .notes { + width: 100%; + height: 10%; display: flex; - gap: 1.875rem; + justify-content: center; align-items: center; - p { - font-size: 32px; - } - - .title { - font-size: 20px; + .remark { + color: @color; + cursor: pointer; + .remarkDecript { + max-width: 75vw; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } } } -} - -.notes { - width: 100%; - height: 10%; - display: flex; - justify-content: center; - align-items: center; - - .remark { - color: @color; - cursor: pointer; + .redirectPayBtn { + width: 100%; + margin: 0 auto; + position: absolute; + bottom: 3.125rem; + display: flex; + justify-content: center; + .van-button { + width: 90%; + } } } diff --git a/src/views/daxpay/h5/onboarded/common/Base.d.ts b/src/views/daxpay/h5/onboarded/common/Base.d.ts deleted file mode 100644 index a2f3011..0000000 --- a/src/views/daxpay/h5/onboarded/common/Base.d.ts +++ /dev/null @@ -1,180 +0,0 @@ -import type { MchEntity } from '#/axios' - -/** - * 进件商户信息 - * @author xxm - * @since 2025/6/9 - */ -export interface OnbMerchantProfile extends MchEntity { - /** 进件申请Id */ - applyId?: number - /** 商户类型 */ - merchantType?: string - /** 商户全称 */ - merchantName?: string - /** 商户简称 */ - merchantShortName?: string -} -/** - * 进件申请法人信息 - * @author xxm - * @since 2025/6/9 - */ -export interface OnbLegalProfile extends MchEntity { - /** 进件申请Id */ - applyId?: number - /** 法人姓名 */ - legalName?: string - /** 身份证号 */ - certNo?: string - /** 身份证有效期类型 */ - periodLong?: boolean - /** 身份证开始时间 */ - startDate?: string - /** 身份证结束时间 */ - endDate?: string - /** 身份证正面照片 */ - frontPic?: string - /** 身份证正面照片路径 */ - frontPicUrl?: string - /** 身份证反面照片 */ - backPic?: string - /** 身份证反面照片路径 */ - backPicUrl?: string - /** 联系人手机号 */ - contactPhone?: string - /** 证件居住地址 */ - address?: string -} -/** - * 进件营业执照信息 - * @author xxm - * @since 2025/6/9 - */ -export interface OnbLicenseProfile extends MchEntity { - /** 进件申请Id */ - applyId?: number - /** 营业执照号 */ - licenseNo?: string - /** 营业执照名称 */ - licenseName?: string - /** 执照地址-省市区编码 */ - regionCode?: string[] - /** 营业执照详细地址 */ - address?: string - /** 营业执照长期有效 */ - periodLong?: boolean - /** 营业执照开始日期 */ - startDate?: string - /** 营业执照结束日期 */ - endDate?: string - /** 营业执照照片 */ - licensePic?: string - /** 营业执照照片路径 */ - licensePicUrl?: string -} -/** - * 门店信息 - * @author xxm - * @since 2025/6/9 - */ -export interface OnbShopProfile extends MchEntity { - /** 进件申请Id */ - applyId?: number - /** 门店类型 */ - type?: string - /** 结算类型 */ - settleType?: string - /** 经营场所名称 */ - name?: string - /** 门店地址-省市区编码 */ - regionCode?: string[] - /** 经营场所详细地址 */ - address?: string - /** 门头照 */ - doorPic?: string - /** 门头照路径 */ - doorPicUrl?: string - /** 室内照 */ - insidePic?: string - /** 室内照路径 */ - insidePicUrl?: string - /** 收银台照片 */ - cashierPic?: string - /** 收银台照片路径 */ - cashierPicUrl?: string -} - -/** - * 进件结算卡信息 - * @author xxm - * @since 2025/6/9 - */ -export interface OnbBankAccountProfile extends MchEntity { - /** 进件申请Id */ - applyId?: number - /** 账户类型 */ - accountType?: string - /** 银行卡账户名 */ - accountName?: string - /** 银行卡号 */ - cardNo?: string - /** 银行卡开户行名称 */ - bankName?: string - /** 银行卡开户行联行号 */ - branchNo?: string - /** 银行预留手机号 */ - bankPhone?: string - /** 银行卡正面照片 */ - cardFrontPic?: string - /** 银行卡正面照片路径 */ - cardFrontPicUrl?: string - /** 银行卡反面照片 */ - cardBackPic?: string - /** 银行卡反面照片路径 */ - cardBackPicUrl?: string -} - -/** - * 持卡人信息 - * @author xxm - * @since 2025/6/9 - */ -export interface OnbCardHolderProfile extends MchEntity { - /** 进件申请Id */ - applyId?: number - /** 持卡人姓名 */ - holderName?: string - /** 身份证号 */ - certNo?: string - /** 身份证有效期类型 */ - periodLong?: boolean - /** 身份证开始时间 */ - startDate?: string - /** 身份证结束时间 */ - endDate?: string - /** 身份证正面照片 */ - frontPic?: string - /** 身份证正面照片路径 */ - frontPicUrl?: string - /** 身份证反面照片 */ - backPic?: string - /** 身份证反面照片路径 */ - backPicUrl?: string - /** 非法人结算授权函图片 */ - letterOfAuthPic?: string - /** 非法人结算授权函图片路径 */ - letterOfAuthPicUrl?: string -} - -/** - * 费率配置项 - */ -export interface TradeRateConfigItem { - /** 服务商成本费率 */ - isvRate?: number - /** 代理商默认费率 */ - agentRate?: number - /** 商户默认费率 */ - mchRate?: number -} diff --git a/src/views/daxpay/h5/onboarded/common/OnbMchApply.api.ts b/src/views/daxpay/h5/onboarded/common/OnbMchApply.api.ts deleted file mode 100644 index 2d7d3e3..0000000 --- a/src/views/daxpay/h5/onboarded/common/OnbMchApply.api.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { http } from '@/utils/http/axios' -import type { MchEntity, Result } from '#/axios' -import {MchMainBody} from "@/api/System.api"; - -/** - * 提交进件申请(独立H5模式) - */ -export function submitH5(id, sign) { - return http.request({ - url: '/onb/mch/apply/h5/submit', - method: 'post', - params: { id, sign }, - }) -} -/** - * 提交进件申请(嵌入模式) - */ -export function submit(id) { - return http.request({ - url: '/onb/mch/apply/submit', - method: 'post', - params: { id }, - }) -} -/** - * 获取商户主体信息(嵌入) - */ -export function getMainBody(mchNo: string) { - return http.request>({ - url: '/merchant/profile/getMainBody', - params: { mchNo }, - }) -} - -/** - * 获取商户店铺信息(嵌入) - */ -export function getShopInfo(mchNo: string) { - return http.request>({ - url: '/merchant/profile/shop/findByMchNo', - params: { mchNo }, - }) -} - -/** - * 商户店铺信息 - */ -export interface MchShopProfile extends MchEntity { - // 经营场所名称 - name?: string - // 省市区编码 - regionCode?: string[] - // 经营场所详细地址 - address?: string - // 门头照 - doorPic?: string - // 室内照 - insidePic?: string - // 收银台照片 - cashierPic?: string -} diff --git a/src/views/daxpay/h5/onboarded/common/OnbMchApplyUtil.ts b/src/views/daxpay/h5/onboarded/common/OnbMchApplyUtil.ts deleted file mode 100644 index e1c9b37..0000000 --- a/src/views/daxpay/h5/onboarded/common/OnbMchApplyUtil.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { cloneDeep } from 'lodash-es' -import { getMainBody, getShopInfo } from '@/views/daxpay/h5/onboarded/common/OnbMchApply.api' -/** - * 初始化商户信息 - */ -export async function initMerchantProfile(form, mchNo) { - // 并行调用三个接口获取数据 - const [mainBodyRes, shopInfoRes] = await Promise.all([getMainBody(mchNo), getShopInfo(mchNo)]) - - // 映射主体信息到表单 - if (mainBodyRes.data) { - const mainBody = mainBodyRes.data - - // 映射基础信息 - if (mainBody.base) { - Object.assign(form.merchant, { - merchantType: mainBody.base.merchantType, - merchantName: mainBody.base.merchantName, - merchantShortName: mainBody.base.merchantShortName, - }) - } - - // 映射法人信息 - if (mainBody.legal) { - Object.assign(form.legal, cloneDeep(mainBody.legal), { - frontPicUrl: mainBody.legal.frontPic, - backPicUrl: mainBody.legal.backPic, - // 清空图片ID字段 - frontPic: '', - backPic: '', - }) - } - // 映射营业执照信息 - if (mainBody.license) { - Object.assign(form.license, cloneDeep(mainBody.license), { - licensePicUrl: mainBody.license.licensePic, - // 清空图片ID字段 - licensePic: '', - }) - } - } - - // 映射经营场所信息到表单 - if (shopInfoRes.data) { - const shopInfo = shopInfoRes.data - Object.assign(form.shop, cloneDeep(shopInfo), { - doorPicUrl: shopInfo.doorPic, - insidePicUrl: shopInfo.insidePic, - cashierPicUrl: shopInfo.cashierPic, - // 清空图片ID字段 - doorPic: '', - insidePic: '', - cashierPic: '', - }) - } -} diff --git a/src/views/daxpay/h5/onboarded/hkrt/HkrtApply.api.ts b/src/views/daxpay/h5/onboarded/hkrt/HkrtApply.api.ts deleted file mode 100644 index 84bd739..0000000 --- a/src/views/daxpay/h5/onboarded/hkrt/HkrtApply.api.ts +++ /dev/null @@ -1,242 +0,0 @@ -import { http } from '@/utils/http/axios' -import type { MchEntity, Result } from '#/axios' -import type { - OnbBankAccountProfile, - OnbCardHolderProfile, - OnbLegalProfile, - OnbLicenseProfile, - OnbMerchantProfile, - OnbShopProfile, - TradeRateConfigItem, -} from '@/views/daxpay/h5/onboarded/common/Base' - -/** - * 查询(独立H5模式) - */ -export function findH5ById(id, sign) { - return http.request>({ - method: 'get', - url: '/hkrt/onb/apply/h5/findById', - params: { id, sign }, - }) -} - -/** - * 保存信息(独立H5模式) - */ -export function saveH5(param: MerchantApply, sign) { - return http.request>({ - method: 'post', - url: '/hkrt/onb/apply/h5/save', - data: param, - params: { sign }, - }) -} - -/** - * 查询(嵌入模式) - */ -export function findById(id) { - return http.request>({ - method: 'get', - url: '/hkrt/onb/apply/findById', - params: { id }, - }) -} - -/** - * 保存信息(嵌入模式) - */ -export function save(param: MerchantApply) { - return http.request>({ - method: 'post', - url: '/hkrt/onb/apply/save', - data: param, - }) -} - -/** - * 海科经营类目树 - */ -export function mccTree() { - return http.request>({ - method: 'get', - url: '/hkrt/mcc/tree', - }) -} - -/** - * 海科商户申请参数 - */ -export interface MerchantApply { - /** 申请单ID */ - applyId?: string - /** 商户信息 */ - merchant: OnbMerchantProfile - /** 法人信息 */ - legal: OnbLegalProfile - /** 商户资质图片信息 */ - license: OnbLicenseProfile - /** 经营场所名称 */ - shop: OnbShopProfile - /** 结算卡信息 */ - bankAccount: OnbBankAccountProfile - /** 持卡人信息 */ - cardHolder: OnbCardHolderProfile - /** 其他申请信息 */ - other: OtherApply - /** 结算产品信息 */ - settle: SettleProfile - /** 费率 */ - rate: HkrtMchRateConfig -} - -/** - * 其他申请数据 - */ -export interface OtherApply extends MchEntity { - /** 联系人手机号 */ - contactPhone?: string - /** 经营类目代码 */ - mccCodes?: string[] - /** 开户银行省市 */ - bankRegionCode?: string[] - /** 开户银行网点名称 */ - bankName?: string - /** 法人手持结算授权合影 */ - legaHandAuthPic?: string - /** 法人手持结算授权合影 */ - legaHandAuthPicUrl?: string - /** 法人证件居住地址 */ - legalIdAddress?: string -} - -/** - * 海科经营类目 - */ -export interface MccConst { - /** 类目 */ - code: string - /** 类目名称 */ - name: string - /** 父类目 */ - parentCode: string - /** 子类目 */ - children?: MccConst[] -} - -/** - * 海科融通入驻结算信息 - */ -export interface SettleProfile { - // 申请ID - applyId?: string - // 结算周期 - settlementCycle?: string - // 提现费率 - withdrawalRate?: number - // 最小提现费用 - withdrawalFeeMin?: number - // 对公提现费率 - publicWithdrawalRate?: number - // 对公最小提现费用 - publicWithdrawalFeeMin?: number -} - -/** - * 海科商户费率配置 - */ -export interface HkrtMchRateConfig { - // 微信费率 - wechatRate?: number - // 支付宝费率 - alipayRate?: number - // 银行卡借记卡费率 - bankDebitRate?: number - // 银行卡贷记卡费率 - bankCreditRate?: number - // 银联二维码借记卡费率 - unionDebitRate?: number - // 银联二维码贷记卡费率 - unionCreditRate?: number - // 银联二维码1000以下费率 - unionMixRate?: number - // 银行卡借记卡封顶手续费 - bankDebitMax?: number - // 银联二维码借记卡封顶手续费 - unionDebitMax?: number -} - -/** - * 代理商权限配置 - */ -export interface AgentPermConfig { - /** 是否可用代理商API接口 */ - agentApi?: boolean - /** 是否可以查询商户订单信息(界面) */ - queryOrder?: boolean - /** 是否可以代商户退款(界面) */ - refund?: boolean - /** 是否可以创建商户订单(界面) */ - createOrder?: boolean - /** 是否可以创建进件商户 */ - createOnbMch?: boolean - /** 是否可以代商户进行交易(API) */ - tradeApi?: boolean - /** 是否可以设置商户结算周期 */ - settleCycle?: boolean - /** 是否可以操作商户应用 */ - setupMchApp?: boolean - /** 是否可以查看商户应用信息 */ - mchAppInfo?: boolean - /** 设置商户分账规则 */ - setupMchProfit?: boolean - /** 可用通道 */ - availableChannel?: string[] - /** 可用接口 */ - availableApi?: string[] -} - -/** - * 海科费率配置 - */ -export interface HkrtRateConfig { - // 微信费率 - wechatRate: TradeRateConfigItem - // 支付宝费率 - alipayRate: TradeRateConfigItem - // 银行卡借记卡费率 - bankDebitRate: TradeRateConfigItem - // 银行卡贷记卡费率 - bankCreditRate: TradeRateConfigItem - // 银联二维码借记卡费率 - unionDebitRate: TradeRateConfigItem - // 银联二维码贷记卡费率 - unionCreditRate: TradeRateConfigItem - // 银联二维码1000以下费率 - unionMixRate: TradeRateConfigItem - // 银行卡借记卡封顶手续费 - bankDebitMax: TradeRateConfigItem - // 银联二维码借记卡封顶手续费 - unionDebitMax: TradeRateConfigItem -} - -/** - * 查询代理商权限 - */ -export function getAgentPermConfig() { - return http.request>({ - method: 'get', - url: '/agent/perm/config/get', - }) -} - -/** - * 代理端获取代理费率 - */ -export function getConfig() { - return http.request>({ - method: 'get', - url: '/hkrt/rate/agent/getConfig', - }) -} diff --git a/src/views/daxpay/h5/onboarded/hkrt/HkrtApply.vue b/src/views/daxpay/h5/onboarded/hkrt/HkrtApply.vue deleted file mode 100644 index d51aa6d..0000000 --- a/src/views/daxpay/h5/onboarded/hkrt/HkrtApply.vue +++ /dev/null @@ -1,1216 +0,0 @@ - - - - - diff --git a/src/views/daxpay/h5/onboarded/leshua/LeshuaApply.api.ts b/src/views/daxpay/h5/onboarded/leshua/LeshuaApply.api.ts deleted file mode 100644 index 2c45302..0000000 --- a/src/views/daxpay/h5/onboarded/leshua/LeshuaApply.api.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { http } from '@/utils/http/axios' -import type {MchEntity, Result} from '#/axios' -import type { - OnbBankAccountProfile, - OnbCardHolderProfile, - OnbLegalProfile, - OnbLicenseProfile, - OnbMerchantProfile, - OnbShopProfile, -} from '@/views/daxpay/h5/onboarded/common/Base' - -/** - * 查询(独立H5模式) - */ -export function findH5ById(id, sign) { - return http.request>({ - method: 'get', - url: '/leshua/onb/apply/h5/findById', - params: { id, sign }, - }) -} - -/** - * 保存信息(独立H5模式) - */ -export function saveH5(param: MerchantApply, sign) { - return http.request>({ - method: 'post', - url: '/leshua/onb/apply/h5/save', - data: param, - params: { sign }, - }) -} - -/** - * 查询(嵌入模式) - */ -export function findById(id) { - return http.request>({ - method: 'get', - url: '/leshua/onb/apply/findById', - params: { id }, - }) -} - -/** - * 保存信息(嵌入模式) - */ -export function save(param: MerchantApply) { - return http.request>({ - method: 'post', - url: '/leshua/onb/apply/save', - data: param, - }) -} - -/** - * 乐刷经营类目树 - */ -export function mccTree() { - return http.request>({ - method: 'get', - url: '/leshua/mcc/tree', - }) -} - -/** - * 乐刷商户申请参数 - */ -export interface MerchantApply extends MchEntity { - /** 申请单ID */ - applyId?: string - /** 商户信息 */ - merchant: OnbMerchantProfile - /** 法人信息 */ - legal: OnbLegalProfile - /** 商户资质图片信息 */ - license: OnbLicenseProfile - /** 经营场所名称 */ - shop: OnbShopProfile - /** 结算卡信息 */ - bankAccount: OnbBankAccountProfile - /** 持卡人信息 */ - cardHolder: OnbCardHolderProfile - /** 其他申请信息 */ - other: OtherApply -} - -/** - * 其他申请数据 - */ -export interface OtherApply { - /** 经营类目代码 */ - mccCodes?: string[] - /** 开户银行省市 */ - bankRegionCode?: string[] - /** 开户银行网点名称 */ - bankName?: string - /** 总店商户号 */ - totalMchNo?: string - /** 线下渠道号 */ - reportConfigId?: number -} - -/** - * 乐刷经营类目 - */ -export interface MccConst { - /** 类目 */ - code: string - /** 类目名称 */ - name: string - /** 父类目 */ - parentCode: string - /** 子类目 */ - children?: MccConst[] -} diff --git a/src/views/daxpay/h5/onboarded/leshua/LeshuaApply.vue b/src/views/daxpay/h5/onboarded/leshua/LeshuaApply.vue deleted file mode 100644 index 1f5ef67..0000000 --- a/src/views/daxpay/h5/onboarded/leshua/LeshuaApply.vue +++ /dev/null @@ -1,1032 +0,0 @@ - - - - - diff --git a/src/views/daxpay/h5/onboarded/sand/SandApply.api.ts b/src/views/daxpay/h5/onboarded/sand/SandApply.api.ts deleted file mode 100644 index 542a3a5..0000000 --- a/src/views/daxpay/h5/onboarded/sand/SandApply.api.ts +++ /dev/null @@ -1,153 +0,0 @@ -import { http } from '@/utils/http/axios' -import type {MchEntity, Result} from '#/axios' -import type { - OnbLegalProfile, - OnbLicenseProfile, - OnbMerchantProfile, - OnbShopProfile, -} from '@/views/daxpay/h5/onboarded/common/Base' - -/** - * 查询(独立H5模式) - */ -export function findH5ById(id, sign) { - return http.request>({ - method: 'get', - url: '/sand/onb/apply/h5/findById', - params: { id, sign }, - }) -} - -/** - * 保存信息(独立H5模式) - */ -export function saveH5(param: MerchantApply, sign) { - return http.request>({ - method: 'post', - url: '/sand/onb/apply/h5/save', - data: param, - params: { sign }, - }) -} - -/** - * 查询(嵌入模式) - */ -export function findById(id) { - return http.request>({ - method: 'get', - url: '/sand/onb/apply/findById', - params: { id }, - }) -} - -/** - * 保存信息(嵌入模式) - */ -export function save(param: MerchantApply) { - return http.request>({ - method: 'post', - url: '/sand/onb/apply/save', - data: param, - }) -} - -/** - * 杉德经营类目树 - */ -export function mccTree() { - return http.request>({ - method: 'get', - url: '/sand/mcc/tree', - }) -} - -/** - * 杉德微信类目树 - */ -export function wxMccTree() { - return http.request>({ - method: 'get', - url: '/sand/mcc/wxTree', - }) -} - -/** - * 杉德商户经营类目树 - */ -export function mchMccTree() { - return http.request>({ - method: 'get', - url: '/sand/mcc/mchTree', - }) -} - -/** - * 杉德商户申请参数 - */ -export interface MerchantApply { - /** 申请单ID */ - applyId?: string - /** 商户信息 */ - merchant: OnbMerchantProfile - /** 法人信息 */ - legal: OnbLegalProfile - /** 商户资质图片信息 */ - license: OnbLicenseProfile - /** 经营场所名称 */ - shop: OnbShopProfile - /** 其他申请信息 */ - other: SandOtherApply -} - -/** - * 杉德其他申请数据 - */ -export interface SandOtherApply extends MchEntity { - /** 邮箱 */ - email?: string - /** 商户经营类目编码 */ - mchMccCodes?: string[] - /** 微信经营类目编码 */ - wxMccCodes?: string[] - /** MCC商户类别码 */ - mccCodes?: string[] - /** 手持身份证正面照图片 */ - handIdCardFrontPic?: string - /** 手持身份证正面照图片路径 */ - handIdCardFrontPicUrl?: string - /** 工商网截图 */ - busNetPic?: string - /** 工商网截图路径 */ - busNetPicUrl?: string - /** 小程序/公众号截图链接 */ - appScreenshotImg?: string - /** 小程序/公众号截图链接路径 */ - appScreenshotImgUrl?: string - /** 支付环境截图 */ - paymentsImg?: string - /** 支付环境截图路径 */ - paymentsImgUrl?: string - /** 支付产品编号 */ - productCode?: string - /** 小微经营类型 */ - microBizType?: string - /** 企业性质 */ - enterpriseNature?: string - /** 客服电话 */ - servicePhone?: string -} - -/** - * 杉德经营类目 - */ -export interface MccConst { - /** 类目 */ - code: string - /** 类目名称 */ - name: string - /** 父类目 */ - parentCode: string - /** 子类目 */ - children?: MccConst[] -} diff --git a/src/views/daxpay/h5/onboarded/sand/SandApply.vue b/src/views/daxpay/h5/onboarded/sand/SandApply.vue deleted file mode 100644 index 3052d43..0000000 --- a/src/views/daxpay/h5/onboarded/sand/SandApply.vue +++ /dev/null @@ -1,875 +0,0 @@ - - - - - diff --git a/src/views/daxpay/h5/onboarded/vbill/VbillApply.api.ts b/src/views/daxpay/h5/onboarded/vbill/VbillApply.api.ts deleted file mode 100644 index 52a6f6a..0000000 --- a/src/views/daxpay/h5/onboarded/vbill/VbillApply.api.ts +++ /dev/null @@ -1,262 +0,0 @@ -import { http } from '@/utils/http/axios' -import type { MchEntity, Result } from '#/axios' -import type { - OnbBankAccountProfile, - OnbCardHolderProfile, - OnbLegalProfile, - OnbLicenseProfile, - OnbMerchantProfile, - OnbShopProfile, - TradeRateConfigItem, -} from '@/views/daxpay/h5/onboarded/common/Base' - -/** - * 查询(独立H5模式) - */ -export function findH5ById(id, sign) { - return http.request>({ - method: 'get', - url: '/vbill/onb/apply/h5/findById', - params: { id, sign }, - }) -} - -/** - * 保存信息(独立H5模式) - */ -export function saveH5(param: MerchantApply, sign) { - return http.request>({ - method: 'post', - url: '/vbill/onb/apply/h5/save', - data: param, - params: { sign }, - }) -} - -/** - * 查询(嵌入模式) - */ -export function findById(id) { - return http.request>({ - method: 'get', - url: '/vbill/onb/apply/findById', - params: { id }, - }) -} - -/** - * 保存信息(嵌入模式) - */ -export function save(param: MerchantApply) { - return http.request>({ - method: 'post', - url: '/vbill/onb/apply/save', - data: param, - }) -} - -/** - * 随行付经营类目树 - */ -export function mccTree() { - return http.request>({ - method: 'get', - url: '/leshua/mcc/tree', - }) -} - -/** - * 获取代理商权限配置 - */ -export function getAgentPermConfig() { - return http.request>({ - method: 'get', - url: '/vbill/rate/agent/getPermConfig', - }) -} - -/** - * 获取代理商费率配置 - */ -export function getConfig() { - return http.request>({ - method: 'get', - url: '/vbill/rate/agent/getConfig', - }) -} - -/** - * 随行付商户申请参数 - */ -export interface MerchantApply { - /** 申请单ID */ - applyId?: string - /** 商户信息 */ - merchant: OnbMerchantProfile - /** 法人信息 */ - legal: OnbLegalProfile - /** 商户资质图片信息 */ - license: OnbLicenseProfile - /** 经营场所名称 */ - shop: OnbShopProfile - /** 结算卡信息 */ - bankAccount: OnbBankAccountProfile - /** 持卡人信息 */ - cardHolder: OnbCardHolderProfile - /** 其他申请信息 */ - other: OtherApply - /** 费率配置信息 */ - rate: RateProfile -} - -/** - * 其他申请数据 - */ -export interface OtherApply extends MchEntity { - /** 经营类型 */ - operationalType?: string - /** 线上产品类型 */ - onlineType?: string - /** APP名称/网站网址/公众号/小程序/服务窗名称 */ - onlineName?: string - /** 客服电话 */ - servicePhone?: string - /** 开户许可证照片 */ - openLicensePic?: string - /** 开户许可证照片地址 */ - openLicensePicUrl?: string - /** 营业范围代码 */ - mccCodes?: string[] - /** ICP许可证或公众号主体信息截图 */ - icpLicencePic?: string - /** ICP许可证或公众号主体信息截图地址 */ - icpLicencePicUrl?: string -} - -/** - * 随行付商户费率配置参数 - */ -export interface RateProfile { - /** 商户申请单ID */ - applyId?: number - /** 微信贷记卡费率 */ - wechatCreditRate?: number - /** 微信借记卡费率 */ - wechatDebitRate?: number - /** 微信借记卡封顶手续费 */ - wechatDebitMaxFee?: number - /** 支付宝贷记卡费率 */ - alipayCreditRate?: number - /** 支付宝借记卡费率 */ - alipayDebitRate?: number - /** 支付宝借记卡封顶手续费 */ - alipayDebitMaxFee?: number - /** 银联单笔小于1000贷记卡费率 */ - unionCreditMinRate?: number - /** 银联单笔小于1000借记卡费率 */ - unionDebitMinRate?: number - /** 银联单笔大于1000贷记卡费率 */ - unionCreditMaxRate?: number - /** 银联单笔大于1000借记卡费率 */ - unionDebitMaxRate?: number - /** 贷记卡费率 */ - creditRate?: number - /** 借记卡费率 */ - cardDebitRate?: number - /** 借记卡手续费封顶值 */ - cardDebitCap?: number - /** 手机闪付贷记卡费率 */ - quickCreditRate?: number - /** 手机闪付借记卡费率 */ - quickDebitRate?: number -} - -/** - * 随行付费率配置 - */ -export interface VbillRateConfig extends MchEntity { - /** 微信贷记卡费率 */ - wechatCreditRate: TradeRateConfigItem - /** 微信借记卡费率 */ - wechatDebitRate: TradeRateConfigItem - /** 微信借记卡封顶手续费 */ - wechatDebitMaxFee: TradeRateConfigItem - /** 支付宝贷记卡费率 */ - alipayCreditRate: TradeRateConfigItem - /** 支付宝借记卡费率 */ - alipayDebitRate: TradeRateConfigItem - /** 支付宝借记卡封顶手续费 */ - alipayDebitMaxFee: TradeRateConfigItem - /** 银联单笔小于1000贷记卡费率 */ - unionCreditMinRate: TradeRateConfigItem - /** 银联单笔小于1000借记卡费率 */ - unionDebitMinRate: TradeRateConfigItem - /** 银联单笔大于1000贷记卡费率 */ - unionCreditMaxRate: TradeRateConfigItem - /** 银联单笔大于1000借记卡费率 */ - unionDebitMaxRate: TradeRateConfigItem - /** 贷记卡费率 */ - creditRate: TradeRateConfigItem - /** 借记卡费率 */ - cardDebitRate: TradeRateConfigItem - /** 借记卡手续费封顶值 */ - cardDebitCap: TradeRateConfigItem - /** 手机闪付贷记卡费率 */ - quickCreditRate: TradeRateConfigItem - /** 手机闪付借记卡费率 */ - quickDebitRate: TradeRateConfigItem - /** 服务商号 */ - isvNo?: string -} - -/** - * 随行付商户费率配置 - */ -export interface VbillMchRateConfig extends MchEntity { - /** 微信贷记卡费率 */ - wechatCreditRate?: number - /** 微信借记卡费率 */ - wechatDebitRate?: number - /** 微信借记卡封顶手续费 */ - wechatDebitMaxFee?: number - /** 支付宝贷记卡费率 */ - alipayCreditRate?: number - /** 支付宝借记卡费率 */ - alipayDebitRate?: number - /** 支付宝借记卡封顶手续费 */ - alipayDebitMaxFee?: number - /** 银联单笔小于1000贷记卡费率 */ - unionCreditMinRate?: number - /** 银联单笔小于1000借记卡费率 */ - unionDebitMinRate?: number - /** 银联单笔大于1000贷记卡费率 */ - unionCreditMaxRate?: number - /** 银联单笔大于1000借记卡费率 */ - unionDebitMaxRate?: number - /** 贷记卡费率 */ - creditRate?: number - /** 借记卡费率 */ - cardDebitRate?: number - /** 借记卡手续费封顶值 */ - cardDebitCap?: number - /** 手机闪付贷记卡费率 */ - quickCreditRate?: number - /** 手机闪付借记卡费率 */ - quickDebitRate?: number - /** 进件商户号 */ - onbMchNo?: string -} - -/** - * 随行付经营类目 - */ -export interface MccConst { - /** 类目 */ - code: string - /** 类目名称 */ - name: string - /** 父类目 */ - parentCode: string - /** 子类目 */ - children?: MccConst[] -} diff --git a/src/views/daxpay/h5/onboarded/vbill/VbillApply.vue b/src/views/daxpay/h5/onboarded/vbill/VbillApply.vue deleted file mode 100644 index c400f08..0000000 --- a/src/views/daxpay/h5/onboarded/vbill/VbillApply.vue +++ /dev/null @@ -1,1418 +0,0 @@ - - - - - diff --git a/src/views/daxpay/miniapp/agent/merchant/profile/MchMainBody.vue b/src/views/daxpay/miniapp/agent/merchant/profile/MchMainBody.vue deleted file mode 100644 index e471b54..0000000 --- a/src/views/daxpay/miniapp/agent/merchant/profile/MchMainBody.vue +++ /dev/null @@ -1,805 +0,0 @@ - - - - - diff --git a/src/views/daxpay/miniapp/agent/merchant/profile/MchSettleInfo.vue b/src/views/daxpay/miniapp/agent/merchant/profile/MchSettleInfo.vue deleted file mode 100644 index 29b1b10..0000000 --- a/src/views/daxpay/miniapp/agent/merchant/profile/MchSettleInfo.vue +++ /dev/null @@ -1,373 +0,0 @@ - - - - - diff --git a/src/views/daxpay/miniapp/agent/merchant/profile/MchShopInfo.vue b/src/views/daxpay/miniapp/agent/merchant/profile/MchShopInfo.vue deleted file mode 100644 index f6735e9..0000000 --- a/src/views/daxpay/miniapp/agent/merchant/profile/MchShopInfo.vue +++ /dev/null @@ -1,276 +0,0 @@ - - - - - diff --git a/src/views/daxpay/miniapp/agent/merchant/profile/MerchantProfile.api.ts b/src/views/daxpay/miniapp/agent/merchant/profile/MerchantProfile.api.ts deleted file mode 100644 index a4a222a..0000000 --- a/src/views/daxpay/miniapp/agent/merchant/profile/MerchantProfile.api.ts +++ /dev/null @@ -1,292 +0,0 @@ -import { http } from '@/utils/http/axios' -import type { MchEntity, Result } from '#/axios' - -/** - * 查询主体信息 - */ -export function getMainBody(mchNo: string) { - return http.request>({ - method: 'get', - url: '/mini/agent/mch/profile/getMainBody', - params: { mchNo }, - }) -} - -/** - * 更新主体信息 - */ -export function updateMainBody(params: MchMainBody) { - return http.request>({ - method: 'post', - url: '/mini/agent/mch/profile/updateMainBody', - data: params, - }) -} - -/** - * 查询经营场所信息 - */ -export function getShopInfo(mchNo: string) { - return http.request>({ - method: 'get', - url: '/mini/agent/mch/profile/shop/getShopProfile', - params: { mchNo }, - }) -} - -/** - * 更新经营场所信息 - */ -export function updateShopInfo(params: MchShopProfile) { - return http.request>({ - method: 'post', - url: '/mini/agent/mch/profile/shop/update', - data: params, - }) -} - -/** - * 查询结算信息 - */ -export function getSettleInfo(mchNo: string) { - return http.request>({ - method: 'get', - url: '/mini/agent/mch/profile/getSettleInfo', - params: { mchNo }, - }) -} - -/** - * 更新结算信息 - */ -export function updateSettleInfo(params: MchSettle) { - return http.request>({ - method: 'post', - url: '/mini/agent/mch/profile/updateSettleInfo', - data: params, - }) -} - -/** - * 提交主体认证 - */ -export function applyProfileAuth(mchNo: string) { - return http.request>({ - method: 'post', - url: '/mini/agent/mch/profile/applyProfileAuth', - params: { mchNo }, - }) -} - -/** - * 根据商户号查询商户状态信息 - */ -export function getMerchantStatus(mchNo: string) { - return http.request>({ - method: 'get', - url: '/mini/agent/mch/profile/findMchStatus', - params: { mchNo }, - }) -} - -/** - * 查询结算卡信息 - */ -export function getBankCardProfile(mchNo: string) { - return http.request>({ - method: 'get', - url: '/mini/agent/mch/profile/bankcard/getBankCardProfile', - params: { mchNo }, - }) -} - -/** - * 查询持卡人信息 - */ -export function getCardHolderProfile(mchNo: string) { - return http.request>({ - method: 'get', - url: '/mini/agent/mch/profile/cardholder/getCardHolderProfile', - params: { mchNo }, - }) -} - -/** - * 查询法人信息 - */ -export function getLegalProfile(mchNo: string) { - return http.request>({ - method: 'get', - url: '/mini/agent/mch/profile/legal/getLegalProfile', - params: { mchNo }, - }) -} - -/** - * 查询营业执照信息 - */ -export function getLicenseProfile(mchNo: string) { - return http.request>({ - method: 'get', - url: '/mini/agent/mch/profile/license/getLicenseProfile', - params: { mchNo }, - }) -} - -/** - * 商户主体信息 - */ -export interface MchMainBody extends MchEntity { - // 基础信息 - base: MchBaseProfile - // 法人信息 - legal: MchLegalProfile - // 营业执照信息 - license: MchLicenseProfile -} - -/** - * 商户经营场所信息 - */ -export interface MchShopProfile extends MchEntity { - // 经营场所名称 - name?: string - // 省市区编码 - regionCode?: string[] - // 经营场所详细地址 - address?: string - // 门头照 - doorPic?: string - // 室内照 - insidePic?: string - // 收银台照片 - cashierPic?: string -} - -/** - * 商户结算信息 - */ -export interface MchSettle extends MchEntity { - // 银行卡信息 - bankCard: MchBankCardProfile - // 持卡人信息 - cardHolder: MchCardHolderProfile -} - -/** - * 商户基础信息 - */ -export interface MchBaseProfile extends MchEntity { - // 商户类型 - merchantType?: string - // 商户名称 - merchantName?: string - // 商户简称 - merchantShortName?: string - // 认证状态 - profileAuth?: string - // 认证失败原因 - profileAuthErrorMsg?: 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 MerchantStatus extends MchEntity { - /** 商户号 */ - mchNo?: string - /** 主体认证状态 */ - profileAuth?: string - /** 认证错误信息 */ - profileAuthErrorMsg?: string -} - -/** - * 商户银行卡信息 - */ -export interface MchBankCardProfile extends MchEntity { - // 账户类型 - accountType?: string - // 银行卡账户名 - accountName?: string - // 银行卡号 - cardNo?: string - // 银行卡开户行名称 - bankName?: string - // 银行卡开户行联行号 - branchNo?: string - // 银行预留手机号 - bankPhone?: string - // 银行卡正面照片 - cardFrontPic?: string - // 银行卡反面照片 - cardBackPic?: string -} - -/** - * 商户持卡人信息 - */ -export interface MchCardHolderProfile extends MchEntity { - // 持卡人姓名 - holderName?: string - // 持卡人证件号 - certNo?: string - // 身份证长期有效 - periodLong?: boolean - // 身份证开始时间 - startDate?: string - // 身份证结束时间 - endDate?: string - // 持卡人身份证正面照片 - frontPic?: string - // 持卡人身份证反面照片 - backPic?: string - // 非法人结算授权函图片 - letterOfAuthPic?: string -} diff --git a/src/views/daxpay/miniapp/agent/wallet/cashouts/Cashouts.api.ts b/src/views/daxpay/miniapp/agent/wallet/cashouts/Cashouts.api.ts deleted file mode 100644 index f1f832b..0000000 --- a/src/views/daxpay/miniapp/agent/wallet/cashouts/Cashouts.api.ts +++ /dev/null @@ -1,174 +0,0 @@ -import { http } from '@/utils/http/axios' -import type { MchEntity, Result, PageResult } from '#/axios' - -/** - * 查询钱包 - */ -export function getWallet() { - return http.request>({ - method: 'get', - url: '/agent/wallet/get', - }) -} - -/** - * 创建提现申请 - */ -export function createApply(params: AgentCashouts) { - return http.request>({ - method: 'post', - url: '/agent/cashouts/create', - data: params, - }) -} - -/** - * 获取提现配置 - */ -export function getConfig() { - return http.request>({ - method: 'get', - url: '/agent/cashouts/config/get', - }) -} - -/** - * 提现手续费金额计算 - */ -export function calcCashoutsFee(cashoutsAmount: number) { - return http.request>({ - method: 'get', - url: '/agent/cashouts/calcCashoutsFee', - params: { cashoutsAmount }, - }) -} - -/** - * 提现申请分页 - */ -export function pageCashouts(params: any) { - return http.request>>({ - method: 'get', - url: '/agent/cashouts/page', - params, - }) -} - -/** - * 提现申请详情 - */ -export function getCashouts(id: string) { - return http.request>({ - method: 'get', - url: '/agent/cashouts/findById', - params: { id }, - }) -} - -/** - * 修改提现申请 - */ -export function updateCashouts(params: AgentCashouts) { - return http.request>({ - method: 'post', - url: '/agent/cashouts/update', - data: params, - }) -} - -/** - * 关闭提现申请 - */ -export function closeCashouts(id: number) { - return http.request>({ - method: 'post', - url: '/agent/cashouts/close', - params: { id }, - }) -} - -/** - * 钱包 - */ -export interface AgentWallet extends MchEntity { - /** 余额 */ - balance?: number - /** 可用余额 */ - availableBalance?: number - /** 冻结金额 */ - freezeBalance?: number - /** 提现中金额 */ - withdrawBalance?: number - /** 在途金额 */ - onWayBalance?: number -} - -/** - * 提现申请 - */ -export interface AgentCashouts extends MchEntity { - /** 申请名称 */ - name?: string - /** 提现申请号 */ - cashoutsNo?: string - /** 提现方式 */ - type?: string - /** 提现金额 */ - amount?: number - /** 到账金额 */ - arriveAmount?: number - /** 提现手续费 */ - feeAmount?: number - /** 收款人 */ - receiver?: string - /** 收款方手机号 */ - receiverMobile?: string - /** 提现备注 */ - reason?: string - /** 申请资料 */ - applyDataUrl?: string - /** 对公账户名称 */ - companyName?: string - /** 对公账户号码 */ - companyAccount?: string - /** 开户银行 */ - bankName?: string - /** 开户行支行编码 */ - bankBranchNo?: string - /** 状态 */ - status?: string - /** 外部状态 */ - outStatus?: string - /** 申请时间 */ - applyTime?: string - /** 审核备注 */ - auditRemark?: string - /** 审核时间 */ - auditTime?: string - /** 打款时间 */ - payoutsTime?: string - /** 打款凭证 */ - payVoucherUrl?: string - /** 打款备注 */ - payoutsRemark?: string -} - -/** - * 提现配置 - */ -export interface AgentCashoutsConfig extends MchEntity { - /** 起提金额 */ - startAmount?: number - /** 单笔限额 */ - singleLimit?: number - /** 每日限额 */ - dailyLimit?: number - /** 费率 */ - feeRate?: number - /** 固定费用 */ - fixedFee?: number - /** 到账金额 */ - arriveAmount?: number - /** 提现手续费 */ - feeAmount?: number -} diff --git a/src/views/daxpay/miniapp/agent/wallet/cashouts/CashoutsApply.vue b/src/views/daxpay/miniapp/agent/wallet/cashouts/CashoutsApply.vue deleted file mode 100644 index 3a5b841..0000000 --- a/src/views/daxpay/miniapp/agent/wallet/cashouts/CashoutsApply.vue +++ /dev/null @@ -1,429 +0,0 @@ - - - - - diff --git a/src/views/daxpay/miniapp/agent/wallet/cashouts/CashoutsDetail.vue b/src/views/daxpay/miniapp/agent/wallet/cashouts/CashoutsDetail.vue deleted file mode 100644 index 72e335a..0000000 --- a/src/views/daxpay/miniapp/agent/wallet/cashouts/CashoutsDetail.vue +++ /dev/null @@ -1,354 +0,0 @@ - - - - - diff --git a/src/views/daxpay/miniapp/agent/wallet/cashouts/CashoutsEdit.vue b/src/views/daxpay/miniapp/agent/wallet/cashouts/CashoutsEdit.vue deleted file mode 100644 index c9ad456..0000000 --- a/src/views/daxpay/miniapp/agent/wallet/cashouts/CashoutsEdit.vue +++ /dev/null @@ -1,430 +0,0 @@ - - - - - diff --git a/src/views/daxpay/miniapp/merchant/profile/MchMainBody.vue b/src/views/daxpay/miniapp/merchant/profile/MchMainBody.vue deleted file mode 100644 index 23e2c26..0000000 --- a/src/views/daxpay/miniapp/merchant/profile/MchMainBody.vue +++ /dev/null @@ -1,799 +0,0 @@ - - - - - diff --git a/src/views/daxpay/miniapp/merchant/profile/MchSettleInfo.vue b/src/views/daxpay/miniapp/merchant/profile/MchSettleInfo.vue deleted file mode 100644 index 3b8948f..0000000 --- a/src/views/daxpay/miniapp/merchant/profile/MchSettleInfo.vue +++ /dev/null @@ -1,369 +0,0 @@ - - - - - diff --git a/src/views/daxpay/miniapp/merchant/profile/MchShopInfo.vue b/src/views/daxpay/miniapp/merchant/profile/MchShopInfo.vue deleted file mode 100644 index 840de67..0000000 --- a/src/views/daxpay/miniapp/merchant/profile/MchShopInfo.vue +++ /dev/null @@ -1,271 +0,0 @@ - - - - - diff --git a/src/views/daxpay/miniapp/merchant/profile/MerchantProfile.api.ts b/src/views/daxpay/miniapp/merchant/profile/MerchantProfile.api.ts deleted file mode 100644 index 08c3982..0000000 --- a/src/views/daxpay/miniapp/merchant/profile/MerchantProfile.api.ts +++ /dev/null @@ -1,243 +0,0 @@ -import { http } from '@/utils/http/axios' -import type { MchEntity, Result } from '#/axios' - -/** - * 查询主体信息 - */ -export function getMainBody() { - return http.request>({ - method: 'get', - url: '/mini/mch/profile/getMainBody', - }) -} - -/** - * 更新主体信息 - */ -export function updateMainBody(params: MchMainBody) { - return http.request>({ - method: 'post', - url: '/mini/mch/profile/updateMainBody', - data: params, - }) -} - -/** - * 查询经营场所信息 - */ -export function getShopInfo() { - return http.request>({ - method: 'get', - url: '/mini/mch/profile/shop/getShopProfile', - }) -} - -/** - * 更新经营场所信息 - */ -export function updateShopInfo(params: MchShopProfile) { - return http.request>({ - method: 'post', - url: '/mini/mch/profile/shop/update', - data: params, - }) -} - -/** - * 查询结算信息 - */ -export function getSettleInfo() { - return http.request>({ - method: 'get', - url: '/mini/mch/profile/getSettleInfo', - }) -} - -/** - * 更新结算信息 - */ -export function updateSettleInfo(params: MchSettle) { - return http.request>({ - method: 'post', - url: '/mini/mch/profile/updateSettleInfo', - data: params, - }) -} - -/** - * 提交主体认证 - */ -export function applyProfileAuth() { - return http.request>({ - method: 'post', - url: '/mini/mch/profile/applyProfileAuth', - }) -} - -/** - * 根据商户号查询商户状态信息 - */ -export function getMerchantStatus() { - return http.request>({ - method: 'get', - url: '/mini/mch/findMchStatus', - }) -} - -/** - * 商户主体信息 - */ -export interface MchMainBody extends MchEntity { - // 基础信息 - base: MchBaseProfile - // 法人信息 - legal: MchLegalProfile - // 营业执照信息 - license: MchLicenseProfile -} - -/** - * 商户经营场所信息 - */ -export interface MchShopProfile extends MchEntity { - // 经营场所名称 - name?: string - // 省市区编码 - regionCode?: string[] - // 经营场所详细地址 - address?: string - // 门头照 - doorPic?: string - // 室内照 - insidePic?: string - // 收银台照片 - cashierPic?: string -} - -/** - * 商户结算信息 - */ -export interface MchSettle extends MchEntity { - // 银行卡信息 - bankCard: MchBankCardProfile - // 持卡人信息 - cardHolder: MchCardHolderProfile -} - -/** - * 商户基础信息 - */ -export interface MchBaseProfile extends MchEntity { - // 商户类型 - merchantType?: string - // 商户名称 - merchantName?: string - // 商户简称 - merchantShortName?: string - // 认证状态 - profileAuth?: string - // 认证失败原因 - profileAuthErrorMsg?: 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 MerchantStatus extends MchEntity { - /** 商户号 */ - mchNo?: string - /** 主体认证状态 */ - profileAuth?: string - /** 认证错误信息 */ - profileAuthErrorMsg?: string -} - -/** - * 商户银行卡信息 - */ -export interface MchBankCardProfile extends MchEntity { - // 账户类型 - accountType?: string - // 银行卡账户名 - accountName?: string - // 银行卡号 - cardNo?: string - // 银行卡开户行名称 - bankName?: string - // 银行卡开户行联行号 - branchNo?: string - // 银行预留手机号 - bankPhone?: string - // 银行卡正面照片 - cardFrontPic?: string - // 银行卡反面照片 - cardBackPic?: string -} - -/** - * 商户持卡人信息 - */ -export interface MchCardHolderProfile extends MchEntity { - // 持卡人姓名 - holderName?: string - // 持卡人证件号 - certNo?: string - // 身份证长期有效 - periodLong?: boolean - // 身份证开始时间 - startDate?: string - // 身份证结束时间 - endDate?: string - // 持卡人身份证正面照片 - frontPic?: string - // 持卡人身份证反面照片 - backPic?: string - // 非法人结算授权函图片 - letterOfAuthPic?: string -}