diff --git a/src/router/daxpay.ts b/src/router/daxpay.ts
index d533c4e..09f5d62 100644
--- a/src/router/daxpay.ts
+++ b/src/router/daxpay.ts
@@ -99,7 +99,7 @@ export const DaxPayH5Route: RouteRecordRaw = {
},
},
{
- path: '/onboarded/leshua',
+ path: '/onboarded/leshua_pay',
name: 'leshua',
component: () => import('@/views/daxpay/h5/onboarded/leshua/index.vue'),
meta: {
diff --git a/src/views/daxpay/h5/cashier/Cashier.vue b/src/views/daxpay/h5/cashier/Cashier.vue
index 469c342..1056969 100644
--- a/src/views/daxpay/h5/cashier/Cashier.vue
+++ b/src/views/daxpay/h5/cashier/Cashier.vue
@@ -87,25 +87,6 @@
-
-
@@ -227,48 +208,13 @@ const cancelObj = reactive({
},
})
-// 关闭弹窗对象
-const closeObj = reactive({
- // 控制弹窗
- showCloseMask: false,
- // 处理确认关闭
- handleConfirmClose: () => {
- closeObj.showCloseMask = false // 隐藏弹窗
- // 尝试关闭页面
- try {
- window.close() // 尝试关闭当前页面
- }
- catch {
- // eslint-disable-next-line no-alert
- alert('无法关闭页面,请手动关闭。')
- router.replace('/')
- }
- },
- // 处理继续支付
- handleContinueClose: () => {
- closeObj.showCloseMask = false // 隐藏弹窗
- history.pushState(null, '', location.href) // 阻止返回行为
- },
- // 监听关闭事件处理
- handleBeforeUnload: (event: BeforeUnloadEvent) => {
- event.preventDefault()
- closeObj.showCloseMask = true
- },
-
-})
-
onMounted(() => {
init()
// 初始化历史记录栈
history.pushState({ page: 'cashier' }, '', location.href)
- // 监听点击浏览器返回
- window.addEventListener('popstate', cancelObj.handlePopstate)
- window.addEventListener('beforeunload', closeObj.handleBeforeUnload)
})
onUnmounted(() => {
pause()
- window.removeEventListener('popstate', cancelObj.handlePopstate)
- window.removeEventListener('beforeunload', closeObj.handleBeforeUnload)
})
/**
@@ -500,90 +446,5 @@ function init() {
}
}
}
-
- /* 取消支付 */
- .cancelMask {
- position: fixed;
- width: 100%;
- height: 100%;
- top: 0;
- right: 0;
- left: 0;
- bottom: 0;
- background: rgba(0, 0, 0, 0.5);
- z-index: 9999;
-
- .confirmDialog {
- width: 15rem;
- background: #ffffff;
- border-radius: 0.2rem;
- overflow: hidden;
- display: flex;
- flex-direction: column;
- align-items: center;
- text-align: center;
- position: absolute;
- left: 50%;
- top: 50%;
- transform: translate(-50%, -50%);
- }
-
- .confirmHeader {
- font-size: 0.9rem;
- line-height: 1.2rem;
- color: #22242e;
- padding: 1.55rem 0.6rem 0;
- }
-
- .confimContent {
- width: 100%;
- font-size: 0.7rem;
- font-weight: 400;
- color: #6c6e75;
- padding: 0.55rem 1rem 1.55rem;
- display: flex;
- justify-content: center;
- text-align: justify;
- }
-
- .contentTxt {
- line-height: 1.05rem;
- }
-
- .confimFooter {
- width: 100%;
- height: 2.5rem;
- display: flex;
- align-items: center;
- border-top: 1px solid #eeeeee;
- position: relative;
- }
-
- .confimFooter::after {
- position: absolute;
- content: '';
- height: 100%;
- width: 1px;
- background: #eeeeee;
- left: 50%;
- top: 0;
- }
-
- .confimBtn {
- height: 100%;
- flex: 1;
- color: #22242e;
- text-align: center;
- font-size: 0.7rem;
- line-height: 0.95rem;
- display: flex;
- align-items: center;
- justify-content: center;
- }
-
- .payBtn {
- color: #5568d5;
- }
- }
}
diff --git a/src/views/daxpay/h5/code/CashierCode.api.ts b/src/views/daxpay/h5/code/CashierCode.api.ts
index ab50f74..f7b9d74 100644
--- a/src/views/daxpay/h5/code/CashierCode.api.ts
+++ b/src/views/daxpay/h5/code/CashierCode.api.ts
@@ -100,6 +100,8 @@ export interface WxJsapiSignResult {
export interface GatewayCashierCodeConfig {
// 码牌名称
name?: string
+ // 是否启用
+ enable?: boolean
// 金额类型
amountType?: string
// 金额
@@ -108,7 +110,7 @@ export interface GatewayCashierCodeConfig {
channel?: string
// 支付调起方式
callType?: string
- // 判断是否需要
+ // 判断是否需要获取openId
needOpenId?: boolean
// 备注
remark?: string
diff --git a/src/views/daxpay/h5/code/alipay/AlipayCashierCode.vue b/src/views/daxpay/h5/code/alipay/AlipayCashierCode.vue
index 94d8466..bd0f5dd 100644
--- a/src/views/daxpay/h5/code/alipay/AlipayCashierCode.vue
+++ b/src/views/daxpay/h5/code/alipay/AlipayCashierCode.vue
@@ -56,6 +56,7 @@
/>
(false) // 是否展示备注
const loading = ref(false) // 加载状态
-const cashierInfo = ref()
+const cashierInfo = ref({})
const amount = ref('0') // 金额
const description = ref()
@@ -104,8 +105,19 @@ function initData() {
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 {
+
+ }
+ loading.value = false
})
.catch((res) => {
router.replace({ name: 'payFail', query: { msg: res.message } })