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 })
...@@ -109,7 +112,7 @@ watch(matchId, (val) => { ...@@ -109,7 +112,7 @@ watch(matchId, (val) => {
109 }) 112 })
110 113
111 onMounted(() => { 114 onMounted(() => {
112 115
113 }) 116 })
114 117
115 function building() { 118 function building() {
...@@ -186,7 +189,7 @@ function goBooking(n) { ...@@ -186,7 +189,7 @@ function goBooking(n) {
186 189
187 .itemBox_en { 190 .itemBox_en {
188 padding: 20px 40px; 191 padding: 20px 40px;
189 192
190 p { 193 p {
191 margin: 0; 194 margin: 0;
192 height: 40px; 195 height: 40px;
...@@ -205,7 +208,7 @@ function goBooking(n) { ...@@ -205,7 +208,7 @@ function goBooking(n) {
205 background: url("@/assets/dance/btn_bg.png") no-repeat left #FFFFFF; 208 background: url("@/assets/dance/btn_bg.png") no-repeat left #FFFFFF;
206 background-size: 100% 100%; 209 background-size: 100% 100%;
207 border-radius: 15px; 210 border-radius: 15px;
208 211
209 img { 212 img {
210 margin: 0 5%; 213 margin: 0 5%;
211 } 214 }
...@@ -226,20 +229,20 @@ function goBooking(n) { ...@@ -226,20 +229,20 @@ function goBooking(n) {
226 background-size: cover; 229 background-size: cover;
227 position: relative; 230 position: relative;
228 border-radius: 15px; 231 border-radius: 15px;
229 232
230 img { 233 img {
231 position: absolute; 234 position: absolute;
232 top: -30px; 235 top: -30px;
233 transition: all 0.2s; 236 transition: all 0.2s;
234 } 237 }
235 238
236 &:hover { 239 &:hover {
237 box-shadow: 0 0 10px #333; 240 box-shadow: 0 0 10px #333;
238 241
239 img { 242 img {
240 transform: rotateY(180deg); 243 transform: rotateY(180deg);
241 } 244 }
242 245
243 p { 246 p {
244 color: #000; 247 color: #000;
245 } 248 }
...@@ -252,7 +255,7 @@ function goBooking(n) { ...@@ -252,7 +255,7 @@ function goBooking(n) {
252 } 255 }
253 .item { 256 .item {
254 font-size: 16px; 257 font-size: 16px;
255 258
256 img { 259 img {
257 width: 50px; 260 width: 50px;
258 height: 50px 261 height: 50px
......
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">
...@@ -50,9 +50,9 @@ ...@@ -50,9 +50,9 @@
50 </div> 50 </div>
51 </el-col> 51 </el-col>
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">
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
104 </el-row> 104 </el-row>
105 </div> 105 </div>
106 <order-remark ref="orderRemarkRef" @submit="goBooking" /> 106 <order-remark ref="orderRemarkRef" @submit="goBooking" />
107 107
108 <!-- <div class="fixedKP" @click="addInvoice">--> 108 <!-- <div class="fixedKP" @click="addInvoice">-->
109 <!-- <img src="@/assets/img/kp.svg"/>--> 109 <!-- <img src="@/assets/img/kp.svg"/>-->
110 <!-- 开票--> 110 <!-- 开票-->
...@@ -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 })
...@@ -163,7 +167,7 @@ function popRemark(type) { ...@@ -163,7 +167,7 @@ function popRemark(type) {
163 building() 167 building()
164 return 168 return
165 } 169 }
166 170
167 if ((form.value.isJdView == 0 && type == '1') || 171 if ((form.value.isJdView == 0 && type == '1') ||
168 (form.value.isCarView == 0 && type == '2') || 172 (form.value.isCarView == 0 && type == '2') ||
169 (form.value.isFoodView == 0 && type == '3') || 173 (form.value.isFoodView == 0 && type == '3') ||
...@@ -175,7 +179,7 @@ function popRemark(type) { ...@@ -175,7 +179,7 @@ function popRemark(type) {
175 building() 179 building()
176 return 180 return
177 } 181 }
178 182
179 const params = { 183 const params = {
180 matchId: props.matchId, 184 matchId: props.matchId,
181 title: language.value == 0 ? '预订说明' : 'Booking Instructions', 185 title: language.value == 0 ? '预订说明' : 'Booking Instructions',
...@@ -253,31 +257,44 @@ h4 { ...@@ -253,31 +257,44 @@ h4 {
253 width: 60px; 257 width: 60px;
254 height: 60px; 258 height: 60px;
255 text-align: center; 259 text-align: center;
256 260
257 img { 261 img {
258 width: 26px; 262 width: 26px;
259 height: 26px; 263 height: 26px;
260 display: block; 264 display: block;
261 margin: 10px auto 0px; 265 margin: 10px auto 0px;
262 } 266 }
263 267
264 font-size: 13px; 268 font-size: 13px;
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!