homeQuick.vue 6.16 KB
<template>
  <div class="itemBox" v-if="language == 0">
    <el-row :gutter="20">
      <el-col :sm="12" :lg="8">
        <div class="item" @click="popRemark(1)"><img src="@/assets/dance/btn01.png">酒店预订</div>
      </el-col>
      <el-col :sm="12" :lg="8">
        <div class="item" @click="popRemark(2)"><img src="@/assets/dance/btn02.png">车辆预订</div>
      </el-col>
      <el-col :sm="12" :lg="8">
        <div class="item" @click="popRemark(3)"><img src="@/assets/dance/btn03.png">餐饮预订</div>
      </el-col>
      <el-col :sm="12" :lg="8">
        <div class="item" @click="popRemark(0)"><img src="@/assets/dance/btn04.png">票务预订</div>
      </el-col>
      <el-col :sm="12" :lg="8">
        <div class="item" @click="popRemark(4)"><img src="@/assets/dance/btn05.png">化妆预约</div>
      </el-col>
      <el-col :sm="12" :lg="8">
        <div class="item" @click="popRemark(5)"><img src="@/assets/dance/btn06.png">拍照预约</div>
      </el-col>
    </el-row>
  </div>
  <div class="itemBox_en" v-else>
    <el-row :gutter="20">
      <el-col :sm="12" :lg="8">
        <div class="item_en" @click="popRemark(1)"><img src="@/assets/dance/btn01.png">
          <p>HOTEL RESERVATION</p>
        </div></el-col>
      <el-col :sm="12" :lg="8">
        <div class="item_en" @click="popRemark(2)"><img src="@/assets/dance/btn02.png">
          <p>TRANSPORTATION RESERVATION</p>
        </div></el-col>
      <el-col :sm="12" :lg="8">
        <div class="item_en" @click="popRemark(3)"><img src="@/assets/dance/btn03.png">
          <p>DINING RESERVATION</p>
        </div>
      </el-col>
      <el-col :sm="12" :lg="8">
        <div class="item_en" @click="popRemark(0)">
          <img src="@/assets/dance/btn04.png">
          <p>TICKET BOOKING</p>
        </div>
      </el-col>
      <el-col :sm="12" :lg="8">
        <div class="item_en" @click="popRemark(4)"><img src="@/assets/dance/btn05.png">
          <p>MAKEUP APPOINTMENT</p>
        </div></el-col>
      <el-col :sm="12" :lg="8">
        <div class="item_en" @click="popRemark(5)"><img src="@/assets/dance/btn06.png">
          <p>PHOTOGRAPHY APPOINTMENT</p>
        </div></el-col>
    </el-row>
  </div>
  <order-remark ref="orderRemarkRef" @submit="goBooking"/>

</template>

<script setup>
import {useRouter} from "vue-router";

const router = useRouter()
import OrderRemark from '@/viewsPc/components/orderRemark'
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 {getBaseInfoByActiveId} from "@/apiPc/booking";
const props = defineProps({
  matchId: {
    type: String,
    required: true,
    default: '0'
  }
})
const language= useStorage('language',0)
const form = ref({})
const matchId = computed(()=>props.matchId);

watch(matchId,(val)=>{
  if(val && val!='0'){
    getBaseInfoByActiveId(props.matchId).then(res=>{
      form.value = res.data || null
    }).catch(err=>{
      console.log(err)
      form.value = null
    })
  }
})

onMounted(()=>{

})
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.')
  return
}
function popRemark(type){

  switch (type) {
    case 0:
      // 票务
      // router.push({path: `/booking/ticket/${props.matchId}`})
      building()
      break;
    case 1:
      //酒店
      router.push({path: `/booking/hotel/${props.matchId}`})
      break;
    case 2:
      //车辆
      router.push({path: `/booking/car/${props.matchId}`})
      break;
    case 3:
      //餐饮
      router.push({path: `/booking/dinner/${props.matchId}`})
      break;
    case 4:
      //化妆
      router.push({path: `/booking/makeup/${props.matchId}`})
      break;
    case 5:
      //拍照
      router.push({path: `/booking/photography/${props.matchId}`})
      break;
  }

  // if(!form.value){
  //   building()
  //   return
  // }
  // if((form.value.isJdView == 0&&type=='1') || (form.value.isCarView == 0&&type=='2') || (form.value.isFoodView == 0&&type=='3') || type=='0' || type=='4' || type=='5'){
  //   building()
  //   return
  // }
  // const params = {
  //   matchId: props.matchId,
  //   title: language.value == 0 ?'预订说明':'Booking Instructions',
  //   type: type
  // }
  // proxy.$refs['orderRemarkRef'].open(params)
}
function goBooking(n) {
  switch (n) {
    case 0:
      // 票务
      building()
      router.push({path: `/booking/ticket/${props.matchId}`})
      break;
    case 1:
      //酒店
      router.push({path: `/booking/hotel/${props.matchId}`})
      break;
    case 2:
      //车辆
      router.push({path: `/booking/car/${props.matchId}`})
      break;
    case 3:
      //餐饮
      router.push({path: `/booking/dinner/${props.matchId}`})
      break;
    case 4:
      //化妆
      router.push({path: `/booking/makeup/${props.matchId}`})
      break;
    case 5:
      //拍照
      building()

      router.push({path: `/booking/photography/${props.matchId}`})
      break;
  }
}
</script>

<style scoped lang="scss">
.itemBox {
  padding: 20px 40px;
}
.itemBox_en{
  padding: 20px 40px;
  p{margin: 0;height: 40px;line-height: 20px;display: flex;align-items: center;}
}
.item {
  box-shadow: 0px 0px 21px 0px rgba(41, 23, 101, 0.14);
  margin: 10px 0;
  display: flex;
  align-items: center;
  font-size: 22px;
  background: url("@/assets/dance/btn_bg.png") no-repeat left #FFFFFF;
  background-size: 100% 100%;
  border-radius: 15px;

  img {
    margin: 0 5%;
  }
}
.item_en{box-shadow: 0px 0px 21px 0px rgba(41,23,101,0.14);margin: 40px 0 0;cursor: pointer;
  display: flex;align-items: center;text-align: center;color: #333;
  font-size: 18px;    flex-direction: column;padding: 35px 10px 20px;
  background:url("@/assets/dance/znbb.png") no-repeat left #FFFFFF;
  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;}
  }
}
</style>