更新记录

1.0.0(2026-10-23) 下载此版本

本项目仅开源 uni-app 用户端,基于 Vue3,适配网页和微信公众号。用 HBuilderX 导入本目录即可运行,供学习研究。


平台兼容性

uni-app(3.8.7)

Vue2 Vue3 Chrome Safari app-vue app-nvue Android iOS 鸿蒙
- √ - - - - √ √ -
微信小程序 支付宝小程序 抖音小程序 百度小程序 快手小程序 京东小程序 鸿蒙元服务 QQ小程序 飞书小程序 小红书小程序 快应用-华为 快应用-联盟
√ - - - - - - - - - - -

其他

多语言 暗黑模式 宽屏模式 蒸汽模式
× × √ ×

酒店民宿用户端

开源说明

本项目仅开源 uni-app 用户端,基于 Vue3,适配网页和微信公众号。用 HBuilderX 导入本目录即可运行,供学习研究。

能在哪些地方使用

住客可以在电脑或手机的网页里使用,也可以在微信里打开网页使用。酒店、民宿商家也可以在同一套用户端里申请入驻、管理自己的门店、房间和订单。审核通过后的店员可以进入员工中心处理到店核销。

底部有三个主入口:首页、订单、我的。

对接了哪些第三方

下面这些是用户日常能直接感受到的外部服务,不是技术名词堆砌:

  • 地图定位:自动识别当前位置;在地图上选目的地或门店位置;打开手机里的地图去导航。
  • 微信支付:订酒店、订民宿、开通会员、给钱包充值时,可以走微信支付。在手机网页上,需在微信里打开,并用公众号相关账号,才能出现微信支付。
  • 支付宝:同样用于下单付款、充值和开通会员。
  • 钱包余额:平台自己的余额支付,有可用余额时会出现在支付方式里。
  • 手机短信验证码:登录、注册、找回密码时,会往手机号发验证码(由服务端发送)。
  • 企业微信客服:后台若配好了,可跳到企业微信和客服聊天。
  • 电话客服:可直接拨打后台配置的客服电话。
  • 个人微信客服:可复制客服***,或扫客服二维码添加。
  • 手机系统能力:获取定位、打开系统地图导航、拨打电话、复制订单号和***、从相册选头像和门店照片、调用相机扫核销码。

说明:微信小程序、微信里打开的网页,以及手机 App,可以使用微信登录。普通浏览器网页请用手机号验证码或密码登录。

住客能做什么

打开软件先看到什么

  • 可定位当前位置,也可以自己在地图上选目的地。
  • 顶部可切换三类房源:国内、钟点房、民宿。
  • 选入住日期、离店日期,页面会显示共几晚。
  • 可搜索酒店名称、地名或地标,再点「查找房源」。
  • 有轮播广告,点进去可跳到对应内容。
  • 首页按推荐展示房源,能看到封面、名称、评分、标签、地址和起步价,可直接预订。
  • 下拉可刷新首页。

订酒店、订民宿

  • 看酒店或民宿详情(图片、评分、标签、地址、房型、价格、全部评价)。
  • 房型可按类型筛选;会员价会单独标出来。
  • 选入住日期、离店日期、房间数。
  • 从常用信息里选择预订人姓名和手机号,也可以先去添加、编辑入住人。
  • 下单时可选用优惠券;需要发票可勾选并填写抬头、税号等信息。
  • 支付成功后,到店出示订单二维码或条形码办理入住,也可给商家打电话、看地图导航。
  • 订单状态大致包括:待支付、待核销、进行中、已完成、已取消。
  • 待支付取消不会扣服务费;已支付的订单取消前会先提示是否产生费用,确认后再取消。
  • 入住完成后可打分、写评价。

钟点房

  • 首页和酒店列表里可切到「钟点房」,只看有钟点房的门店。
  • 进入门店后同样可以看房型、选日期、填写入住人并下单支付。

付钱怎么付

  • 下单后弹出支付窗口,可选:余额、微信支付、支付宝(按当前打开方式显示,不是每种环境都有微信支付)。
  • 可先选一张优惠券再付款。
  • 支付成功后订单生效;没付完可在订单里继续「支付」。

优惠券、钱包和会员

  • 领券中心领券,我的优惠券里查看已领的券,下单时可以直接选用。
  • 钱包可看全部资金、可用资金和可提现金额;可充值(微信或支付宝)、提现、绑定支付宝或上传微信收款码、看资金明细和提现记录。
  • 可开通或续费会员。会员权益包括专享折扣、身份标识、专属客服和专属奖励,订房时可见会员价。
  • 「我的」里可看收藏和足迹。

发票

  • 下单时可以一并申请开票,填写发票抬头、纳税人识别号、发票类型和开户信息。
  • 「我的」里有发票管理,可申请开票、看开票记录和开票说明。

邀请朋友

  • 邀请好友、看推广中心和收益明细(有推广资格时才会出现推广中心)。
  • 注册时可填邀请码;从分享链接进来也会带上邀请关系。

账号和设置

  • 手机号 + 短信验证码登录(没注册过会自动注册)。
  • 手机号 + 密码登录。
  • 单独注册、忘记密码并重置。
  • 在微信小程序、微信内网页或 App 里,可以用微信登录。
  • 登录前需同意用户协议、隐私政策。
  • 个人中心改头像、改用户名、填年龄(手机号一般不能随意改)。
  • 设置中心:关于我们、用户协议、隐私政策、注销协议、退出登录。
  • 可申请注销账号,确认后不能再使用该账号登录。

订单里还能做什么

  • 订单按状态筛选:全部、待付款、待核销、进行中、待点评、退款/售后。
  • 列表上能区分这单是酒店还是民宿,并看到入住、离店日期和共几晚。
  • 待付款可取消或继续支付。
  • 待核销可打开订单详情,出示二维码和条形码给前台核销。
  • 可看订单号、实付金额、优惠券抵扣、到店地址,联系商家,打开地图导航。
  • 完成后可评价。

消息、客服、帮助

  • 客服按后台配置,可能是:打电话、企业微信、或展示客服***和二维码。
  • 帮助中心看常见问题。
  • 意见反馈可提交建议或投诉。

商家能做什么

  • 在「我的」里申请商家入驻,选择店铺类型(酒店或民宿)。
  • 填写店铺名称、***,用地图点选门店真实位置,上传封面和轮播图,添加店铺标签,提交后看审核结果。审核被拒会显示拒绝原因。
  • 审核通过后进入商家中心:看今日、本月和总收益,切换营业中或已打烊。
  • 看待核销、已完成、已取消的入住订单,看今日预订单,给住客打电话。
  • 输入核销码或打开相机扫码,办理入住;住客离店时可完成退房。
  • 房间:看上架中和已下架的房间,添加房间,管理已发布的房源。
  • 员工:店主可添加员工、看员工列表;员工登录后进入员工中心,协助处理订单和核销。
  • 商户钱包:看可提现收益,并按绑定的收款方式提现。

体验

体验地址:https://jdms.xianmaxiong.com

技术栈

端 技术
用户端 uni-app + Vue3

运行

这份代码已经接到线上体验环境,不用改任何配置,打开后直接运行即可。

开始前请准备

  1. 一台 Windows 电脑(苹果电脑也可以,步骤差不多)。
  2. 下载并安装 HBuilderX(官方用来打开这类项目的软件):
    打开浏览器,搜索「HBuilderX 官网」,进入 https://www.dcloud.io/hbuilderx.html,下载「正式版」,安装后打开。
  3. 建议再装一个 Chrome 浏览器,用来打开运行后的页面。

第一步:拿到文件夹

  1. 如果你收到的是压缩包(例如 zip),先右键「解压到当前文件夹」或「解压到指定文件夹」。
  2. 解压后,请找到名字叫 jiudianminsu_uniapp 的文件夹。里面应该能看到 pages.json、App.vue、common 等文件。
  3. 记住这个文件夹在电脑上的位置,后面要选中它。不要只打开里面某一个文件。

第二步:用 HBuilderX 打开整个项目

  1. 打开已经安装好的 HBuilderX。
  2. 点左上角 「文件」→「打开目录」(有的版本也叫「从本地打开」)。
  3. 选中刚才的 jiudianminsu_uniapp 文件夹,确定。
  4. 左侧出现一长串文件名,就说明打开对了。如果左侧是空的,说明选错了文件夹,请重新选带 pages.json 的那一层。

第三步:用浏览器运行

  1. 在 HBuilderX 顶部菜单点 「运行」→「运行到浏览器」→「Chrome」。
  2. 第一次可能会提示安装浏览器运行插件,点允许或安装,等它装完再重新点一次运行。
  3. 电脑会自动弹出一个网页。出现首页、底部「首页 / 订单 / 我的」,就说明运行成功了。
  4. 如果浏览器问能不能获取位置,点「允许」,首页才能按当前位置查找房源。
  5. 不要关 HBuilderX,关了网页可能会断开。

常见情况说明

  • 点了运行没反应:确认打开的是整个 jiudianminsu_uniapp 文件夹,不是只打开了一个页面文件。
  • 浏览器打开了但是花屏、一直转圈:等十几秒;仍不行就关掉网页,在 HBuilderX 里再点一次运行。
  • 页面是空的、提示加载失败:检查电脑能否打开体验地址 https://jdms.xianmaxiong.com ;如果这个网页本身打不开,用户端也会没数据。
  • 地图不显示或定位失败:需要允许浏览器使用位置。学习看页面时可以先手动选一个目的地。
  • 微信支付、支付宝点了没反应:需要商家自己的支付账号,这份开源代码一般只能看到支付按钮,不能真的完成收款。
  • 客服、短信验证码收不到:这些依赖服务端和第三方账号,界面可以点,功能不一定通。

第一次建议怎么验收

  1. 按第三步在 Chrome 打开。
  2. 能看到首页搜索(国内 / 钟点房 / 民宿)、底部三个按钮。
  3. 点「我的」,能看到登录入口。
  4. 再点「订单」,能进入订单页。
    做到这里,就说明「这份用户端代码已经在你电脑上跑起来了」。

隐私、权限声明

1. 本插件需要申请的系统权限列表:

无

2. 本插件采集的数据、发送的服务器地址、以及数据用途说明:

插件不采集任何数据

3. 本插件是否包含广告,如包含需详细说明广告表达方式、展示频率:

无

许可协议

GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007

Copyright (C) 2007 Free Software Foundation, Inc. http://fsf.org/ Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below.

  1. Additional Definitions.

    As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License.

    "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below.

    An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library.

    A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version".

    The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version.

    The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work.

  2. Exception to Section 3 of the GNU GPL.

    You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL.

  3. Conveying Modified Versions.

    If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version:

    a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or

    b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy.

  4. Object Code Incorporating Material from Library Header Files.

    The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following:

    a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License.

    b) Accompany the object code with a copy of the GNU GPL and this license document.

  5. Combined Works.

    You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following:

    a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License.

    b) Accompany the Combined Work with a copy of the GNU GPL and this license document.

    c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document.

    d) Do one of the following:

    0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.

    1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version.

    e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.)

  6. Combined Libraries.

    You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following:

    a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License.

    b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.

  7. Revised Versions of the GNU Lesser General Public License.

    The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.

    Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation.

    If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.

暂无用户评论。