Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
daxpay
2025-07-24 09:17:35 +08:00
5 changed files with 21 additions and 463 deletions

View File

@@ -5,22 +5,22 @@ import type { AuthResult } from '@/views/daxpay/h5/auth/ChannelAuth.api'
/**
* 获取码牌配置
*/
export function getCashierCodeConfig(cashierCode, cashierType) {
return http.request<Result<GatewayCashierConfig>>({
export function getCashierCodeConfig(cashierCode, scene) {
return http.request<Result<GatewayCashierCodeConfig>>({
url: '/unipay/gateway/cashier/getCodeConfig',
method: 'GET',
params: { cashierCode, cashierType },
params: { cashierCode, scene },
})
}
/**
* 获取码牌收银台所需授权链接, 用于获取OpenId一类的信息
*/
export function generateAuthUrl(cashierCode, cashierType) {
export function generateAuthUrl(cashierCode, scene) {
return http.request<Result<string>>({
url: '/unipay/gateway/cashier/code/generateAuthUrl',
method: 'POST',
data: { cashierCode, cashierType },
data: { cashierCode, scene },
})
}
@@ -53,7 +53,7 @@ export interface CashierPayParam {
// 收银码牌编码
cashierCode?: string
// 收银台类型
cashierType?: string
scene?: string
// 支付金额
amount?: number
// 唯一标识
@@ -95,11 +95,17 @@ export interface WxJsapiSignResult {
}
/**
* 收银台配置信息
* 码牌配置信息
*/
export interface GatewayCashierConfig {
// 商家名称
export interface GatewayCashierCodeConfig {
// 码牌名称
name?: string
// 金额类型
amountType?: string
// 金额
amount?: string
// 支付通道
channel?: string
// 支付调起方式
callType?: string
// 判断是否需要
@@ -115,7 +121,7 @@ export interface CashierCodeAuthParam {
// 收银码牌编码
cashierCode?: string
// 收银台类型
cashierType?: string
scene?: string
// 授权码
authCode: string
}

View File

@@ -71,7 +71,7 @@
import { onMounted, ref } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { showNotify } from 'vant'
import type { CashierPayParam, GatewayCashierConfig } from '../CashierCode.api'
import type { CashierPayParam, GatewayCashierCodeConfig } from '../CashierCode.api'
import { cashierPay, getCashierCodeConfig } from '../CashierCode.api'
import { AggregateEnum, CashierCodeTypeEnum } from '@/enums/daxpay/DaxPayEnum'
import { useKeyboard } from '@/hooks/daxpay/useKeyboard'
@@ -82,7 +82,7 @@ const { code } = route.params
const showRemark = ref<boolean>(false) // 是否展示备注
const loading = ref<boolean>(false) // 加载状态
const cashierInfo = ref<GatewayCashierConfig>()
const cashierInfo = ref<GatewayCashierCodeConfig>()
const amount = ref<string>('0') // 金额
const description = ref<string>()

View File

@@ -73,7 +73,7 @@ import { useRoute } from 'vue-router'
import { showNotify } from 'vant'
import type {
CashierPayParam,
GatewayCashierConfig,
GatewayCashierCodeConfig,
WxJsapiSignResult,
} from '../CashierCode.api'
@@ -95,7 +95,7 @@ const { code: authCode } = route.query
const show = ref<boolean>(false)
const showRemark = ref<boolean>(false)
const loading = ref<boolean>(false)
const cashierInfo = ref<GatewayCashierConfig>({})
const cashierInfo = ref<GatewayCashierCodeConfig>({})
const amount = ref<string>('0')
const description = ref<string>()
const openId = ref<string>()

View File

@@ -43,7 +43,7 @@ function closeClick() {
padding: 3.5rem 0rem;
width: 100%;
height: 100vh;
background-color: #fff;
background-color: light-dark(#fff, --van-gray-8);
display: flex;
flex-direction: column;
align-items: center;

File diff suppressed because one or more lines are too long