更新记录

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

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


平台兼容性

uni-app(3.8.10)

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

其他

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

台球助教用户端

开源说明

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

能在哪些地方使用

想打球的人可以在电脑或手机的网页里使用,也可以在微信里打开网页使用。助教上门陪练,人也可以自己选一家球厅到店。

底部有五个主入口:首页、助教、球厅、订单、我的。

先记住这几个词,后面会反复用到:

  • 助教:上门陪你打台球的人。列表里能看到头像、名字、评分、已经服务过多少单、离你多远。
  • 教练:教打球的人。有的服务按钮会写成「选择教练」,用法和选助教一样:先看项目,再选人。
  • 球厅:线下台球门店。能看地址、营业时间、评分和销量,再到店下单。
  • 会员价:开通会员后,同一种服务可以用更低的会员价。没开通就按普通价。
  • 零钱:平台里的余额,付款时可以当钱用。
  • 优惠券:事先领到的券。下单时如果满了使用门槛,可以选一张,少付一部分。
  • 出行费:助教上门才有。按公交、出租或免费来算,页面会写出全程多少公里、起步多少公里、起步价多少、超出后每公里多少钱。到店订单不算这笔钱。
  • 加钟:服务已经开始之后,如果这个项目允许加时间,订单里会出现「加钟/补价」,可以再加一段时长并补差价。
  • 隐私电话:打开之后,你和助教打电话走的是临时号码,页面上不一定露出对方的真实手机号。

对接了哪些第三方

下面这些是打球时能直接碰到的外部服务,按日常使用来写:

  • 腾讯地图:打开后识别当前城市,也可以自己换城市。助教页可以在地图上看附近的人。新增地址时在地图上点选位置。球厅和订单里可以打开地图,导航到门店或上车地点。
  • 微信支付:确认预约后,付款窗口里可以选择微信。手机网页上要在微信里打开,才会真正拉起微信支付。微信小程序里付款也走微信。
  • 支付宝:电脑网页、手机网页和手机 App 里,付款窗口可以选择支付宝。
  • 零钱:平台自己的余额。付款窗口里有「零钱支付」,用账户里的钱付。
  • 优惠券:新用户第一次进来,可能会弹出新人红包,点一下就领券。下单时如果有可用的券,会出现「优惠券」,点进去选一张,也可以「取消使用」。券上会写满多少元才能用、减多少钱、什么时候到期。
  • 手机短信验证码:验证码登录、注册时,会往手机号发一条验证码(由服务端发送)。
  • 微信登录:在微信里打开网页时,如果打开了这个入口,登录页会有「微信一键登录」。手机 App 里可以是「微信登录」。微信小程序里是「授权登录」,还可以授权手机号。登录前要先勾选《隐私政策》和《用户协议》。
  • 企业微信客服:「我的」页面上的客服图,如果配的是企业微信,会跳去和企业微信客服聊天。微信小程序里会打开微信客服会话。
  • 电话客服:如果客服配的是电话,点一下就直接拨打。
  • 客服页面:如果客服配成站内页面,会打开对应的客服页。订单详情底部也有「联系客服」。
  • 给助教或球厅打电话:助教已经出发、到达或正在服务时,订单里能看到电话图标。球厅详情和门店订单里也有电话。点之前会问你「是否拨打电话」。如果开了隐私电话,打给助教时用的是临时号码。
  • 阿里云隐私电话:后台打开后,订单详情会把你的手机号和助教的手机号换成一对临时号码,双方都能打通,但看不到对方真实号码。
  • 微信分享:首页可以分享给微信好友,也可以分享到朋友圈。分享出去会带上你的邀请码,别人注册时可以填。
  • 微信订单提醒:在微信小程序里点进项目时,可以让微信发订单相关的订阅消息。
  • 手机系统能力:获取当前位置、在地图上点选地址、打开地图导航、拨打电话、复制订单号、从相册看大图。

说明:微信支付和支付宝要有对应的收款账号。这份开源代码一般能看到付款按钮,不能真的把钱收进来。短信、客服和隐私电话也一样,按钮可以点,能不能打通取决于账号是否配好。

打球的人能做什么

打开软件先看到什么

  • 顶部有轮播广告,点一下可以跳到对应内容。
  • 广告下面可以切换 预约助教 和 预约教练。点哪一个,下面就列出这一类的项目。
  • 每一条服务能看到封面、名称、标签(比如初级、中级、高级)、已售多少、价格、时长(多少分钟)。开通会员后,这里显示会员价。
  • 按钮按项目来写:预约助教的项目是「选择助教」,预约教练的项目是「选择教练」。
  • 第一次登录后如果还没领过新人券,过一会儿会弹出新人红包,点图片就能领,领完会去看自己的券。
  • 下拉可以刷新首页。没选城市时,列表先不出来,允许定位或自己选城市之后才会加载。

找一位助教

助教页在底部第二个入口。

  • 左上角是当前城市,点开可以换城市。
  • 搜索框可以按助教名字搜。
  • 右上角可以在「列表」和「地图」之间切换。地图上会标出附近的人,点标记能看是谁。
  • 列表里每个人有头像、名字、评分、已服务单数、距离。状态分成三种:可服务、可预约、休息中。有的人会标「优质」,也能看最早什么时候能约。
  • 出行如果是免费,会直接写「免出行费」,不再显示距离。
  • 还能看到评论数、收藏数。点「更多照片」可以看生活照。
  • 可服务的人才能点「立即预约」。休息中的按钮是灰的。

点进一个人之后:

  • 上面是照片轮播,可以点开放大。
  • 横条上写着实名认证、资质认证、平台担保,用来说明这个人是平台展示的陪练。
  • 能看到名字、距离、用户评分、已服务单数、自我介绍。
  • 下面有资质证书图片,点开可以看大图。
  • 再下面是服务评价,按星星打分,评价人显示为匿名。没有评价时写「暂无评价」。
  • 底部两个按钮:收藏(再点一次变成已收藏)和 选TA。选TA 就进入这个人能做的项目。

看一种陪练项目

从首页点进一个项目,或者从助教里选人之后再选项目,都会看到项目详情:

  • 大图、价格、时长、已售数量、项目名称。会员看到的是会员价。
  • 还没开通会员时,会有一条「开通会员立享会员折扣价」,可以点「去开通」。
  • 适用说明里有性别限制、适用人群。
  • 有服务内容介绍,还有项目详情长图。
  • 下面是服务评价。
  • 底部按钮是「选择助教」或「选择教练」,去挑具体的人。

选一家球厅

球厅在底部第三个入口。

  • 同样有顶部广告。
  • 可以按综合排序、价格、销量、好评度切换。
  • 门店卡片上有店名、评分、销量、距离、标签、营业时间。
  • 点进一家店:上面是门店照片,可以收藏。能看地址和营业时间,旁边有「导航」和「电话」。
  • 店里分两块:预约服务(这家店能下的项目,带价格、时长、已售,按钮是「下单」)和 助教/教练(店里的人,同样有可服务、可预约、休息中)。

填写预约信息

选好项目和人之后,进入确认订单:

  • 上门单先选地址。没选时写「请选择地址」。选好后能看到联系人、电话,以及省、市、区、详细地址。地址在「我的 → 地址管理」里新增,要填电话、姓名、在地图上点位置、门牌等详细地址,还可以设成默认地址。
  • 到店单不用填上门地址,也不算出行费。
  • 能看到项目图、名称、时长、已售、普通价和会员价,数量可以加减。
  • 写明这次是哪位助教。
  • 预约时间:点开日历,按当天可约的时间段来选。时间段是半小时一档还是一小时一档,以后台配置为准。
  • 出行方式:公交、出租或免费。下面会写全程公里数和计价:起步多少公里、起步价、超出每公里多少钱,并算出这次车费。
  • 有券时可以选优惠券,也可以取消使用。
  • 可以写备注,最多 300 字。
  • 底部是合计(项目钱加上车费)和「确认预约」。

付钱怎么付

点确认预约后弹出付款窗口,选一种再点「确认支付」:

  • 手机 App、电脑网页、手机网页:微信支付、支付宝支付、零钱支付。
  • 微信小程序:微信支付、零钱支付。

付钱之前必须先登录。订单还是待付款时,之后也可以从订单里再点「去支付」或「立即支付」。

订单里还能做什么

订单分两块:助教订单和门店订单。

状态大致是这些:

  • 待付款:还没付钱。可以去支付,也可以取消。
  • 待服务:已经付钱,人还没出发。可以看详情,也可以取消。
  • 助教出发:人已经在路上。
  • 助教到达:人已经到了。
  • 服务中:正在陪练。如果项目允许,可以加钟补价。
  • 待评价:服务结束,还没写评价。点「去评价」。
  • 已完成:评价也做完了。
  • 已取消:这单不做了。

列表上能看到助教名字、项目名、预约时间、实付金额。待付款、待服务、出发、到达时,如果后台允许取消,会出现「取消订单」。已取消或已完成时,如果后台允许删除,会出现「删除订单」。

点进一单还能看到:

  • 项目图、时长、数量、价格。
  • 出行交通费、用了多少优惠券、加钟次数、加钟时长、加钟费用。
  • 助教头像和名字。出发之后才能打电话。
  • 如果是门店订单,能看到门店地址、营业时间,以及导航、电话。
  • 上门单能看到你的姓名、打码后的手机号、地址。
  • 订单编号(可以复制)、订单类型(助教订单或门店订单)、预约时间、下单时间、开始服务时间、结束时间、预估结束时间、出行方式、全程距离、备注。
  • 底部合计金额。
  • 待付款可以立即支付;允许取消的状态可以取消;待服务、已完成、待评价可以去投诉;待评价可以去评价;始终可以联系客服。
  • 超时的订单会标红字「订单已超时」。

「我的」里把订单收成四格:待付款、待服务、待评价、已完成,也可以「查看全部」。

账号和登录

  • 网页和 App:手机号登录。没开微信登录时,还可以走验证码登录。
  • 在微信里打开网页:可能显示「微信一键登录」。
  • 微信小程序:授权登录,或授权手机号。
  • 注册要填手机号、短信验证码、密码。邀请码可以不填;如果是朋友分享进来的,邀请码会自动带上。
  • 登录和注册前都要同意《隐私政策》和《用户协议》。
  • 右上角设置里可以退出登录。账号如果被封禁,打开时会提示去客服申诉,申诉成功后再登录。

会员、钱包、券和分享

「我的」顶部是头像和名字。登录后能看到自己的 ID。会员头像上会有会员标。

  • 我的钱包:显示余额数字。付款时选零钱,用的就是这里的钱。
  • 我的收藏:收藏过的助教、球厅会出现在这里,数字是收藏了多少。
  • 优惠券:显示你还有几张券。
  • 开通会员 / 会员中心:没开通时写「开通会员」,开通后写「会员中心」。会员可以享受更低的会员价。

推荐工具里:

  • 成为教练:登录后可以去申请当陪练的人。
  • 成为推广员:还不是推广员时会出现。已经是推广员时,这里改成「我的团队」。
  • 分享好友:把邀请码分享出去,别人注册时填上。
  • 地址管理:新增、修改上门地址,也能设默认地址。
  • 帮助中心:看使用说明、提问题。
  • 球厅入驻:弹出一张商家小程序二维码。网页上长按图片可以识别进入;手机 App 里先保存图片,再用微信打开识别。
  • 中间还有一条客服图,点一下按上面说的电话、企业微信或客服页来联系。

体验

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

技术栈

端 技术
用户端 uni-app + Vue2

运行

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

开始前请准备

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

第一步:拿到文件夹

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

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

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

第三步:用浏览器运行

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

常见情况说明

  • 点了运行没反应:确认打开的是整个 台球助教 文件夹,不是只打开了一个页面文件。
  • 浏览器打开了但是花屏、一直转圈:等十几秒;仍不行就关掉网页,在 HBuilderX 里再点一次运行。
  • 页面是空的、提示加载失败:检查电脑能否打开体验地址 https://taiqiuzj.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.

暂无用户评论。