73dc0e6e by zhangmeng

化妆

1 parent 85059f20
......@@ -207,3 +207,27 @@ export function delAddress(ids) {
method: 'delete'
})
}
export function getMakeUpList(data) {
return request({
url: `/ota/activityStudio/getStudioList`,
method: 'get',
params:data
})
}
export function makeUpDetail(data) {
return request({
url: `/ota/activityStudio/getComStudioVoById`,
method: 'get',
params:data
})
}
export function getMealConfList(data) {
return request({
url: `/ota/mealConfig/getMealConfList`,
method: 'get',
params:data
})
}
......
......@@ -410,6 +410,12 @@ export const constantRoutes = [
meta: { title: 'Makeup Appointment' }
},
{
path: 'makeUp/:cptId/:id/:orderId',
component: () => import('@/viewsPc/booking/makeUpOrder.vue'),
name: 'makeUpOrder',
meta: { title: 'Makeup Reservation' }
},
{
path: 'photography/:cptId',
component: () => import('@/viewsPc/booking/photography'),
name: 'photography',
......
<template>
<div >
<el-calendar v-model="currentDate" :range="calendarRange">
<template #header="{data}">
<el-row style="width: 100%">
<el-col :span="7">
{{data}}
</el-col>
<el-col :span="10">
<el-row justify="center" align='middle' >
<div class="canBtn"><el-icon><ArrowLeftBold /></el-icon></div>
<div>
<el-date-picker
v-model="value2"
type="datetimerange"
range-separator="-"
start-placeholder="Start date"
end-placeholder="End date"
size="small"
/>
</div>
<div class="canBtn"><el-icon><ArrowRightBold /></el-icon></div>
</el-row>
</el-col>
<el-col :span="7">
<div style="text-align: right;padding-right: 10px">
<el-date-picker
v-model="currentDate"
type="datetime"
placeholder="YYYY-MM-DD"
size="small"
@change="dateChange"
/>
</div>
</el-col>
</el-row>
</template>
<template #date-cell="data">
<div :class="data.data.day==query.currentDate?'primaryDate date':'date'" @click="selectDate(data.data.day)">
{{ data.data.day.slice(8, 10) }}
</div>
</template>
</el-calendar>
<div class="calendarList">
<ul v-loading="loading">
<li v-for="n in schList" :key="n.id" @click="goMatch(n)">
<el-row style="width: 100%">
<div style="margin-right: 25px">
<el-image style="width: 90px;height: 115px" src="@/assets/dance/banner.png" fit="cover" />
</div>
<div style="flex: 1" >
<div class="hz-title">A套餐</div>
<div>
<el-row justify="space-between">
<el-row class="hz-p">
<div style="margin-right: 80px">项目: <span style="margin-right: 20px">发型x1</span> <span>化妆x1</span> </div>
<div style="margin-right: 80px">服务: 化妆x1 </div>
<div>剩余 <span class="sign">6</span>名额 </div>
</el-row>
<el-row>
<div class="zh-margin" style="font-size: 36px;color: #ff8124"><span style="font-size: 24px"></span> 120</div>
<el-button class="btn-lineG w200px" round type="primary" size="large">{{ language==0?'立即预约':'Select' }} ⇀</el-button>
</el-row>
</el-row>
</div>
</div>
</el-row>
</li>
</ul>
<el-empty v-if="schList.length== 0"
style="--el-empty-padding:0;--el-empty-description-margin-top:0"
:image="`/img/order_no.png`"
:image-size="200"/>
</div>
</div>
</template>
<script setup>
import {ref} from "vue";
import {dayjs} from "element-plus";
import {useRoute,useRouter} from 'vue-router'
import * as booking from "@/apiPc/booking"
import {useStorage} from "@vueuse/core/index";
const language = useStorage('language', 0)
const router = useRouter()
const route=useRoute()
const currentDate = ref(new Date())
const calendarRange = ref([dayjs('2024-07-17').toDate(), dayjs('2024-07-17').toDate()])
const schList = ref([])
const loading = ref(false)
const query = ref({
currentDate: dayjs(new Date()).format('YYYY-MM-DD') ,
// id:route.params.id
})
const value1=ref('')
const value2=ref('')
getScheduleList()
function getScheduleList() {
loading.value = true
// query.value.currentDate = dayjs(query.value.currentDate).format('YYYY-MM-DD')
booking.getMealConfList(query.value).then(res=>{
loading.value = false
schList.value = res.data
})
}
function selectDate(date) {
console.log(dayjs(date).format('YYYY-MM-DD'))
query.value.currentDate = dayjs(date).format('YYYY-MM-DD')
console.log(currentDate.value)
getScheduleList()
}
function dateChange(){
query.value.currentDate = dayjs(currentDate.value).format('YYYY-MM-DD')
getScheduleList()
}
function goMatch(n) {
router.push({
name: 'makeUpOrder',
params: {
orderId: n.cptId
},
query: {
matchId: n.cptId
}
})
}
</script>
<style scoped lang="scss">
.el-calendar {
--el-calendar-border: none;
--el-calendar-cell-width: 40px;
text-align: center;
--el-text-color-regular: #8E8D94;
:deep(.el-calendar__header) {
justify-content: center;
padding: 0 0 10px
}
:deep(.el-calendar__body) {
border: 1px solid #F0F0F0;
padding: 0
}
:deep(.el-calendar-table .el-calendar-day) {
padding: 1px;
}
:deep(.el-calendar-table td.is-selected) {
background: transparent;
}
:deep(.el-calendar__button-group) {
display: none;
}
:deep(.el-calendar-table thead th) {
padding: 5px 0 0
}
.primaryDate {
color: #fff;
background: linear-gradient(90deg, #8623FC, #453DEA);
}
.date {
margin: auto;
border-radius: 50%;
width: 30px;
height: 30px;
line-height: 30px;
font-weight: bold;
}
}
.calendarList {
border: 1px solid #F0F0F0;
padding: 12px 20px;
overflow: auto;
height: 625px;
ul {
li {cursor: pointer;
background: #F6F9FE;
margin: 7px 0 7px 20px;
position: relative;
padding: 13px;
border-radius: 10px;
font-weight: 500;
font-size: 15px;
label {
color: #453DEA;
margin-right: 15px;
&::before {
content: '';
background: #fff;
left: -17px;
top: 0px;
bottom: 0;
margin: auto;
border-radius: 50%;
width: 2px;
height: 2px;
position: absolute;
z-index: 1
}
}
}
li::before {
content: '';
background: linear-gradient(0deg, #8623FC, #453DEA);
border-radius: 50%;
width: 8px;
height: 8px;
position: absolute;
left: -20px;
top: 0;
bottom: 0;
margin: auto;
z-index: 1;
}
li::after {
content: '';
left: -16px;
width: 1px;
height: 100%;
background: #EBEBEB;
position: absolute;
top: 20px
}
//li:hover {
// color: #fff;
// background: linear-gradient(-90deg, #8623FC, #453DEA);
//
// label {
// color: #fff;
// }
//}
}
}
.hz-title{
font-size: 20px;
font-weight: 400;
color: #000;
margin-top:20px;
margin-bottom: 10px;
}
.zh-margin{
font-weight: bold;
font-size: 36px;
color: #FF8124;
margin-right: 30px;
}
.hz-p{
font-size: 16px;
color: #4C5359;
font-weight: 400;
}
:deep(.el-calendar__header) {
background: linear-gradient(90deg, #8623FC, #453DEA);
height: 50px;
line-height: 50px;
}
.canBtn{
color: #453DEA;
border-radius: 2px;
width: 22px;
height: 22px;
line-height: 26px;
text-align: center;
background-color: #fff;
margin: 0 16px 5px 16px;
cursor:pointer
}
</style>
......@@ -13,65 +13,37 @@
</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-col :span="8" v-for="(h,index) in list" class="mb20" >
<el-card style="position: relative;">
<img class="w100 hz-img" :src="fillImgUrl(h.photos?.split(',')[0])"/>
<img class="w100 hz-img" :src="fillImgUrl(h.cover)"/>
<div class="yuyue">
30 个时间段可预约
{{ h.counts }} {{ language==0?'个时间段可预约':"time slots can be reserved" }}
</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-text">{{h.name}}</div>
<div class="tagbox esp">
<span v-for="(t,index) in h.label?.split(',')" v-show="index<4">{{t}}</span>
</div>
<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>名化妆师
<el-icon size="16" style="position: relative;top: 2px" color="#929AA0"><OfficeBuilding /></el-icon>
{{ language==0?'成立':'Established for'}}
<span class="sign">{{ h.ageLimit }}</span>{{language==0?'年':'years'}} |
<el-icon size="16" style="position: relative;top: 2px" color="#929AA0"><UserFilled /></el-icon><span class="sign">{{ h.dresserLimit }}</span>{{language==0?'名化妆师':'makeup artists' }}
</div>
<div class="hz-row">
<el-icon size="16" style="position: relative;top: 2px" color="#929AA0"><LocationFilled /></el-icon>
1535652837
<el-icon size="16" style="position: relative;top: 2px" color="#929AA0"><PhoneFilled /></el-icon>
{{ h.contact }}
</div>
<div class="hz-row">
<el-icon size="16" style="position: relative;top: 2px" color="#929AA0"><LocationFilled /></el-icon>
{{h.address}}
{{h.remarks}}
</div>
<div style="text-align: center">
<el-button class="btn-lineG w200px" round type="primary" size="large">{{ language==0?'立即预约':'Select' }}</el-button>
<el-button class="btn-lineG w200px" round type="primary" size="large" @click="goDetail(h)">{{ language==0?'立即预约':'Select' }}</el-button>
</div>
</el-card>
</el-col>
</el-row>
<!-- <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>
......@@ -84,6 +56,7 @@ import {onMounted} from "@vue/runtime-core"
import * as booking from "@/apiPc/booking"
import {useRouter,useRoute} from "vue-router";
import {useStorage} from "@vueuse/core/index";
import {getMakeUpList} from "@/apiPc/booking";
const router = useRouter()
const route = useRoute()
const language= useStorage('language',0)
......@@ -100,7 +73,7 @@ onMounted(()=>{
function getList() {
loading.value = true
booking.getHotelList(query.value).then(res=>{
booking.getMakeUpList(query.value).then(res=>{
list.value = res.rows
loading.value = false
}).catch(e=>{
......@@ -112,26 +85,13 @@ function goDetail(item) {
name:'makeUpDetail',
params:{
id:item.id,
},
query:{
id:item.id
}
})
}
</script>
<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;
......@@ -143,15 +103,14 @@ function goDetail(item) {
.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;
object-fit: cover;
}
.yuyue{
......@@ -212,12 +171,12 @@ function goDetail(item) {
//}
//.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);}
//}
.tagbox{margin: 10px 0;
a{color: #AFB5B9;font-size: 12px;}
span{border-radius: 13px;font-size: 12px;padding: 3px 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>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!