f83daab5 by zhangmeng

版本优化

1 parent 76688dd7
1 <template> 1 <template>
2 <div v-if="language == 0" class="itemBox"> 2 <div v-if="language == 0" class="itemBox">
3 <el-row v-loading="loading" :gutter="20"> 3 <el-row :gutter="20">
4 <el-col :lg="8" :sm="12" :xs="12"> 4 <el-col :lg="8" :sm="12" :xs="12">
5 <div class="item" @click="popRemark(1)"><img src="@/assets/dance/btn01.png">酒店预订</div> 5 <div class="item" @click="popRemark(1)"><img src="@/assets/dance/btn01.png">酒店预订</div>
6 </el-col> 6 </el-col>
...@@ -94,21 +94,22 @@ const props = defineProps({ ...@@ -94,21 +94,22 @@ const props = defineProps({
94 } 94 }
95 }) 95 })
96 const language = useStorage('language', 0) 96 const language = useStorage('language', 0)
97 const form = ref({}) 97 const form = ref()
98 const matchId = computed(() => props.matchId) 98 const matchId = computed(() => props.matchId)
99 const loading = ref(true) 99 const loading = ref(true)
100
100 watch(matchId, (val) => { 101 watch(matchId, (val) => {
101 if (val && val != '0') { 102 // if (val && val != '0') {
102 loading.value = true 103 // loading.value = true
103 getBaseInfoByActiveId(props.matchId).then(res => { 104 // getBaseInfoByActiveId(props.matchId).then(res => {
104 loading.value = false 105 // loading.value = false
105 form.value = res.data || null 106 // form.value = res.data || null
106 }).catch(err => { 107 // }).catch(err => {
107 loading.value = false 108 // loading.value = false
108 console.log(err) 109 // console.log(err)
109 form.value = null 110 // form.value = null
110 }) 111 // })
111 } 112 // }
112 }) 113 })
113 114
114 onMounted(() => { 115 onMounted(() => {
...@@ -119,7 +120,9 @@ function building() { ...@@ -119,7 +120,9 @@ function building() {
119 ElMessage.warning(language.value == 0 ? '感谢您对本次比赛的关注,该服务暂无可预订信息,敬请期待。' : 'Thank you for your attention to this competition. The service is currently unavailable for booking. Please stay tuned.') 120 ElMessage.warning(language.value == 0 ? '感谢您对本次比赛的关注,该服务暂无可预订信息,敬请期待。' : 'Thank you for your attention to this competition. The service is currently unavailable for booking. Please stay tuned.')
120 } 121 }
121 122
122 function popRemark(type) { 123 async function popRemark(type) {
124 const res = await getBaseInfoByActiveId(props.matchId)
125 form.value = res.data
123 if (!form.value) { 126 if (!form.value) {
124 building() 127 building()
125 return 128 return
......
...@@ -136,25 +136,27 @@ const props = defineProps({ ...@@ -136,25 +136,27 @@ const props = defineProps({
136 default: '' 136 default: ''
137 } 137 }
138 }) 138 })
139 const loading = ref(true) 139 const loading = ref(false)
140 const form = ref() 140 const form = ref()
141 onMounted(() => { 141 onMounted(() => {
142 loading.value = true 142 // loading.value = true
143 getBaseInfoByActiveId(props.matchId).then(res => { 143 // getBaseInfoByActiveId(props.matchId).then(res => {
144 form.value = res.data || null 144 // form.value = res.data || null
145 loading.value = false 145 // loading.value = false
146 }).catch(err => { 146 // }).catch(err => {
147 form.value = null 147 // form.value = null
148 loading.value = false 148 // loading.value = false
149 console.log(err) 149 // console.log(err)
150 }) 150 // })
151 }) 151 })
152 152
153 function building() { 153 function building() {
154 ElMessage.warning(language.value == 0 ? '感谢您对本次比赛的关注,该服务暂无可预订信息,敬请期待。' : 'Thank you for your attention to this competition. The service is currently unavailable for booking. Please stay tuned.') 154 ElMessage.warning(language.value == 0 ? '感谢您对本次比赛的关注,该服务暂无可预订信息,敬请期待。' : 'Thank you for your attention to this competition. The service is currently unavailable for booking. Please stay tuned.')
155 } 155 }
156 156
157 function popRemark(type) { 157 async function popRemark(type) {
158 const res = await getBaseInfoByActiveId(props.matchId)
159 form.value = res.data || null
158 if (type == 6) { 160 if (type == 6) {
159 return router.push({ 161 return router.push({
160 path: '/match/list/reservationSearch', 162 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!