13a27606 by zhangmeng

新数据

1 parent 682aad45
......@@ -278,4 +278,40 @@ li.el-select-dropdown__item {
@media (max-width: 800px) {
.box{width: 96%}
}
.hz-tag{
border-radius: 13px;
height: 25px;
line-height: 25px;
font-size: 12px;
font-weight: 400;
padding: 0 15px;
}
.tag1{
background: rgba(50, 177, 108, 0.2);
color:rgba(50, 177, 108, 1);
}
.tag2{
background-color: rgba(243, 152, 0, 0.2);
color: #F39800;
}
.tag3{
background-color: rgba(0, 160, 233, 0.2);
color: #00A0E9;
}
.tag4{
background-color: rgba(247, 64, 166, 0.2);
color: #F740A6;
}
.hz-row{
font-size: 14px;
font-weight: 400;
color: #929AA0;
margin-bottom: 16px;
}
.sign{
color: #493CEB;
}
</style>
......
......@@ -404,6 +404,12 @@ export const constantRoutes = [
meta: { title: 'Makeup Appointment' }
},
{
path: 'makeUp/:cptId/:id',
component: () => import('@/viewsPc/booking/makeUpDetail'),
name: 'makeUpDetail',
meta: { title: 'Makeup Appointment' }
},
{
path: 'photography/:cptId',
component: () => import('@/viewsPc/booking/photography'),
name: 'photography',
......
<template>
<div>
<div class="box">
<el-card class="mt30"></el-card>
<div>
<div class="banner">
<img src="@/assets/booking/hz_text.png">
</div>
<div class="box">
<div class="searchBar">
<el-input :placeholder="language==0?'请输入关键字搜索':'Search'" v-model="query.name" class="no-border">
</el-input>
<el-button size="large" type="primary" class="btn-lineG" icon="search" @click="getList">
{{ language==0?'搜索':'Search' }}</el-button>
</div>
</div>
<div class="box" v-loading="loading">
<el-row style="width: 100%" :gutter="20">
<el-col :span="8" v-for="(h,index) in list" class="mb20" @click="goDetail(h)">
<el-card style="position: relative;">
<img class="w100 hz-img" :src="fillImgUrl(h.photos?.split(',')[0])"/>
<div class="yuyue">
30 个时间段可预约
</div>
<div class="hz-text">MANGO美妆工作室</div>
<el-row style="width: 100%;margin-bottom: 10px" :gutter="5" justify='space-between'>
<div class="hz-tag tag1">专业团体</div>
<div class="hz-tag tag2">金牌化妆师</div>
<div class="hz-tag tag3">大牌化妆品</div>
<div class="hz-tag tag4">连锁</div>
</el-row>
<div class="hz-row">
<el-icon size="16" style="position: relative;top: 2px" color="#929AA0"><LocationFilled /></el-icon>
成立 <span class="sign">6</span>年 |
<el-icon size="16" style="position: relative;top: 2px" color="#929AA0"><LocationFilled /></el-icon><span class="sign">12</span>名化妆师
</div>
<div class="hz-row">
<el-icon size="16" style="position: relative;top: 2px" color="#929AA0"><LocationFilled /></el-icon>
1535652837
</div>
<div class="hz-row">
<el-icon size="16" style="position: relative;top: 2px" color="#929AA0"><LocationFilled /></el-icon>
{{h.address}}
</div>
<div style="text-align: center">
<el-button class="btn-lineG w200px" round type="primary" size="large">{{ language==0?'立即预约':'Select' }}</el-button>
</div>
</el-card>
</el-col>
</el-row>
</div>
<!-- <el-card v-for="(h,index) in list" class="mb20" @click="goDetail(h)">-->
<!-- &lt;!&ndash; 酒店列表&ndash;&gt;-->
<!-- <el-row class="hotel" align="middle" :gutter="20">-->
<!-- <el-col :span="6">-->
<!-- <img class="w100" :src="fillImgUrl(h.photos?.split(',')[0])"/>-->
<!-- </el-col>-->
<!-- <el-col :span="10">-->
<!-- <h3 class="esp">{{h.name}}</h3>-->
<!-- <div class="starBox">-->
<!-- <img v-for="i in Number(h.starLevel||0)" src="@/assets/booking/star.png">-->
<!-- </div>-->
<!-- <div class="tagbox">-->
<!-- <span v-for="(t,index) in h.label?.split(',')" v-show="index<4">{{t}}</span>-->
<!-- <a v-show="h.label?.split(',').length>4">{{ language==0?'更多':'MORE' }} ></a>-->
<!-- </div>-->
<!-- <p class="esp addr">-->
<!-- <el-icon size="16" style="position: relative;top: 2px" color="#929AA0"><LocationFilled /></el-icon>-->
<!-- {{h.address}}-->
<!-- </p>-->
<!-- </el-col>-->
<!-- <el-col :span="8" class="text-right">-->
<!-- <div class="price">¥<span>{{ h.price }}</span><i v-if="language==0"></i></div>-->
<!-- <el-button class="btn-lineG w200px" round type="primary" size="large">{{ language==0?'立即预约':'Select' }}</el-button>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- </el-card>-->
<el-empty v-show="!loading&&list.length==0" :image="`/img/order_no.png`" :image-size="228" description="" />
<div style="height: 50px"></div>
</div>
</div>
</div>
</template>
<script setup>
import {onMounted} from "@vue/runtime-core"
import * as booking from "@/apiPc/booking"
import {useRouter,useRoute} from "vue-router";
import {useStorage} from "@vueuse/core/index";
const router = useRouter()
const route = useRoute()
const language= useStorage('language',0)
const query = ref({
name:''
})
const cptId = ref('')
const list = ref([])
const loading = ref(false)
onMounted(()=>{
query.value.activityId = route.params.cptId
getList()
})
function getList() {
loading.value = true
booking.getHotelList(query.value).then(res=>{
list.value = res.rows
loading.value = false
}).catch(e=>{
loading.value = false
})
}
function goDetail(item) {
router.push({
name:'makeUpDetail',
params:{
id:item.id,
},
query:{
id:item.id
}
})
}
</script>
<style scoped>
<style scoped lang="scss">
.hotel{
h3{margin: 0 0 20px;}
img.w100{object-fit: cover;aspect-ratio: 16/9}
.addr{font-size: 16px;color: #929AA0;font-weight: 400;}
.price{margin: 0 0 25px;
color: #FF8124;font-size: 18px;
span{font-size: 24px;margin: 0 8px;font-family: 'DINAlternate-Bold';font-weight: 600;}
i{font-style: normal;color: #929AA0;}
}
}
.banner{height: 140px;background-size: cover;text-align: center;
background: url("@/assets/booking/hz_bg.png") center;display: flex;align-items: center;
justify-content: center;
img{display: block;margin:-30px auto 0;width: auto;}
}
.searchBar{position: relative;top: -30px;
background: #FFFFFF;display: flex;padding: 20px;
border-radius: 10px;}
.no-border{border: none;background: #F5F7F9;
:deep(.el-input__wrapper){border: none;box-shadow: none;background: #F5F7F9;}
}
.starBox{
img{display: inline-block;margin-right: 4px}
}
.hz-img{
height: 218px;
width: 100%;
border-radius: 2px;
border: 0;
margin-bottom: 20px;
}
.yuyue{
width: 150px;
height: 30px;
background: #000000;
border-radius: 20px 0px 0px 2px;
padding-left: 15px;
opacity: 0.45;
color: #fff;
font-size: 14px;
line-height: 30px;
position: absolute;
top: 207px;
right:21px;
}
.hz-text{
font-size: 20px;
font-weight: 500;
color: #000;
margin-bottom: 8px;
}
//.hz-tag{
// border-radius: 13px;
// height: 25px;
// line-height: 25px;
// font-size: 12px;
// font-weight: 400;
// padding: 0 15px;
//}
//.tag1{
// background: rgba(50, 177, 108, 0.2);
// color:rgba(50, 177, 108, 1);
//}
//.tag2{
// background-color: rgba(243, 152, 0, 0.2);
// color: #F39800;
//}
//.tag3{
// background-color: rgba(0, 160, 233, 0.2);
// color: #00A0E9;
//}
//.tag4{
// background-color: rgba(247, 64, 166, 0.2);
// color: #F740A6;
//}
//
//.hz-row{
// font-size: 14px;
// font-weight: 400;
// color: #929AA0;
// margin-bottom: 16px;
// .sign{
// color: #493CEB;
// }
//}
//.tagbox{margin: 15px 0;
// a{color: #AFB5B9;font-size: 12px;}
// span{border-radius: 13px;font-size: 12px;padding: 4px 10px;margin-right:10px;font-weight: 400;}
// span:nth-child(4n){background: rgba(50, 177, 108, 0.2);color: rgba(50, 177, 108, 1);}
// span:nth-child(4n+1){background:rgba(243, 152, 0, 0.2);color: rgba(243, 152, 0, 1);}
// span:nth-child(4n+2){background: rgba(0, 160, 233, 0.2);color: rgba(0, 160, 233, 1);}
// span:nth-child(4n+3){background: rgba(247, 64, 166, 0.2);color:rgba(247, 64, 166, 1);}
//}
</style>
......
<template>
<div>
<div class="box">
<el-card>
<el-row>
<div class="zh-title">Mango美妆工作室</div>
<div class="hz-tag tag1">专业团体</div>
<div class="hz-tag tag2">金牌化妆师</div>
<div class="hz-tag tag3">大牌化妆品</div>
<div class="hz-tag tag4">连锁</div>
</el-row>
<br>
<el-row class="hz-row">
<el-icon size="16" style="position: relative;top: 2px" color="#929AA0">
<LocationFilled/>
</el-icon>
成立 <span class="sign">6</span>年 |
<el-icon size="16" style="position: relative;top: 2px" color="#929AA0">
<LocationFilled/>
</el-icon>
名化妆师 |
<el-icon size="16" style="position: relative;top: 2px" color="#929AA0">
<LocationFilled/>
</el-icon>
<span class="sign">12</span>名化妆师 |
<el-icon size="16" style="position: relative;top: 2px" color="#929AA0">
<LocationFilled/>
</el-icon>
<span class="sign">12</span>名化妆师
</el-row>
</el-card>
<br>
<el-row justify='space-between' style="padding: 10px">
<div class="img-header" style="width: 40%">
<div class="card">
<img src="@/assets/dance/banner.png" alt="">
</div>
</div>
<div class="img-header" style="width: 20%">
<el-row style="height: 50%;">
<el-col :span="12">
<div class="card">
<img src="@/assets/dance/banner.png" alt="">
</div>
</el-col>
<el-col :span="12">
<div class="card">
<img src="@/assets/dance/banner.png" alt="">
</div>
</el-col>
</el-row>
<div style="height: 50%;">
<div class="card">
<img src="@/assets/dance/banner.png" alt="">
</div>
</div>
</div>
<div class="img-header" style="width: 20%">
<div class="card">
<img src="@/assets/dance/banner.png" alt="">
</div>
</div>
<div class="img-header" style="width: 20%">
<el-row style="height: 50%">
<el-col :lg="12" :md="8" :sm="12" :xs="24" >
<div class="card">
<img src="@/assets/dance/banner.png" alt="">
</div>
</el-col>
<el-col :span="12">
<div class="card">
<img src="@/assets/dance/banner.png" alt="">
</div>
</el-col>
</el-row>
<div style="height: 50%;">
<div class="card">
<img src="@/assets/dance/banner.png" style="width: 100%;height: 100%" alt="">
<div class="img-hover">
查看相册 (12) >
</div>
</div>
</div>
</div>
</el-row>
<el-card class="mt30" v-loading="loading">
<el-row v-if="form" class="hotel" align="middle" :gutter="20">
<!-- <el-col :span="6">-->
<!-- <img class="w100" :src="fillImgUrl(form.photos?.split(',')[0])"/>-->
<!-- </el-col>-->
<el-col :span="16">
<h3 class="esp flex">{{ form?.name }}
<div class="starBox">
<img v-for="i in Number(form?.starLevel||0)" src="@/assets/booking/star.png">
</div>
</h3>
<div class="tagbox">
<span v-for="(t,index) in form?.label?.split(',')" v-show="index<4">{{ t }}</span>
<a v-show="form?.label?.split(',').length>4">{{ language == 0 ? '更多' : 'MORE' }} ></a>
</div>
<div>
<el-icon></el-icon>
<span class="mr10">{{ language == 0 ? '入住时间' : 'Check-in' }}{{ form?.checkInTime }}</span>
<span>{{ language == 0 ? '离店时间' : 'Check-out' }}{{ form?.checkOutTime }}</span>
</div>
<div v-if="form?.introduction" class="flex esp">
<el-icon></el-icon>
{{ language == 0 ? '酒店简介' : 'Introduction' }}<span v-html="form.introduction.toString()"></span>
</div>
<!-- <p class="esp addr">-->
<!-- <el-icon size="16" style="position: relative;top: 2px" color="#929AA0"><LocationFilled /></el-icon>-->
<!-- {{form?.address}}-->
<!-- </p>-->
</el-col>
<el-col :span="8" class="text-right">
<div class="mapBox">
<div id="map"></div>
</div>
</el-col>
</el-row>
<el-empty v-else :image="`/img/order_no.png`" :image-size="228" description=""/>
</el-card>
<div class="mt30">
<el-row :gutter="20">
<el-col v-for="(p,index) in form?.photos?.split(',')" :span="index==0?12:6">
<div class="imgbox hotelImg">
<img :src="fillImgUrl(p)">
</div>
</el-col>
</el-row>
</div>
<el-card class="mt30 mb60">
<div class="lineHead">
<ul>
<li>{{ language == 0 ? '房型选择' : 'Available Rooms' }}</li>
</ul>
</div>
<div>
<div v-for="(r,index) in roomList" :key="index" class="room">
<el-row :gutter="30" align="middle">
<el-col :span="4">
<div class="roomImg">
<img :src="fillImgUrl(r.photo?.split(',')[0])">
</div>
</el-col>
<el-col :span="14">
<h3 class="name">{{ r.roomType }}</h3>
<el-row :gutter="10">
<el-col :span="8">{{ r.area }}</el-col>
<el-col :span="8" v-show="r.windowFlag==1"> {{ language == 0 ? '有窗' : 'With windows' }}</el-col>
<el-col :span="8" v-show="r.windowFlag==0"> {{ language == 0 ? '无窗' : 'Windowless' }}</el-col>
<el-col :span="8" v-show="r.bathroomFlag==1"> {{ language == 0 ? '热水洗浴' : 'Shower' }}</el-col>
<!-- <text v-show="r.bathroomFlag==0"> </text> -->
<el-col :span="8" v-show="r.addBedFlag==1"> {{ language == 0 ? '允许加床' : 'Extra bed' }}</el-col>
<el-col :span="8" v-if="r.breakfastNum&&r.breakfastNum > '0'">
{{ r.breakfastNum }}{{ language == 0 ? '份早餐' : ' breakfasts' }}
</el-col>
<el-col :span="8" v-else>{{ language == 0 ? '无早餐' : 'No breakfast' }}</el-col>
</el-row>
</el-col>
<el-col :span="3">
<div class="price">{{
language == 0 ? '¥' : '€'
}}<span>{{ language == 0 ? r.roomPrice : r.roomPriceEn }}</span></div>
</el-col>
<el-col :span="3">
<div class="bg-lineg" v-if="language==0" @click="goOrder(r)">
<div>{{ language == 0 ? '在线付' : 'Online' }}</div>
</div>
<el-button v-else class="btn-lineG w100" round type="primary" @click="goOrder(r)">Select</el-button>
<!-- <div class="text-center text-primary mt10 fontsize14 pointer" v-if="language == 0">-->
<!-- 剩余 {{(r.roomCount - (r.useCount||0)).toFixed()}} 间-->
<!-- </div>-->
<!-- <div class="text-center text-primary mt10 fontsize14" v-else>-->
<!-- {{(r.roomCount - (r.useCount||0)).toFixed()}} Remaining rooms-->
<!-- </div>-->
</el-col>
</el-row>
</div>
<el-empty v-if="roomList.length == 0" :image="`/img/order_no.png`" :image-size="228" description=""/>
</div>
</el-card>
</div>
</div>
</template>
<script setup lang="ts">
import {useRouter} from "vue-router";
import {ref, reactive, onMounted} from "vue";
import {useRoute} from "vue-router";
import {getHotelById, getHotelRooms} from "@/apiPc/booking"
import {useStorage} from "@vueuse/core/index";
import useUserStore from "@/store/modules/user";
const user = useUserStore().user
const language = useStorage('language', 0)
const router = useRouter()
const route = useRoute()
const form = ref({})
const query = ref({
hotelId: route.query.id
})
const loading = ref(false)
const roomList = ref([])
const map = ref(null)
onMounted(() => {
// getData()
})
function getData() {
loading.value = true
getHotelById(route.params.hotelId).then(res => {
loading.value = false
form.value = res.data
initMap()
}).catch(err => {
console.log(err)
})
query.value.hotelId = route.query.id
getHotelRooms(query.value).then(res => {
roomList.value = res.rows
})
}
function initMap() {
const TMap = (window as any).TMap
var center = new TMap.LatLng(form.value.latitude, form.value.longitude);//设置中心点坐标'
var map = new TMap.Map("map", {
center: center,//设置地图中心点坐标
zoom: 17, //设置地图缩放级别
});
var infoWindowLocation = new TMap.LatLng(form.value.latitude, form.value.longitude);//创建一个坐标
//创建InfoWindow实例,并进行初始化
var infowindow = new TMap.InfoWindow({
content: form.value.address, //信息窗口内容
position: infoWindowLocation,//显示信息窗口的坐标
map: map,
offset: {x: 0, y: -32}
});
infowindow.close();
var marker = new TMap.MultiMarker({
map: map,
//样式定义
styles: {
"myStyle": new TMap.MarkerStyle({
"anchor": {x: 16, y: 32}
})
},
//点标记数据数组
geometries: [{
"id": "1", //点标记唯一标识,后续如果有删除、修改位置等操作,都需要此id
// "styleId": 'myStyle', //指定样式id
"position": new TMap.LatLng(form.value.latitude, form.value.longitude), //点标记坐标位置
"properties": {//自定义属性
"title": form.value.name
}
}
]
})
marker.on("click", function (evt) {
//设置infoWindow
infowindow.open(); //打开信息窗
infowindow.setPosition(evt.geometry.position);//设置信息窗位置
})
}
function goOrder(room) {
if (!user) {
useUserStore().setReLogin()
return
}
router.push({
name: 'hotelOrder',
params: {
roomId: room.id
},
query: {
room: encodeURIComponent(JSON.stringify(room)),
hotelName: form.value.name,
checkInTime: form.value.checkInTime
}
})
}
</script>
<style scoped lang="scss">
.room {
background: #FAFBFD;
margin: 20px 0 0;
padding: 20px;
border: 1px solid #E5E5E5;
.name {
font-size: 20px;
margin: 0 0 10px;
}
.roomImg {
aspect-ratio: 16/9;
border-radius: 10px;
overflow: hidden;
img {
width: 100%;
object-fit: cover;
object-position: center;
height: 100%;
}
}
.price {
color: #FF8124;
font-size: 24px;
span {
font-size: 36px;
font-family: "DIN Alternate"
}
}
.bg-lineg {
margin: auto;
border-radius: 10px;
text-align: center;
padding: 7px 2px 2px;
font-size: 24px;
width: 66px;
cursor: pointer;
div {
background: #fff;
font-size: 13px;
border-radius: 20px;
padding: 0 10px;
color: #453DEA;
font-weight: 500;
}
}
}
.zh-title {
font-size: 24px;
font-weight: 500;
margin-right: 25px;
}
.hotel {
h3 {
margin: 0 0 20px;
}
img.w100 {
object-fit: cover;
aspect-ratio: 16/9
}
.addr {
font-size: 16px;
color: #929AA0;
font-weight: 400;
}
.price {
margin: 0 0 25px;
color: #FF8124;
font-size: 18px;
span {
font-size: 24px;
margin: 0 8px;
font-family: 'DINAlternate-Bold';
font-weight: 600;
}
i {
font-style: normal;
color: #929AA0;
}
}
}
.starBox {
img {
display: inline-block;
margin-right: 4px
}
}
.tagbox {
margin: 15px 0;
a {
color: #AFB5B9;
font-size: 12px;
}
span {
border-radius: 13px;
font-size: 12px;
padding: 4px 10px;
margin-right: 10px;
font-weight: 400;
}
span:nth-child(4n) {
background: rgba(50, 177, 108, 0.2);
color: rgba(50, 177, 108, 1);
}
span:nth-child(4n+1) {
background: rgba(243, 152, 0, 0.2);
color: rgba(243, 152, 0, 1);
}
span:nth-child(4n+2) {
background: rgba(0, 160, 233, 0.2);
color: rgba(0, 160, 233, 1);
}
span:nth-child(4n+3) {
background: rgba(247, 64, 166, 0.2);
color: rgba(247, 64, 166, 1);
}
}
.mapBox {
position: relative;
overflow: hidden;
height: 200px;
#map {
position: relative;
left: -70px;
width: calc(100% + 160px);
}
}
.hotelImg {
border-radius: 10px;
overflow: hidden;
aspect-ratio: 16/9;
img {
object-fit: cover;
object-position: center;
width: 100%;
height: 100%;
}
}
.sign {
padding-top: 2px;
}
.img-header {
height: 270px;
img {
border-radius: 10px;
width: 100%;
height: 100%;
}
}
.card {
padding: 10px;
width: 100%;
height: 100%;
position: relative;
img{object-fit: cover}
}
.img-hover{
position: absolute;
top: 0;
left: 0;
background-color: rgb(0,0,0,.5);
color: #fff;
font-size: 18px;
font-weight: 400;
width: 100%;
height: 100%;
line-height: 115px;
text-align: center;
border-radius: 10px;
//display: none;
}
</style>
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!