76688dd7 by zhangmeng

版本优化

1 parent fc55ed16
...@@ -174,7 +174,7 @@ import * as booking from '@/apiPc/booking' ...@@ -174,7 +174,7 @@ import * as booking from '@/apiPc/booking'
174 import { useRouter, useRoute } from 'vue-router' 174 import { useRouter, useRoute } from 'vue-router'
175 import { useStorage } from '@vueuse/core/index' 175 import { useStorage } from '@vueuse/core/index'
176 import useUserStore from '@/store/modules/user' 176 import useUserStore from '@/store/modules/user'
177 import { getVehicleByCheckIn } from '@/apiPc/booking' 177 import { getBaseInfoByActiveId, getVehicleByCheckIn } from '@/apiPc/booking'
178 import { computed } from 'vue' 178 import { computed } from 'vue'
179 179
180 const useStore = useUserStore() 180 const useStore = useUserStore()
...@@ -211,6 +211,7 @@ onMounted(() => { ...@@ -211,6 +211,7 @@ onMounted(() => {
211 getVehicleMap() 211 getVehicleMap()
212 }) 212 })
213 213
214
214 function getList() { 215 function getList() {
215 // if (language.value!=0)return 216 // if (language.value!=0)return
216 loading.value = true 217 loading.value = true
...@@ -253,6 +254,11 @@ async function handleSubmit(v) { ...@@ -253,6 +254,11 @@ async function handleSubmit(v) {
253 return 254 return
254 } 255 }
255 256
257 const { data } = await booking.getBaseInfoByActiveId(route.params.cptId)
258 if (data.isCarView == 0) {
259 return proxy.$modal.confirm(language.value == 0 ? '感谢您对本次比赛的关注,该服务暂无可预订信息,敬请期待。' : 'Thank you for your attention to this competition. The service is currently unavailable for booking. Please stay tuned.')
260 }
261
256 let checkOut = {} 262 let checkOut = {}
257 let obj = {} 263 let obj = {}
258 if (v == 0) { 264 if (v == 0) {
......
...@@ -132,6 +132,7 @@ import { getBaseInfoByActiveId, submitOrderCar, vehicleConfigList } from '@/apiP ...@@ -132,6 +132,7 @@ import { getBaseInfoByActiveId, submitOrderCar, vehicleConfigList } from '@/apiP
132 import dayjs from 'dayjs' 132 import dayjs from 'dayjs'
133 import { ElMessage, ElMessageBox } from 'element-plus' 133 import { ElMessage, ElMessageBox } from 'element-plus'
134 import useUserStore from '@/store/modules/user' 134 import useUserStore from '@/store/modules/user'
135 import * as booking from '/@/apiPc/booking'
135 136
136 const { proxy } = getCurrentInstance() 137 const { proxy } = getCurrentInstance()
137 const payLoading = ref(false) 138 const payLoading = ref(false)
...@@ -240,6 +241,11 @@ function disabledDate(date) { ...@@ -240,6 +241,11 @@ function disabledDate(date) {
240 } 241 }
241 242
242 async function submit() { 243 async function submit() {
244 const { data } = await booking.getBaseInfoByActiveId(route.params.cptId)
245 if (data.isCarView == 0) {
246 return proxy.$modal.confirm(language.value == 0 ? '感谢您对本次比赛的关注,该服务暂无可预订信息,敬请期待。' : 'Thank you for your attention to this competition. The service is currently unavailable for booking. Please stay tuned.')
247 }
248
243 await proxy.$refs['formRef'].validate() 249 await proxy.$refs['formRef'].validate()
244 if (!user) { 250 if (!user) {
245 useUserStore().setReLogin() 251 useUserStore().setReLogin()
......
1 <template> 1 <template>
2 <div v-if="language == 0" class="itemBox"> 2 <div v-if="language == 0" class="itemBox">
3 <el-row :gutter="20"> 3 <el-row v-loading="loading" :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>
...@@ -78,7 +78,7 @@ const { proxy } = getCurrentInstance() ...@@ -78,7 +78,7 @@ const { proxy } = getCurrentInstance()
78 import { useStorage } from '@vueuse/core/index' 78 import { useStorage } from '@vueuse/core/index'
79 import { ElMessage } from 'element-plus' 79 import { ElMessage } from 'element-plus'
80 import { getCurrentInstance } from '@vue/runtime-core' 80 import { getCurrentInstance } from '@vue/runtime-core'
81 import { computed, onMounted, watch } from 'vue' 81 import { computed, onMounted, watch, ref } from 'vue'
82 import { getBaseInfoByActiveId } from '@/apiPc/booking' 82 import { getBaseInfoByActiveId } from '@/apiPc/booking'
83 83
84 const props = defineProps({ 84 const props = defineProps({
...@@ -96,12 +96,15 @@ const props = defineProps({ ...@@ -96,12 +96,15 @@ const props = defineProps({
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 99 const loading = ref(true)
100 watch(matchId, (val) => { 100 watch(matchId, (val) => {
101 if (val && val != '0') { 101 if (val && val != '0') {
102 loading.value = true
102 getBaseInfoByActiveId(props.matchId).then(res => { 103 getBaseInfoByActiveId(props.matchId).then(res => {
104 loading.value = false
103 form.value = res.data || null 105 form.value = res.data || null
104 }).catch(err => { 106 }).catch(err => {
107 loading.value = false
105 console.log(err) 108 console.log(err)
106 form.value = null 109 form.value = null
107 }) 110 })
......
1 <template> 1 <template>
2 <div style="filter: opacity(1)"> 2 <div v-loading="loading" style="filter: opacity(1)">
3 <el-row v-if="language==0" class="btnbox" justify="space-between" :gutter="15"> 3 <el-row v-if="language==0" :gutter="15" class="btnbox" justify="space-between">
4 <el-col :lg="3" :md="6" :sm="12" :xs="12"> 4 <el-col :lg="3" :md="6" :sm="12" :xs="12">
5 <div class="funcBtn" @click="popRemark(0)"> 5 <div class="funcBtn" @click="popRemark(0)">
6 <img src="@/assets/dance/btn04.png"> 6 <img src="@/assets/dance/btn04.png">
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
52 </el-row> 52 </el-row>
53 53
54 54
55 <el-row v-else class="btnbox enBtnbox" justify="space-between" :gutter="15"> 55 <el-row v-else :gutter="15" class="btnbox enBtnbox" justify="space-between">
56 <el-col :lg="3" :md="8" :sm="12" :xs="12"> 56 <el-col :lg="3" :md="8" :sm="12" :xs="12">
57 <div class="funcBtn" @click="popRemark(0)"> 57 <div class="funcBtn" @click="popRemark(0)">
58 <img src="@/assets/dance/btn04.png"> 58 <img src="@/assets/dance/btn04.png">
...@@ -117,7 +117,7 @@ import { useRouter } from 'vue-router' ...@@ -117,7 +117,7 @@ import { useRouter } from 'vue-router'
117 import { useStorage } from '@vueuse/core/index' 117 import { useStorage } from '@vueuse/core/index'
118 import OrderRemark from '@/viewsPc/components/orderRemark' 118 import OrderRemark from '@/viewsPc/components/orderRemark'
119 import { getBaseInfoByActiveId } from '@/apiPc/booking' 119 import { getBaseInfoByActiveId } from '@/apiPc/booking'
120 import { getCurrentInstance } from '@vue/runtime-core' 120 import { getCurrentInstance, ref } from '@vue/runtime-core'
121 import { onMounted } from 'vue' 121 import { onMounted } from 'vue'
122 122
123 const { proxy } = getCurrentInstance() 123 const { proxy } = getCurrentInstance()
...@@ -136,12 +136,16 @@ const props = defineProps({ ...@@ -136,12 +136,16 @@ const props = defineProps({
136 default: '' 136 default: ''
137 } 137 }
138 }) 138 })
139 const loading = ref(true)
139 const form = ref() 140 const form = ref()
140 onMounted(() => { 141 onMounted(() => {
142 loading.value = true
141 getBaseInfoByActiveId(props.matchId).then(res => { 143 getBaseInfoByActiveId(props.matchId).then(res => {
142 form.value = res.data || null 144 form.value = res.data || null
145 loading.value = false
143 }).catch(err => { 146 }).catch(err => {
144 form.value = null 147 form.value = null
148 loading.value = false
145 console.log(err) 149 console.log(err)
146 }) 150 })
147 }) 151 })
...@@ -265,19 +269,32 @@ h4 { ...@@ -265,19 +269,32 @@ h4 {
265 box-shadow: 0 0 10px rgba(0, 0, 0, 0.6); 269 box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
266 } 270 }
267 271
268 .enBtnbox{ 272 .enBtnbox {
269 .funcBtn{ 273 .funcBtn {
270 h4{font-size:16px;display: flex;align-items: center;width: 100%;justify-content: center;height: 36px;} 274 h4 {
275 font-size: 16px;
276 display: flex;
277 align-items: center;
278 width: 100%;
279 justify-content: center;
280 height: 36px;
281 }
271 } 282 }
272 } 283 }
284
273 @media screen and (max-width: 1400px) { 285 @media screen and (max-width: 1400px) {
274 .enBtnbox .funcBtn{ 286 .enBtnbox .funcBtn {
275 h4{font-size:14px;} 287 h4 {
288 font-size: 14px;
289 }
276 } 290 }
277 } 291 }
292
278 @media screen and (max-width: 1250px) { 293 @media screen and (max-width: 1250px) {
279 .enBtnbox .funcBtn{ 294 .enBtnbox .funcBtn {
280 h4{font-size:12px;} 295 h4 {
296 font-size: 12px;
297 }
281 } 298 }
282 } 299 }
283 </style> 300 </style>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!