feat:完善功能
This commit is contained in:
10
src/api/hotel.js
Normal file
10
src/api/hotel.js
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import request from './request'
|
||||||
|
|
||||||
|
// 获取酒店列表
|
||||||
|
export function getHotelListApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/fjtcc-api/api/largeScreen/hotel/list',
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -227,7 +227,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
handleHlsError(data) {
|
handleHlsError(data) {
|
||||||
console.error('HLS Error:', data)
|
// console.error('HLS Error:', data)
|
||||||
if (data.fatal) {
|
if (data.fatal) {
|
||||||
switch (data.type) {
|
switch (data.type) {
|
||||||
case Hls.ErrorTypes.NETWORK_ERROR:
|
case Hls.ErrorTypes.NETWORK_ERROR:
|
||||||
|
|||||||
@@ -71,6 +71,7 @@
|
|||||||
|
|
||||||
import { getWeatherApi } from '@/api/home'
|
import { getWeatherApi } from '@/api/home'
|
||||||
import { getSpotListApi } from '@/api/sentiment'
|
import { getSpotListApi } from '@/api/sentiment'
|
||||||
|
import { getHotelListApi } from '@/api/hotel'
|
||||||
|
|
||||||
import pubSub from 'pubsub-js'
|
import pubSub from 'pubsub-js'
|
||||||
|
|
||||||
@@ -138,6 +139,9 @@
|
|||||||
case '/monitor':
|
case '/monitor':
|
||||||
pubSub.publish('monitorChange', item)
|
pubSub.publish('monitorChange', item)
|
||||||
break
|
break
|
||||||
|
case '/hotel':
|
||||||
|
pubSub.publish('hotelChange', item)
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -247,26 +251,14 @@
|
|||||||
]
|
]
|
||||||
isBack.value = true
|
isBack.value = true
|
||||||
break
|
break
|
||||||
|
|
||||||
case '/hotel':
|
case '/hotel':
|
||||||
title.value = '酒店管理'
|
title.value = '酒店管理'
|
||||||
isSkip.value = false
|
isSkip.value = false
|
||||||
current.vlaue = ''
|
current.vlaue = ''
|
||||||
isBack.value = true
|
isBack.value = true
|
||||||
navLeft.value = [
|
let hotelRes = await getHotelListApi()
|
||||||
{
|
navLeft.value = hotelRes.data
|
||||||
name: '酒店一'
|
pubSub.publish('hotelChange', hotelRes.data[0])
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '酒店二'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '酒店三'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '酒店四'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -368,8 +360,13 @@
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: vw(28);
|
font-size: vw(28);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
padding: 0 vw(30);
|
||||||
color: rgba(208, 236, 255, 0.9);
|
color: rgba(208, 236, 255, 0.9);
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
word-break: break-all;
|
||||||
|
white-space: nowrap;
|
||||||
.icon {
|
.icon {
|
||||||
width: vw(18);
|
width: vw(18);
|
||||||
height: vw(18);
|
height: vw(18);
|
||||||
@@ -11,6 +11,11 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { RouterView } from 'vue-router'
|
import { RouterView } from 'vue-router'
|
||||||
|
|
||||||
|
import Header from './components/Header/index'
|
||||||
|
import CoreVideo from './components/CoreVideo/index'
|
||||||
|
import Correspondence from './components/Correspondence/index'
|
||||||
|
|
||||||
let props = defineProps({
|
let props = defineProps({
|
||||||
title: {
|
title: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|||||||
@@ -3,14 +3,14 @@
|
|||||||
<div class="info-header">
|
<div class="info-header">
|
||||||
<img src="@/assets/images/icon-12.png" alt="" />
|
<img src="@/assets/images/icon-12.png" alt="" />
|
||||||
<div class="info-header__content">
|
<div class="info-header__content">
|
||||||
<h2>阔越云栖酒店(奉节高铁站店)</h2>
|
<h2>{{ info?.name }}</h2>
|
||||||
<div>
|
<div>
|
||||||
<img class="info-header__icon" src="@/assets/images/address.png" alt="" />
|
<img class="info-header__icon" src="@/assets/images/address.png" alt="" />
|
||||||
<span class="info-header__text">地址:奉节奉节夔州街道诗诚西路1992号附6号</span>
|
<span class="info-header__text">地址:{{ info?.address }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<img class="info-header__icon" src="@/assets/images/user.png" alt="" />
|
<img class="info-header__icon" src="@/assets/images/user.png" alt="" />
|
||||||
<span class="info-header__text">负责人:王民</span>
|
<span class="info-header__text">负责人:{{ info?.principal }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<img class="info-header__icon" src="@/assets/images/phone.png" alt="" />
|
<img class="info-header__icon" src="@/assets/images/phone.png" alt="" />
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
<span>房间数</span>
|
<span>房间数</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="statistic-item__value">
|
<div class="statistic-item__value">
|
||||||
<countup :end-val="200" />
|
<countup :end-val="info?.roomNum" />
|
||||||
<span>间</span>
|
<span>间</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
<span>床位数</span>
|
<span>床位数</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="statistic-item__value">
|
<div class="statistic-item__value">
|
||||||
<countup :end-val="640" />
|
<countup :end-val="info?.bedCount" />
|
||||||
<span>床</span>
|
<span>床</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
<span>车位数</span>
|
<span>车位数</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="statistic-item__value">
|
<div class="statistic-item__value">
|
||||||
<countup :end-val="1000" />
|
<countup :end-val="info?.parkingSpace" />
|
||||||
<span>位</span>
|
<span>位</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
<span>空余房间数</span>
|
<span>空余房间数</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="statistic-item__value">
|
<div class="statistic-item__value">
|
||||||
<countup :end-val="10" />
|
<countup :end-val="info?.remainingRooms" />
|
||||||
<span>间</span>
|
<span>间</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
<span>空余床位</span>
|
<span>空余床位</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="statistic-item__value">
|
<div class="statistic-item__value">
|
||||||
<countup :end-val="15" />
|
<countup :end-val="info?.remainingBedCount" />
|
||||||
<span>床</span>
|
<span>床</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -73,13 +73,11 @@
|
|||||||
<div class="desc-box">
|
<div class="desc-box">
|
||||||
<title2 title="酒店简介" />
|
<title2 title="酒店简介" />
|
||||||
<div class="desc-container">
|
<div class="desc-container">
|
||||||
<p class="desc-content">
|
<div class="desc-content" v-html="info?.introduction"></div>
|
||||||
酒店位于奉节县西部新区夔州街道诗诚西路1992号,一家拥有独立茶室、餐厅、健身房、洗衣房、棋牌室,集住宿、餐厅、娱乐为一体的高档酒店。酒店距离奉节高铁站仅10分钟车程,距离人民广场步行街驾车20分钟,距离白帝城瞿塘峡景区、夔州古城、夔州博物馆驾车约30分钟,三峡之巅约1个小时。我们为您提供优质的早餐服务和24小时的管家服务,洗衣服务,拥有亲子房、影院房、浴缸房、套房等多种房型,每个房间内都配有小度智能客控,可以语音控制所有家电(空调、电视、窗帘、灯光等),只为给您带来更舒适的入住体验,是您旅游、商务出行的不二选择。在这里,您可以在茶室择一芳茶席,沏一壶清茶,一起看云卷云舒,静看花开花落,不争不急;也可以在棋牌室里和朋友一起玩转机麻,还可以在健身房里挥洒汗水,塑造自我,挑战自我。我们在这里欢迎您的到来。
|
|
||||||
</p>
|
|
||||||
<div>
|
<div>
|
||||||
<el-carousel indicator-position="outside">
|
<el-carousel indicator-position="outside">
|
||||||
<el-carousel-item v-for="item in 4" :key="item">
|
<el-carousel-item v-for="item in info?.banner" :key="item">
|
||||||
<el-image class="cover-item" :src="map"></el-image>
|
<el-image class="cover-item" :src="`http://192.168.77.200/fjtcc-api${item}`" />
|
||||||
</el-carousel-item>
|
</el-carousel-item>
|
||||||
</el-carousel>
|
</el-carousel>
|
||||||
</div>
|
</div>
|
||||||
@@ -91,6 +89,24 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import countup from 'vue-countup-v3'
|
import countup from 'vue-countup-v3'
|
||||||
import map from '@/assets/images/map-img-1.jpg'
|
import map from '@/assets/images/map-img-1.jpg'
|
||||||
|
|
||||||
|
import pubSub from 'pubsub-js'
|
||||||
|
import { cloneDeep } from 'lodash'
|
||||||
|
|
||||||
|
let hotelChange = null
|
||||||
|
let info = ref(null)
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
hotelChange = PubSub.subscribe('hotelChange', (msg, data) => {
|
||||||
|
let newData = cloneDeep(data)
|
||||||
|
newData.banner = newData.banner ? newData.banner.split(',') : []
|
||||||
|
info.value = newData
|
||||||
|
console.log(info.value, 'info.value')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
onUnmounted(() => {
|
||||||
|
if (hotelChange) PubSub.unsubscribe(hotelChange)
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
Reference in New Issue
Block a user