From b8b50efadc8e7d9005b7da3a561296fd27d68148 Mon Sep 17 00:00:00 2001 From: RogerWork Date: Wed, 30 Oct 2024 18:26:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9F=A5=E8=AF=A2=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E6=88=B3=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ec_api/SeatStatus.vue | 6 +++--- src/components/ec_api/TabArea.vue | 12 +++++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/components/ec_api/SeatStatus.vue b/src/components/ec_api/SeatStatus.vue index e549b15..86eae08 100644 --- a/src/components/ec_api/SeatStatus.vue +++ b/src/components/ec_api/SeatStatus.vue @@ -235,9 +235,9 @@ watch(() => selectSeats.value, () => {
- {{ seat['label'] }} - {{ seat['id'] }} - {{ seat['name'] }} + {{ seat['label'] }} + {{ seat['id'] }} + {{ seat['name'] }}
diff --git a/src/components/ec_api/TabArea.vue b/src/components/ec_api/TabArea.vue index d07ccfe..838d241 100644 --- a/src/components/ec_api/TabArea.vue +++ b/src/components/ec_api/TabArea.vue @@ -43,6 +43,9 @@ const send_btn = ref('发送') // 这对添加券接口和售卖接口的售卖类型 const saleType = ref('ticket') +// 售卖接口中的支付类型 +const payType = ref('cash') + // 表格逻辑 // 多选改变后处理逻辑 function handleParamsChange(newCheckedResult) { @@ -251,7 +254,7 @@ function send_request() { } -async function get_suggest(options = {sale_type: saleType.value}) { +async function get_suggest(options = {sale_type: saleType.value, pay_type: payType.value}) { if (UserApiData.value.api[activeTab.value].reload === true) { const api_type = UserApiData.value.api[activeTab.value].type const api = UserApiData.value.api[activeTab.value].path @@ -286,13 +289,13 @@ async function get_suggest(options = {sale_type: saleType.value}) { } } -async function get_timestamp() { +async function get_timestamp(options = {sale_type: saleType.value, pay_type: payType.value}) { const api_type = UserApiData.value.api[activeTab.value].type const api = UserApiData.value.api[activeTab.value].path const env = UserApiData.value.base_info['env'] const cid = UserApiData.value.base_info['cinema'] const pid = UserApiData.value.base_info['channel'] - await ec_api_get_suggest_timestamp(api_type, api, env, cid, pid).then( + await ec_api_get_suggest_timestamp(api_type, api, env, cid, pid, options).then( res => { console.log('get_timestamp', res['timestamp']) if (res['timestamp'] > UserApiData.value.api[activeTab.value].timestamp) { @@ -347,6 +350,7 @@ function get_sale_type(sale_type) { break; } } + get_suggest() markIsChecked() } @@ -385,6 +389,7 @@ function get_quan_detail(quan, cardQuan, quanType) { function get_pay_type(pay_type) { console.log('pay_type', pay_type) + payType.value = pay_type switch (pay_type) { case 'cash': check_params(["cash"], ["ecard_number", "coupons", "card_coupons"]); @@ -399,6 +404,7 @@ function get_pay_type(pay_type) { check_params(["cash", "card_coupons"], ["ecard_number", "coupons"]); break; } + get_suggest() markIsChecked() }