2025最新款研发uniapp+vue3 setup+pinia2+uv-ui搭建跨端仿携程app酒店预约模板。
vue3-uniapp-hotel最新原创实战
uniapp+vite5+vue3+pinia2+uni-ui跨多端旅行酒店预约系统应用。实现首页、酒店预订搜索、列表/详情、订单、聊天客服消息、我的等功能模块。支持编译到h5+小程序+app端。



技术栈
- 开发工具:HbuilderX 4.84
- 技术框架:uni-app+vite5+vue3
- 状态管理:pinia2
- UI组件库:uni-ui+uv-ui(uniapp+vue3组件库)
- 弹框组件:uv3-popup(基于uniapp+vue3多端弹窗组件)
- 自定义组件:uv3-navbar导航条+uv3-tabbar菜单栏
- 缓存技术:pinia-plugin-unistorage
- 支持运行:web+小程序+app端



项目结构目录
使用最新跨平台技术uni-app+vue3搭建项目模板。

uni-vue3hotel酒店预订系统已经更新到我的原创作品小店,感谢支持!
uniapp+vue3+pinia2+uvui跨多端酒店预订app系统

项目入口main.js
import { createSSRApp } from 'vue'
import App from './App'
// 引入pinia状态管理
import pinia from '@/pinia'
export function createApp() {
const app = createSSRApp(App)
app.use(pinia)
return {
app,
pinia
}
}
公共布局结构

<script setup>
// #ifdef MP-WEIXIN
defineOptions({
options: { virtualHost: true }
})
// #endif
const props = defineProps({
// 是否显示自定义tabbar
showTabBar: { type: [Boolean, String], default: false },
})
const handleChange = (index) => {
if(index == 2) {
uni.showToast({
icon: 'none',
title: '自定义功能'
})
}
}
</script>
<template>
<view class="uv3__container flexbox flex-col flex1">
<!-- 顶部插槽 -->
<slot name="header" />
<!-- 内容区 -->
<view class="uv3__scrollview flex1" :style="{'padding-bottom': showTabBar ? '50px' : 0}">
<slot />
</view>
<!-- 底部插槽 -->
<slot name="footer" />
<!-- tabbar栏 -->
<uv3-tabbar :show="showTabBar" transparent zIndex="99" @change="handleChange" />
</view>
</template>



uni-vue3-hotel还支持运行到web端,页面居中展示750px宽度布局结构。







uni-app+vue3自定义navbar+tabbar组件


Navbar组件配置参数
const props = defineProps({
// 是否是自定义导航
custom: { type: [Boolean, String], default: false },
// 是否显示返回
back: { type: [Boolean, String], default: true },
// 标题
title: { type: [String, Number], default: '' },
// 标题颜色
color: { type: String, default: '#fff' },
// 背景色
bgcolor: { type: String, default: '#07c160' },
// 标题字体大小
size: { type: String, default: null },
// 标题是否居中
center: { type: [Boolean, String], default: false },
// 是否搜索
search: { type: [Boolean, String], default: false },
// 是否固定
fixed: { type: [Boolean, String], default: false },
// 是否背景透明
transparent: { type: [Boolean, String], default: false },
// 设置层级
zIndex: { type: [Number, String], default: '2023' },
// 自定义iconfont字体图标库前缀
customPrefix: { type: String, default: 'uv3trip-icon' },
// 自定义样式
customStyle: String,
})

Tabbar组件配置参数
const props = defineProps({
// 是否是自定义导航
custom: { type: [Boolean, String], default: false },
// 是否显示返回
back: { type: [Boolean, String], default: true },
// 标题
title: { type: [String, Number], default: '' },
// 标题颜色
color: { type: String, default: '#fff' },
// 背景色
bgcolor: { type: String, default: '#07c160' },
// 标题字体大小
size: { type: String, default: null },
// 标题是否居中
center: { type: [Boolean, String], default: false },
// 是否搜索
search: { type: [Boolean, String], default: false },
// 是否固定
fixed: { type: [Boolean, String], default: false },
// 是否背景透明
transparent: { type: [Boolean, String], default: false },
// 设置层级
zIndex: { type: [Number, String], default: '2023' },
// 自定义iconfont字体图标库前缀
customPrefix: { type: String, default: 'uv3trip-icon' },
// 自定义样式
customStyle: String,
})




























uniapp酒店预订模板



<!-- 日历 -->
<uv3-popup
v-model="isVisibleCalendar"
title="选择日期"
position="bottom"
round
xclose
xposition="left"
:customStyle="{'overflow': 'hidden'}"
@open="showCalendar=true"
@close="showCalendar=false"
>
<uv-calendars
v-if="showCalendar"
ref="calendarRef"
mode="range"
insert
color="#ffaa00"
:startDate="startDate"
:endDate="endDate"
:date="rangeDate"
:selected="dingDate"
title="选择日期"
start-text="入住"
end-text="离店"
@change="handleCalendarChange"
/>
</uv3-popup>
使用uv-ui组件库中的日历组件。
/**
* 日期参数
*/
const isVisibleCalendar = ref(false)
const showCalendar = ref(false)
const calendarRef = ref(null)
const nightNum = ref(1)
// 限制日期选择范围-开始日期
const startDate = ref(getDate(new Date()).fullDate)
// 限制日期选择范围-结束日期
const endDate = ref(getDate(new Date(), 90).fullDate)
// 自定义默认选中日期,不传默认为今天。mode="multiple"或mode="range"时,该值为数组
const rangeDate = ref([getDate(new Date()).fullDate, getDate(new Date(), 1).fullDate])
// 打点,期待格式[{date: '2019-06-27', info: '签到', disable: false}]
const dingDate = ref([
{
date: getDate(new Date(), 3).fullDate,
info: '已预订',
infoColor: '#ffaa00',
badge: true
},
{
date: getDate(new Date(), 4).fullDate,
info: '已满',
disable: true,
},
{
date: getDate(new Date(), 5).fullDate,
info: '优惠',
infoColor: '#19be6b',
topinfo: '¥99',
topinfoColor: '#19be6b'
},
{
date: getDate(new Date(), 7).fullDate,
info: '有空房',
infoColor: '#09f',
},
])
uniapp-hotel消息模块

可以去看看下面的这篇uniapp+vue3仿微信app聊天项目。
最新研发uni-app+vue3+uv-ui跨三端仿微信app聊天应用【h5+小程序+app端】


Tauri2-Vite7Admin客户端管理后台|tauri2.9+vue3+element-plus后台系统
基于tauri2+vite7.1+vue3 setup+pinia3+element-plus电脑端聊天系统
基于Electron38.2+Vite7+Vue3+ArcoDesign客户端OS系统
最新款Electron38+Vue3+Vite7+ElementPlus客户端中后台管理系统
Electron38-Vue3Chat电脑端聊天|vite7+electron38+pinia3仿微信
最新版vite7-vue3-webos网页版仿macos系统|Vite7+Pinia3+Arco网页os
vue3.5+pinia3+element-plus仿微信网页web版聊天室
基于uniapp+vue3跨端手机admin管理系统uniapp-vue3os
2025跨端uniapp+vue3+uv-ui实战仿微信app聊天模板
基于flutter3.32+window_manager+get仿macOS/wins桌面os系统
最新flutter3.27+get+bitsdojo_window电脑版仿微信聊天EXE
基于uni-app+vue3+pinia2+uv-ui仿抖音app短视频+聊天+直播商城系统
基于uni-app+vue3+deepseek+uv-ui仿DeepSeek流式AI聊天模板
基于Vite6+Deepseek+ArcoDesign+Markdown构建网页版AI流式
flutter3.27实战抖音app商城|flutter3.x+getX仿抖音短视频+直播+聊天app
自研tauri2.0-vue3-os桌面端仿macos系统|Vite6+Tauri2.x+Arco客户端os

7400

被折叠的 条评论
为什么被折叠?



