基于laravrel 和uniapp 实现的点餐程序分析

功能需求分析

在这个快节奏的时代,我们深知您对便捷和高效的追求。为此,我们推出了一款集多项功能于一体的小程序,旨在为您提供无与伦比的餐饮体验。让我们一起探索这款小程序的独特功能:
扫码点餐: 忘掉繁琐的排队等待,我们的小程序允许您通过简单的扫码动作,即刻点选您心仪的美食。无需与服务员交流,只需动动手指,美味即刻准备。
店内点餐: 如果您更喜欢店内用餐,我们的小程序同样提供店内点餐服务。通过直观的用户界面,您可以轻松浏览菜单,选择您喜爱的菜品,并直接发送订单至厨房,享受个性化的用餐体验。
外卖服务: 不论您身在何处,我们的外卖服务都能满足您对美食的渴望。通过小程序,您可以轻松下单,享受快速、可靠的配送服务,让美味直达您的家门口。
首页广告: 我们的小程序首页精心设计了广告位,展示最新推出的菜品和不容错过的优惠活动。这不仅帮助您发现新的美食选择,还能让您享受独家优惠。
会员活动: 成为我们的会员,您将获得一系列专属福利。积分累积、会员日特价、生日礼物等丰富活动,都是为了让您的每一次用餐都充满惊喜。

代码结构

image.png

  1. 微信接口代码(wechatapi端):这部分代码就像是我们与微信世界的桥梁,它帮助我们的小程序与微信的各种功能进行对话,比如接收消息、发送通知等。
  2. 用户端小程序(uniapp小程序user):想象一下,这是你的顾客在微信上看到的那部分,他们通过这个小程序来浏览菜单、下订单、支付等等。这就像是你的店铺的在线展示窗口。
  3. 后台管理系统(CMS后台管理端):这是商家用来管理整个小程序后台的部分。你可以在这里查看订单、管理菜单、更新促销信息,就像是店铺的后台办公室,帮助你高效运营。

效果展示

小程序端:
image.png
image.png

web后端:
image.png

数据库设计

Er图:
image.png
数据表结构:

字段名类型是否为空索引默认值说明
idint(11)NOPRI
usernamevarchar(40)NO用户名
passwordvarchar(60)NO
group_idtinyint(4)NO1管理组ID
ipvarchar(30)YES
stateint(1)NO0是否禁用
descriptionvarchar(200)YES描述
ucidint(1)YES3ucid
login_timeint(11)NO0
create_timeint(11)NO0

rh_admin

字段名类型是否为空索引默认值说明
idint(10) unsignedNOPRI文章编号
typeint(11)NO0活动公告,1独立文章,3公告
titlevarchar(50)NO文章标题
summaryvarchar(140)YES文章摘要
contenttextNO文章正文
imagevarchar(255)YES文章标题图片
is_hiddentinyint(1)NO0是否显示 1 显示 0 不显示
authorvarchar(50)YES发布者用户名
created_atint(11)YES0文章发布时间
ucidint(1)NO3ucid
updated_atint(11)YES

rh_article

字段名类型是否为空索引默认值说明
idint(11)NOPRI
namevarchar(50)YESBanner名称,通常作为标识
descriptionvarchar(255)YESBanner描述
delete_timeint(11)YES
update_timeint(11)YES
ucidint(1)NO3ucid

rh_banner

字段名类型是否为空索引默认值说明
idint(11)NOPRI
img_idint(11)NO外键,关联image表
key_wordvarchar(100)NO执行关键字,根据不同的type含义不同
typevarchar(255)NO0跳转类型
jump_idint(11)YES0
deleted_atint(11)YES
banner_idint(11)NO外键,关联banner表
is_visibleint(11)NO1是否显示 1 显示 0 不显示
sortint(11)YES
update_timeint(11)YES
ucidint(1)NO3ucid
create_timeint(11)YES

rh_banner_item

字段名类型是否为空索引默认值说明
category_idint(11)NOPRI
category_namevarchar(50)NO名称
short_namevarchar(50)NO商品分类简称
pidint(11)NO0
leveltinyint(4)NO0
is_visibleint(11)NO1是否显示 1 显示 0 不显示
sortint(11)YES
category_picvarchar(255)NO商品分类图片
ucidint(1)NO3ucid

rh_category

字段名类型是否为空索引默认值说明
idint(11)NOPRI
typeint(11)NO3类型1:店铺优惠券
namevarchar(50)NO优惠券名称
statusint(11)NO1状态1:使用1次,2使用无数次
is_showint(11)NO0vip特权券是否能领取,0不可领取,1能领取,2撤回申请中
stockint(11)YES库存null为无限张
stock_typeint(11)NO0库存类型(0有限张数1无限张)
fulldecimal(10,2)NO满多少,0为无门槛
reducedecimal(10,2)NO减多少
start_timeint(11)YES开始时间
end_timeint(11)YES结束时间
dayint(11)YES使用时间
created_atint(11)NO创建时间
updated_atint(11)NO修改时间
deleted_atint(11)YES删除时间
ucidint(1)NO3ucid

rh_coupon

字段名类型是否为空索引默认值说明
idint(10) unsignedNOPRI记录ID
uidint(11)NO用户ID
fav_idint(10) unsignedNO0商品ID
img_idint(11)YES
pricedecimal(10,2)NO商品收藏时价格
create_timeint(11)YES0收藏时间
ucidint(1)NO3ucid

rh_favorites

字段名类型是否为空索引默认值说明
idint(11)NOPRI
uidint(11)NO
type_namevarchar(255)NO
contentvarchar(800)NO
operatorvarchar(255)YES
ipvarchar(255)YES
wx_refundvarchar(50)YES微信退款id
created_atint(11)YES
ucidint(1)NO3ucid
updated_atint(11)YES

rh_money_log

字段名类型是否为空索引默认值说明
order_idint(11)NOPRI
order_numvarchar(40)NO订单编号
user_idint(11)YES
stateint(11)NO00未完成 1已完成 2已评价 -1退款中 -2已退款-3关闭订单
shipment_stateint(11)NO0运输(验证)状态 0待配送 1已配送 2已收货
payment_stateint(11)NO0支付状态 0 1
rate_idint(11)YES0
coupon_idint(11)YES0优惠券ID
order_fromvarchar(4)YES来源小程序或wap
payment_typevarchar(60)YES支付来源
goods_moneydecimal(10,2)NO商品总价
reduction_moneydecimal(10,2)NO满减价格
coupon_moneydecimal(10,2)NO优惠券价格
edit_moneydecimal(10,2)YES
order_moneydecimal(10,2)NO订单总价
user_ipvarchar(40)YES
goods_picturevarchar(400)YES
messagevarchar(300)YES备注
receiver_namevarchar(60)NO收货人
receiver_mobilevarchar(60)NO收货人手机
receiver_cityvarchar(60)NO
receiver_addressvarchar(200)NO
courier_numvarchar(60)YES
couriervarchar(255)YES
remark_onevarchar(255)YES
remark_twovarchar(255)YES
drive_typevarchar(255)YES配送方式
prepay_idvarchar(255)YES
pay_timeint(11)YES支付时间
created_atint(11)NO
updated_atint(11)NO
deleted_atint(11)YES
othertextYES其他要求
mobilevarchar(11)YES
addressvarchar(255)YES收货地址
countint(11)NO0
pay_catevarchar(255)NO3支付方式1微信支付2余额支付3暂不支付
ucidint(1)NO3
table_numvarchar(50)YES几号桌
yzcodevarchar(255)YES
invite_codevarchar(255)YES邀请码

rh_order

字段名类型是否为空索引默认值说明
idint(11)NOPRI
order_idint(11)NO
goods_idint(11)NO
goods_namevarchar(300)NO
sku_idint(11)NO
sku_namevarchar(300)YES
pricedecimal(10,2)NO
cost_pricedecimal(10,2)NO
numberint(11)NO
total_pricedecimal(10,2)NO
stateint(11)NO0订单状态0未完成 1已完成 2已评价 -1退款中 -2已退款-3关闭订单
picvarchar(255)NO
user_idint(11)NO
remarkvarchar(400)YES
created_atint(11)NO
updated_atint(11)NO
deleted_atint(11)YES
ucidint(1)NO3

rh_order_goods

字段名类型是否为空索引默认值说明
idint(11)NOPRI
order_idint(11)NO
type_namevarchar(255)NO
contentvarchar(800)NO
operatorvarchar(255)YES
ipvarchar(255)YES
wx_refundvarchar(50)YES微信退款id
created_atint(11)YES
ucidint(1)NO
updated_atint(11)YES

rh_order_log

字段名类型是否为空索引默认值说明
idint(11)NOPRI
type_idint(11)NO类型ID
namevarchar(50)NO
lvint(11)NO0概率
awardvarchar(50)NO奖励内容
award_typeint(11)NO0奖品类型(0为积分1为商品)
stockint(11)NO0
img_idint(11)NO0
ucidint(1)YES

rh_play_award

字段名类型是否为空索引默认值说明
idint(11)NOPRI
uidint(10) unsignedNOMUL
credittypevarchar(10)NO
numdecimal(10,2)NO
operatorint(10) unsignedYES0
modulevarchar(30)NO
clerk_idint(10) unsignedNO0
store_idint(10) unsignedNO0
clerk_typetinyint(3) unsignedNO1
created_atint(11)YES
remarkvarchar(200)NO
real_uniacidint(11)NO0
updated_atint(11)YES
ucidint(1)NO3

软件运行测试

为了更好地进行SEO推流并确保步骤清晰,以下是将上述内容具体化为操作步骤的指南:

步骤 1: 准备域名和服务器

  • 购买域名:选择一个合适的域名注册商,购买一个与你的网站内容相关的域名(例如:xxx.com)。
  • 获取服务器:购买一台云服务器(VPS),并确保它支持宝塔面板。我这里是用的阿里云

image.png

步骤 2: 安装宝塔面板

  • 连接服务器:使用SSH工具(如PuTTY或Terminal)连接到你的云服务器。
  • 安装宝塔:在服务器上执行宝塔面板的安装命令(可在宝塔官网找到最新安装命令)。
  • 配置宝塔:通过浏览器访问宝塔面板,并按照向导完成基础配置。
  • **使用一键命令:**wget -O install.sh http://download.bt.cn/install/install-ubuntu.sh && sudo bash install.sh
  • 官网:宝塔官网

步骤 3: 域名解析

  • 设置域名解析:登录你的域名注册商的控制面板,将域名的A记录指向你的服务器IP地址。

步骤 4: 配置Nginx

  • 添加网站:在宝塔面板中,选择“网站” -> “添加站点”,输入你的域名和服务器信息。
  • 配置Nginx:根据你的网站需求,设置Nginx的配置文件,包括服务器块、SSL证书(如果需要HTTPS)等。

这里注意需要将Nginx 配成伪静态如下:
location / {
try_files $uri u r i / / i n d e x . p h p ? uri/ /index.php? uri//index.php?query_string;
}

步骤 5: 上传后端代码

  • 上传代码:通过FTP工具(如FileZilla)或宝塔面板的文件管理器,将后端代码上传到服务器的网站目录中。

image.png

步骤 6: 打包小程序

  • 开发小程序:使用HBuilder或其他开发工具开发你的小程序。
  • 打包微信包:在开发完成后,使用HBuilder打包成微信小程序的发布包

image.png
image.png

步骤 7: 上传并配置小程序

  • 上传小程序:登录微信公众平台,上传打包好的小程序包,并提交审核。
  • 设置安全域名:在微信公众平台的“开发” -> “开发设置”中,设置你的小程序的安全域名,确保只有你的服务器可以与小程序通信。调试的时候可以选择跳过域名检测,但是上线一定要确认域名已经添加

image.png
image.png

源码获取

  • 30
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

学长代码

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值