makeUp.vue
4.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<template>
<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 :gutter="20" class="mb20">
<el-col :lg="8" :md="8" :sm="12" :xs="24" v-for="(n,index) in list" :key="index">
<el-card class="mb20 mitem">
<div class="imgbox"><img/>
<span>30 个时间段可预约</span>
</div>
<div class="info">
<h3>Mango美妆工作室</h3>
<div class="tagbox">
<span>专业团队</span>
<span>大牌化妆品</span>
<span>金牌化妆师</span>
<span>连锁</span>
</div>
<p class="esp">
<span>
<el-icon><OfficeBuilding /></el-icon>
成立<i class="text-primary">6</i>年
</span>
<span>
<el-icon><User /></el-icon>
<i class="text-primary">12</i>名化妆师
</span>
</p>
<p class="esp"><el-icon><Iphone /></el-icon>
800-820-8820
</p>
<p class="esp"><el-icon><Location /></el-icon>
江苏无锡梁溪区南长街5D-601
</p>
<div class="text-center mt20">
<el-button @click="goDetail(n)" round type="primary" class="btn-lineG fs18 w50" size="large">
立即预约   <el-icon class="rotate90_180"> <sort-down/></el-icon>
</el-button>
</div>
</div>
</el-card>
</el-col>
</el-row>
</div>
</div>
</template>
<script setup>
import {getStudioList} from "@/apiPc/booking"
import {onMounted} from "@vue/runtime-core"
import {useRoute, useRouter} from "vue-router"
import {useStorage} from "@vueuse/core/index";
const language= useStorage('language',0)
const router = useRouter()
const route = useRoute()
const list = ref([{id:'0'},{id:'1'},{id:'2'},{id:'3'}])
const loading = ref(false)
const query = ref({
})
onMounted(()=>{
query.value.activityId = route.params.cptId
// getList()
})
function getList() {
loading.value = true
getStudioList(query.value).then(res=>{
list.value = res.rows
loading.value = false
}).catch(err=>{
loading.value = false
})
}
function goDetail(n) {
router.push({
name:'studioDetail',
params:{
studioId: n.id
}
})
}
</script>
<style scoped lang="scss">
.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;}
}
.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);}
}
.mitem{
.imgbox{aspect-ratio: 16/9;background: rgba(129, 122, 234, 0.7);
position: relative;
span{position: absolute;color: #fff;font-weight: 400;bottom: 0;right: 0;
font-size: 14px;background: rgba(0,0,0,0.45);
border-radius: 16px 0 0 0;padding:4px 14px;
}
}
.info{
p{font-weight: 400;margin: 7px 0;
font-size: 14px;
color: #929AA0;
i{font-style: normal;}
}
span{margin-right: 10px;
i.text-primary{padding: 0 4px;}
}
.el-icon{position: relative;top:2px;margin-right: 4px;}
}
}
</style>