feat:完善功能

This commit is contained in:
zjc
2025-02-28 20:35:15 +08:00
parent 3832e3617f
commit ccaf3c4e12
8 changed files with 57 additions and 29 deletions

10
src/api/hotel.js Normal file
View 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
})
}

View File

@@ -227,7 +227,7 @@
},
handleHlsError(data) {
console.error('HLS Error:', data)
// console.error('HLS Error:', data)
if (data.fatal) {
switch (data.type) {
case Hls.ErrorTypes.NETWORK_ERROR:

View File

@@ -71,6 +71,7 @@
import { getWeatherApi } from '@/api/home'
import { getSpotListApi } from '@/api/sentiment'
import { getHotelListApi } from '@/api/hotel'
import pubSub from 'pubsub-js'
@@ -138,6 +139,9 @@
case '/monitor':
pubSub.publish('monitorChange', item)
break
case '/hotel':
pubSub.publish('hotelChange', item)
break
}
}
}
@@ -247,26 +251,14 @@
]
isBack.value = true
break
case '/hotel':
title.value = '酒店管理'
isSkip.value = false
current.vlaue = ''
isBack.value = true
navLeft.value = [
{
name: '酒店一'
},
{
name: '酒店二'
},
{
name: '酒店三'
},
{
name: '酒店四'
}
]
let hotelRes = await getHotelListApi()
navLeft.value = hotelRes.data
pubSub.publish('hotelChange', hotelRes.data[0])
break
}
}
@@ -368,8 +360,13 @@
font-weight: 600;
font-size: vw(28);
text-align: center;
padding: 0 vw(30);
color: rgba(208, 236, 255, 0.9);
background-size: 100% 100%;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
white-space: nowrap;
.icon {
width: vw(18);
height: vw(18);

View File

@@ -11,6 +11,11 @@
<script setup>
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({
title: {
type: String,

View File

@@ -3,14 +3,14 @@
<div class="info-header">
<img src="@/assets/images/icon-12.png" alt="" />
<div class="info-header__content">
<h2>阔越云栖酒店(奉节高铁站店)</h2>
<h2>{{ info?.name }}</h2>
<div>
<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>
<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>
<img class="info-header__icon" src="@/assets/images/phone.png" alt="" />
@@ -25,7 +25,7 @@
<span>房间数</span>
</div>
<div class="statistic-item__value">
<countup :end-val="200" />
<countup :end-val="info?.roomNum" />
<span></span>
</div>
</div>
@@ -35,7 +35,7 @@
<span>床位数</span>
</div>
<div class="statistic-item__value">
<countup :end-val="640" />
<countup :end-val="info?.bedCount" />
<span></span>
</div>
</div>
@@ -45,7 +45,7 @@
<span>车位数</span>
</div>
<div class="statistic-item__value">
<countup :end-val="1000" />
<countup :end-val="info?.parkingSpace" />
<span></span>
</div>
</div>
@@ -55,7 +55,7 @@
<span>空余房间数</span>
</div>
<div class="statistic-item__value">
<countup :end-val="10" />
<countup :end-val="info?.remainingRooms" />
<span></span>
</div>
</div>
@@ -65,7 +65,7 @@
<span>空余床位</span>
</div>
<div class="statistic-item__value">
<countup :end-val="15" />
<countup :end-val="info?.remainingBedCount" />
<span></span>
</div>
</div>
@@ -73,13 +73,11 @@
<div class="desc-box">
<title2 title="酒店简介" />
<div class="desc-container">
<p class="desc-content">
酒店位于奉节县西部新区夔州街道诗诚西路1992号一家拥有独立茶室餐厅健身房洗衣房棋牌室集住宿餐厅娱乐为一体的高档酒店酒店距离奉节高铁站仅10分钟车程距离人民广场步行街驾车20分钟距离白帝城瞿塘峡景区夔州古城夔州博物馆驾车约30分钟三峡之巅约1个小时我们为您提供优质的早餐服务和24小时的管家服务洗衣服务拥有亲子房影院房浴缸房套房等多种房型每个房间内都配有小度智能客控可以语音控制所有家电空调电视窗帘灯光等只为给您带来更舒适的入住体验是您旅游商务出行的不二选择在这里您可以在茶室择一芳茶席沏一壶清茶一起看云卷云舒静看花开花落不争不急也可以在棋牌室里和朋友一起玩转机麻还可以在健身房里挥洒汗水塑造自我挑战自我我们在这里欢迎您的到来
</p>
<div class="desc-content" v-html="info?.introduction"></div>
<div>
<el-carousel indicator-position="outside">
<el-carousel-item v-for="item in 4" :key="item">
<el-image class="cover-item" :src="map"></el-image>
<el-carousel-item v-for="item in info?.banner" :key="item">
<el-image class="cover-item" :src="`http://192.168.77.200/fjtcc-api${item}`" />
</el-carousel-item>
</el-carousel>
</div>
@@ -91,6 +89,24 @@
<script setup>
import countup from 'vue-countup-v3'
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>
<style scoped lang="scss">