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>>({
|
return http.request<Result<GatewayCashierConfig>>({
|
||||||
url: '/unipay/gateway/cashier/getCodeConfig',
|
url: '/unipay/gateway/cashier/getCodeConfig',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
params: { cashierCode, cashierType },
|
params: { cashierCode, scene },
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取码牌收银台所需授权链接, 用于获取OpenId一类的信息
|
* 获取码牌收银台所需授权链接, 用于获取OpenId一类的信息
|
||||||
*/
|
*/
|
||||||
export function generateAuthUrl(cashierCode, cashierType) {
|
export function generateAuthUrl(cashierCode, cashierScene) {
|
||||||
return http.request<Result<string>>({
|
return http.request<Result<string>>({
|
||||||
url: '/unipay/gateway/cashier/code/generateAuthUrl',
|
url: '/unipay/gateway/cashier/code/generateAuthUrl',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: { cashierCode, cashierType },
|
data: { cashierCode, cashierScene },
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ export interface CashierPayParam {
|
|||||||
// 收银码牌编码
|
// 收银码牌编码
|
||||||
cashierCode?: string
|
cashierCode?: string
|
||||||
// 收银台类型
|
// 收银台类型
|
||||||
cashierType?: string
|
cashierScene?: string
|
||||||
// 支付金额
|
// 支付金额
|
||||||
amount?: number
|
amount?: number
|
||||||
// 唯一标识
|
// 唯一标识
|
||||||
@@ -112,10 +112,10 @@ export interface GatewayCashierConfig {
|
|||||||
* 码牌用户标识认证类
|
* 码牌用户标识认证类
|
||||||
*/
|
*/
|
||||||
export interface CashierCodeAuthParam {
|
export interface CashierCodeAuthParam {
|
||||||
// 收银码牌编码
|
// 码牌编码
|
||||||
cashierCode?: string
|
cashierCode?: string
|
||||||
// 收银台类型
|
// 支付场景
|
||||||
cashierType?: string
|
cashierScene?: string
|
||||||
// 授权码
|
// 授权码
|
||||||
authCode: string
|
authCode: string
|
||||||
}
|
}
|
||||||
|
@@ -125,7 +125,7 @@ function pay() {
|
|||||||
const from = {
|
const from = {
|
||||||
amount: amountValue,
|
amount: amountValue,
|
||||||
cashierCode: code,
|
cashierCode: code,
|
||||||
cashierType: AggregateEnum.ALI,
|
scene: AggregateEnum.ALI,
|
||||||
description: description.value,
|
description: description.value,
|
||||||
} as CashierPayParam
|
} as CashierPayParam
|
||||||
cashierPay(from).then((res) => {
|
cashierPay(from).then((res) => {
|
||||||
|
@@ -138,7 +138,7 @@ async function init() {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// 认证获取OpenId
|
// 认证获取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) => {
|
.then((res) => {
|
||||||
if (res.code) {
|
if (res.code) {
|
||||||
router.replace({ name: 'payFail', query: { msg: res.msg } })
|
router.replace({ name: 'payFail', query: { msg: res.msg } })
|
||||||
@@ -175,7 +175,7 @@ function pay() {
|
|||||||
amount: amountValue,
|
amount: amountValue,
|
||||||
cashierCode,
|
cashierCode,
|
||||||
openId: openId.value,
|
openId: openId.value,
|
||||||
cashierType: CashierCodeTypeEnum.WECHAT_PAY,
|
scene: CashierCodeTypeEnum.WECHAT_PAY,
|
||||||
description: description.value,
|
description: description.value,
|
||||||
} as CashierPayParam
|
} as CashierPayParam
|
||||||
cashierPay(from)
|
cashierPay(from)
|
||||||
|
Reference in New Issue
Block a user