makeUpDetail.vue
10.8 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
<template>
<div>
<div class="box">
<el-card>
<el-row>
<div class="zh-title">{{ form.name }}</div>
<div class="tagbox esp">
<span v-for="(t,index) in form.label?.split(',')" v-show="index<4">{{t}}</span>
</div>
</el-row>
<el-row class="hz-row">
<el-icon size="16" style="position: relative;top: 2px" color="#929AA0">
<OfficeBuilding/>
</el-icon>
{{ language==0?'成立':'Established for'}} <span class="sign">6</span>{{language==0?'年':'years'}} |
<el-icon size="16" style="position: relative;top: 2px" color="#929AA0">
<UserFilled/>
</el-icon>
<span class="sign"> {{ form.dresserLimit }}</span>{{language==0?'名化妆师':'makeup artists' }} |
<el-icon size="16" style="position: relative;top: 2px" color="#929AA0">
<PhoneFilled/>
</el-icon>
<span style="padding-top: 2px">
{{ form.contact }}
</span>
|
<el-icon size="16" style="position: relative;top: 2px" color="#929AA0">
<LocationFilled/>
</el-icon>
{{form.rearks}}
</el-row>
</el-card>
<br>
<!-- <el-row justify='space-between'>-->
<!-- <div class="img-header" style="width: 40%">-->
<!-- <div class="card">-->
<!-- <el-image style="width: 100%" :src="fillImgUrl(form.photos)?.split(',')[0]" fit="none" :preview-src-list="form?.photos?.split(',')"/>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="img-header" style="width: 20%">-->
<!-- <el-row style="height: 50%;">-->
<!-- <el-col :span="12">-->
<!-- <div class="card">-->
<!-- <el-image :src="fillImgUrl(form.photos)?.split(',')[0] " fit="cover" :preview-src-list="form?.photos?.split(',')"/>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="12">-->
<!-- <div class="card">-->
<!-- <el-image :src="fillImgUrl(form.photos)?.split(',')[0] " fit="cover" :preview-src-list="form?.photos?.split(',')"/>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <div style="height: 50%;">-->
<!-- <div class="card">-->
<!-- <el-image :src="fillImgUrl(form.photos)?.split(',')[0] " fit="cover" :preview-src-list="form?.photos?.split(',')"/>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="img-header" style="width: 20%">-->
<!-- <div class="card">-->
<!-- <el-image :src="fillImgUrl(form.photos)?.split(',')[0] " fit="cover" :preview-src-list="form?.photos?.split(',')"/>-->
<!-- </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">-->
<!-- <el-image :src="fillImgUrl(form.photos)?.split(',')[0] " fit="cover" :preview-src-list="form?.photos?.split(',')"/>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="12">-->
<!-- <div class="card">-->
<!-- <el-image :src="fillImgUrl(form.photos)?.split(',')[0] " fit="cover" :preview-src-list="form?.photos?.split(',')"/>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <div style="height: 50%;">-->
<!-- <div class="card">-->
<!-- <el-image :src="fillImgUrl(form.photos)?.split(',')[0] " fit="cover" :preview-src-list="form?.photos?.split(',')"/>-->
<!--<!– <div class="img-hover">–>-->
<!--<!– 查看相册 (12) >–>-->
<!--<!– </div>–>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </el-row>-->
<div class="mt30">
<el-row :gutter="20">
<el-col :span="10">
<div class="imgbox hotelImg">
<el-image :src="form?.photosList?.[0]" fit="cover" :preview-src-list="form?.photosList"/>
</div>
</el-col>
<el-col :span="14">
<el-row class="h100" :gutter="20">
<el-col :span="8" class="oddmb" v-for="(p,index) in form?.photosList?.slice(1,7)">
<div class="imgbox hotelImg"><el-image :src="p" fit="cover"/></div>
</el-col>
</el-row>
</el-col>
</el-row>
</div>
<br>
<el-card :body-style="{'padding':'20px 20px'}">
<MakeUpCalendar></MakeUpCalendar>
</el-card>
</div>
</div>
</template>
<script setup >
import {useRouter} from "vue-router";
import {ref, reactive, onMounted} from "vue";
import {useRoute} from "vue-router";
import {getHotelById, getHotelRooms} from "@/apiPc/booking"
import * as booking from "@/apiPc/booking"
import {useStorage} from "@vueuse/core/index";
import useUserStore from "@/store/modules/user";
import MakeUpCalendar from "@/viewsPc/booking/component/makeUpCalendar.vue";
import {fillImgUrl} from "/@/utils/ruoyi";
const user = useUserStore().user
const language = useStorage('language', 0)
const router = useRouter()
const route = useRoute()
const form = ref({})
const query = ref({
activityId: route.params.cptId,
studioId:route.params.id
})
const loading = ref(false)
const roomList = ref([])
const map = ref(null)
onMounted(() => {
getData()
})
function getData() {
loading.value = true
booking.makeUpDetail(query.value).then(res => {
loading.value = false
form.value = res.data
form.value.photosList=[]
form.value.photos?.split(',')?.forEach(v=>{
form.value.photosList.push(fillImgUrl(v))
})
console.log(form.value)
// console.log(res)
}).catch(err => {
console.log(err)
})
// query.value.hotelId = route.query.id
// getHotelRooms(query.value).then(res => {
// roomList.value = res.rows
// })
}
// function initMap() {
// const TMap = null
// 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;
}
}
}
.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);
}
}
.sign {
padding-top: 2px;
}
.img-header {
height: 270px;
}
.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;
}
.hotelImg{border-radius: 10px;overflow: hidden;aspect-ratio: 16/9;
img{object-fit: cover;object-position: center;width: 100%;height: 100%;
}
}
.oddmb:nth-child(2){margin-bottom: 20px;}
</style>