mirror of
https://gitee.com/bootx/dax-pay-h5.git
synced 2025-10-13 13:43:53 +00:00
fix: 码牌支付场景信息读取不到
This commit is contained in:
@@ -5,22 +5,22 @@ import type { AuthResult } from '@/views/daxpay/h5/auth/ChannelAuth.api'
|
||||
/**
|
||||
* 获取码牌配置
|
||||
*/
|
||||
export function getCashierCodeConfig(cashierCode, cashierType) {
|
||||
export function getCashierCodeConfig(cashierCode, scene) {
|
||||
return http.request<Result<GatewayCashierConfig>>({
|
||||
url: '/unipay/gateway/cashier/getCodeConfig',
|
||||
method: 'GET',
|
||||
params: { cashierCode, cashierType },
|
||||
params: { cashierCode, scene },
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取码牌收银台所需授权链接, 用于获取OpenId一类的信息
|
||||
*/
|
||||
export function generateAuthUrl(cashierCode, cashierType) {
|
||||
export function generateAuthUrl(cashierCode, cashierScene) {
|
||||
return http.request<Result<string>>({
|
||||
url: '/unipay/gateway/cashier/code/generateAuthUrl',
|
||||
method: 'POST',
|
||||
data: { cashierCode, cashierType },
|
||||
data: { cashierCode, cashierScene },
|
||||
})
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ export interface CashierPayParam {
|
||||
// 收银码牌编码
|
||||
cashierCode?: string
|
||||
// 收银台类型
|
||||
cashierType?: string
|
||||
cashierScene?: string
|
||||
// 支付金额
|
||||
amount?: number
|
||||
// 唯一标识
|
||||
@@ -112,10 +112,10 @@ export interface GatewayCashierConfig {
|
||||
* 码牌用户标识认证类
|
||||
*/
|
||||
export interface CashierCodeAuthParam {
|
||||
// 收银码牌编码
|
||||
// 码牌编码
|
||||
cashierCode?: string
|
||||
// 收银台类型
|
||||
cashierType?: string
|
||||
// 支付场景
|
||||
cashierScene?: string
|
||||
// 授权码
|
||||
authCode: string
|
||||
}
|
||||
|
@@ -125,7 +125,7 @@ function pay() {
|
||||
const from = {
|
||||
amount: amountValue,
|
||||
cashierCode: code,
|
||||
cashierType: AggregateEnum.ALI,
|
||||
scene: AggregateEnum.ALI,
|
||||
description: description.value,
|
||||
} as CashierPayParam
|
||||
cashierPay(from).then((res) => {
|
||||
|
@@ -138,7 +138,7 @@ async function init() {
|
||||
}
|
||||
else {
|
||||
// 认证获取OpenId
|
||||
auth({ cashierCode: cashierCode as string, cashierType: CashierCodeTypeEnum.WECHAT_PAY, authCode: authCode as string })
|
||||
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 } })
|
||||
@@ -175,7 +175,7 @@ function pay() {
|
||||
amount: amountValue,
|
||||
cashierCode,
|
||||
openId: openId.value,
|
||||
cashierType: CashierCodeTypeEnum.WECHAT_PAY,
|
||||
scene: CashierCodeTypeEnum.WECHAT_PAY,
|
||||
description: description.value,
|
||||
} as CashierPayParam
|
||||
cashierPay(from)
|
||||
|
Reference in New Issue
Block a user