feat: 券详情页接入实时核销码(/voucher/checkCode,60秒滚动刷新)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
jacobxu666
2026-09-24 11:43:45 +08:00
co-authored by Claude Fable 5
parent 571afb0673
commit 5d253c60a8
2 changed files with 41 additions and 12 deletions
+4 -1
View File
@@ -26,6 +26,7 @@ const AppointUrl = 'zhy-api/cardBag/appoint'
const VoucherCreateUrl = 'open-api/hhService/voucher/create'
const VoucherPrepayUrl = 'open-api/hhService/voucher/prepay'
const VoucherLatestUrl = 'open-api/hhService/voucher/latest'
const VoucherCheckCodeUrl = 'open-api/hhService/voucher/checkCode'
// 此处第二个参数vm,就是我们在页面使用的this
const install = (Vue, vm) => {
@@ -60,6 +61,7 @@ const install = (Vue, vm) => {
const voucherCreate = (params = {}) => vm.$u.post(VoucherCreateUrl, params)
const voucherPrepay = (params = {}) => vm.$u.post(VoucherPrepayUrl, params)
const voucherLatest = (params = {}) => vm.$u.post(VoucherLatestUrl, params)
const voucherCheckCode = (params = {}) => vm.$u.post(VoucherCheckCodeUrl, params)
vm.$u.api = {
checkerLogin,
@@ -79,7 +81,8 @@ const install = (Vue, vm) => {
getWinnerList,
voucherCreate,
voucherPrepay,
voucherLatest
voucherLatest,
voucherCheckCode
}
}