修复查询时间戳的问题

dev
RogerWork 2 weeks ago
parent 2465bb696d
commit b8b50efadc
  1. 6
      src/components/ec_api/SeatStatus.vue
  2. 12
      src/components/ec_api/TabArea.vue

@ -235,9 +235,9 @@ watch(() => selectSeats.value, () => {
<div class="seat-row" v-for="r in row_x">
<el-checkbox-button v-for="seat in seatList[r]" :label="seat['key']" :key="seat['key']"
:disabled="seat['disable']">
<span>{{ seat['label'] }}</span>
<span>{{ seat['id'] }}</span>
<span>{{ seat['name'] }}</span>
<span style="font-weight: bold">{{ seat['label'] }}</span>
<span style="font-size: 12px; margin-top: 5px">{{ seat['id'] }}</span>
<span style="font-size: 12px">{{ seat['name'] }}</span>
</el-checkbox-button>
</div>
</el-checkbox-group>

@ -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()
}

Loading…
Cancel
Save