f83daab5 by zhangmeng

版本优化

1 parent 76688dd7
<template>
<div v-if="language == 0" class="itemBox">
<el-row v-loading="loading" :gutter="20">
<el-row :gutter="20">
<el-col :lg="8" :sm="12" :xs="12">
<div class="item" @click="popRemark(1)"><img src="@/assets/dance/btn01.png">酒店预订</div>
</el-col>
......@@ -94,21 +94,22 @@ const props = defineProps({
}
})
const language = useStorage('language', 0)
const form = ref({})
const form = ref()
const matchId = computed(() => props.matchId)
const loading = ref(true)
watch(matchId, (val) => {
if (val && val != '0') {
loading.value = true
getBaseInfoByActiveId(props.matchId).then(res => {
loading.value = false
form.value = res.data || null
}).catch(err => {
loading.value = false
console.log(err)
form.value = null
})
}
// if (val && val != '0') {
// loading.value = true
// getBaseInfoByActiveId(props.matchId).then(res => {
// loading.value = false
// form.value = res.data || null
// }).catch(err => {
// loading.value = false
// console.log(err)
// form.value = null
// })
// }
})
onMounted(() => {
......@@ -119,7 +120,9 @@ function building() {
ElMessage.warning(language.value == 0 ? '感谢您对本次比赛的关注,该服务暂无可预订信息,敬请期待。' : 'Thank you for your attention to this competition. The service is currently unavailable for booking. Please stay tuned.')
}
function popRemark(type) {
async function popRemark(type) {
const res = await getBaseInfoByActiveId(props.matchId)
form.value = res.data
if (!form.value) {
building()
return
......
......@@ -136,25 +136,27 @@ const props = defineProps({
default: ''
}
})
const loading = ref(true)
const loading = ref(false)
const form = ref()
onMounted(() => {
loading.value = true
getBaseInfoByActiveId(props.matchId).then(res => {
form.value = res.data || null
loading.value = false
}).catch(err => {
form.value = null
loading.value = false
console.log(err)
})
// loading.value = true
// getBaseInfoByActiveId(props.matchId).then(res => {
// form.value = res.data || null
// loading.value = false
// }).catch(err => {
// form.value = null
// loading.value = false
// console.log(err)
// })
})
function building() {
ElMessage.warning(language.value == 0 ? '感谢您对本次比赛的关注,该服务暂无可预订信息,敬请期待。' : 'Thank you for your attention to this competition. The service is currently unavailable for booking. Please stay tuned.')
}
function popRemark(type) {
async function popRemark(type) {
const res = await getBaseInfoByActiveId(props.matchId)
form.value = res.data || null
if (type == 6) {
return router.push({
path: '/match/list/reservationSearch',
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!