76688dd7 by zhangmeng

版本优化

1 parent fc55ed16
......@@ -174,7 +174,7 @@ import * as booking from '@/apiPc/booking'
import { useRouter, useRoute } from 'vue-router'
import { useStorage } from '@vueuse/core/index'
import useUserStore from '@/store/modules/user'
import { getVehicleByCheckIn } from '@/apiPc/booking'
import { getBaseInfoByActiveId, getVehicleByCheckIn } from '@/apiPc/booking'
import { computed } from 'vue'
const useStore = useUserStore()
......@@ -211,6 +211,7 @@ onMounted(() => {
getVehicleMap()
})
function getList() {
// if (language.value!=0)return
loading.value = true
......@@ -253,6 +254,11 @@ async function handleSubmit(v) {
return
}
const { data } = await booking.getBaseInfoByActiveId(route.params.cptId)
if (data.isCarView == 0) {
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.')
}
let checkOut = {}
let obj = {}
if (v == 0) {
......
......@@ -132,6 +132,7 @@ import { getBaseInfoByActiveId, submitOrderCar, vehicleConfigList } from '@/apiP
import dayjs from 'dayjs'
import { ElMessage, ElMessageBox } from 'element-plus'
import useUserStore from '@/store/modules/user'
import * as booking from '/@/apiPc/booking'
const { proxy } = getCurrentInstance()
const payLoading = ref(false)
......@@ -240,6 +241,11 @@ function disabledDate(date) {
}
async function submit() {
const { data } = await booking.getBaseInfoByActiveId(route.params.cptId)
if (data.isCarView == 0) {
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.')
}
await proxy.$refs['formRef'].validate()
if (!user) {
useUserStore().setReLogin()
......
<template>
<div v-if="language == 0" class="itemBox">
<el-row :gutter="20">
<el-row v-loading="loading" :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>
......@@ -78,7 +78,7 @@ const { proxy } = getCurrentInstance()
import { useStorage } from '@vueuse/core/index'
import { ElMessage } from 'element-plus'
import { getCurrentInstance } from '@vue/runtime-core'
import { computed, onMounted, watch } from 'vue'
import { computed, onMounted, watch, ref } from 'vue'
import { getBaseInfoByActiveId } from '@/apiPc/booking'
const props = defineProps({
......@@ -96,12 +96,15 @@ const props = defineProps({
const language = useStorage('language', 0)
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
})
......@@ -109,7 +112,7 @@ watch(matchId, (val) => {
})
onMounted(() => {
})
function building() {
......@@ -186,7 +189,7 @@ function goBooking(n) {
.itemBox_en {
padding: 20px 40px;
p {
margin: 0;
height: 40px;
......@@ -205,7 +208,7 @@ function goBooking(n) {
background: url("@/assets/dance/btn_bg.png") no-repeat left #FFFFFF;
background-size: 100% 100%;
border-radius: 15px;
img {
margin: 0 5%;
}
......@@ -226,20 +229,20 @@ function goBooking(n) {
background-size: cover;
position: relative;
border-radius: 15px;
img {
position: absolute;
top: -30px;
transition: all 0.2s;
}
&:hover {
box-shadow: 0 0 10px #333;
img {
transform: rotateY(180deg);
}
p {
color: #000;
}
......@@ -252,7 +255,7 @@ function goBooking(n) {
}
.item {
font-size: 16px;
img {
width: 50px;
height: 50px
......
<template>
<div style="filter: opacity(1)">
<el-row v-if="language==0" class="btnbox" justify="space-between" :gutter="15">
<div v-loading="loading" style="filter: opacity(1)">
<el-row v-if="language==0" :gutter="15" class="btnbox" justify="space-between">
<el-col :lg="3" :md="6" :sm="12" :xs="12">
<div class="funcBtn" @click="popRemark(0)">
<img src="@/assets/dance/btn04.png">
......@@ -50,9 +50,9 @@
</div>
</el-col>
</el-row>
<el-row v-else class="btnbox enBtnbox" justify="space-between" :gutter="15">
<el-row v-else :gutter="15" class="btnbox enBtnbox" justify="space-between">
<el-col :lg="3" :md="8" :sm="12" :xs="12">
<div class="funcBtn" @click="popRemark(0)">
<img src="@/assets/dance/btn04.png">
......@@ -104,7 +104,7 @@
</el-row>
</div>
<order-remark ref="orderRemarkRef" @submit="goBooking" />
<!-- <div class="fixedKP" @click="addInvoice">-->
<!-- <img src="@/assets/img/kp.svg"/>-->
<!-- 开票-->
......@@ -117,7 +117,7 @@ import { useRouter } from 'vue-router'
import { useStorage } from '@vueuse/core/index'
import OrderRemark from '@/viewsPc/components/orderRemark'
import { getBaseInfoByActiveId } from '@/apiPc/booking'
import { getCurrentInstance } from '@vue/runtime-core'
import { getCurrentInstance, ref } from '@vue/runtime-core'
import { onMounted } from 'vue'
const { proxy } = getCurrentInstance()
......@@ -136,12 +136,16 @@ const props = defineProps({
default: ''
}
})
const loading = ref(true)
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)
})
})
......@@ -163,7 +167,7 @@ function popRemark(type) {
building()
return
}
if ((form.value.isJdView == 0 && type == '1') ||
(form.value.isCarView == 0 && type == '2') ||
(form.value.isFoodView == 0 && type == '3') ||
......@@ -175,7 +179,7 @@ function popRemark(type) {
building()
return
}
const params = {
matchId: props.matchId,
title: language.value == 0 ? '预订说明' : 'Booking Instructions',
......@@ -253,31 +257,44 @@ h4 {
width: 60px;
height: 60px;
text-align: center;
img {
width: 26px;
height: 26px;
display: block;
margin: 10px auto 0px;
}
font-size: 13px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
}
.enBtnbox{
.funcBtn{
h4{font-size:16px;display: flex;align-items: center;width: 100%;justify-content: center;height: 36px;}
.enBtnbox {
.funcBtn {
h4 {
font-size: 16px;
display: flex;
align-items: center;
width: 100%;
justify-content: center;
height: 36px;
}
}
}
@media screen and (max-width: 1400px) {
.enBtnbox .funcBtn{
h4{font-size:14px;}
.enBtnbox .funcBtn {
h4 {
font-size: 14px;
}
}
}
@media screen and (max-width: 1250px) {
.enBtnbox .funcBtn{
h4{font-size:12px;}
.enBtnbox .funcBtn {
h4 {
font-size: 12px;
}
}
}
</style>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!