当前位置:   article > 正文

免费分享一套微信小程序在线订餐(点餐)配送系统(SpringBoot+Vue),帅呆了~~_小程序订餐系统

小程序订餐系统

大家好,我是java1234_小锋老师,看到一个不错的微信小程序在线订餐(点餐)配送系统(SpringBoot+Vue),分享下哈。

项目视频演示

【免费】微信小程序在线订餐(点餐)配送系统(SpringBoot+Vue) Java毕业设计_哔哩哔哩_bilibili【免费】微信小程序在线订餐(点餐)配送系统(SpringBoot+Vue) Java毕业设计项目来自互联网,免费开源分享,严禁商业。更多毕业设源码:http://www.java1234.com/a/bysj/javaweb/, 视频播放量 160、弹幕量 0、点赞数 5、投硬币枚数 0、收藏人数 2、转发人数 1, 视频作者 java1234官方, 作者简介 公众号:java1234 微信:java9266,相关视频:【免费】SpringBoot+Vue大学新生报到管理系统 Java毕业设计,【免费】微信小程序扫码点餐(订餐)系统(uni-app+SpringBoot后端+Vue管理端技术实现) Java毕业设计,非常好的源码,【免费】基于springboot的进销存(仓库)管理系统 Java毕业设计,【免费】SpringBoot+Vue个人健康管理系统 Java毕业设计,【免费】SpringBoot+Vue旅游管理系统 Java毕业设计,【免费】Springboot+Vue在线教育平台系统 Java毕业设计,打造前后端分离 权限系统 基于SpringBoot2+SpringSecurity+Vue3.2+Element Plus 视频教程 (火爆连载更新中..),【免费】Springboot+Vue在线商城系统 毕业设计 Java毕业设计,【免费】Springboot+Vue在线图书商城(在线书城) 毕业设计 Java毕业设计,【免费】SpringBoot+Vue健身房管理系统 Java毕业设计icon-default.png?t=N7T8https://www.bilibili.com/video/BV1up42127uR/

项目介绍

随着信息技术在管理上越来越深入而广泛的应用,管理信息系统的实施在技术上已逐步成熟。本文介绍了微信小程序在线订餐系统的开发全过程。通过分析微信小程序在线订餐系统管理的不足,创建了一个计算机管理微信小程序在线订餐系统的方案。文章介绍了微信小程序在线订餐系统的系统分析部分,包括可行性分析等,系统设计部分主要介绍了系统功能设计和数据库设计。

本微信小程序在线订餐系统管理员功能可以修改个人中心,用户管理,菜品分类管理,菜品信息管理,订单信息管理,取消订单管理,订单配送管理,菜品评价管理以及系统管理。微信小程序用户可以注册以及登录,登录之后可以可以查看菜品信息,可以对菜品信息进行收藏以及订购,还可以查看菜品资讯,可以对已经生成的订单信息进行取消操作,查看订单配送情况,以及查看菜品评价,我的收藏等。因而具有一定的实用性。本站后台采用Java的SSM框架进行后台管理开发,可以在浏览器上登录进行后台数据方面的管理,MySQL作为本地数据库,微信小程序用到了微信开发者工具,充分保证系统的稳定性。系统具有界面清晰、操作简单,功能齐全的特点,使得微信小程序在线订餐系统管理工作系统化、规范化。

系统展示

部分代码

  1. package com.controller;
  2. import java.util.Arrays;
  3. import java.util.Calendar;
  4. import java.util.Date;
  5. import java.util.Map;
  6. import javax.servlet.http.HttpServletRequest;
  7. import org.springframework.beans.factory.annotation.Autowired;
  8. import org.springframework.stereotype.Controller;
  9. import org.springframework.web.bind.annotation.GetMapping;
  10. import org.springframework.web.bind.annotation.PathVariable;
  11. import org.springframework.web.bind.annotation.PostMapping;
  12. import org.springframework.web.bind.annotation.RequestBody;
  13. import org.springframework.web.bind.annotation.RequestMapping;
  14. import org.springframework.web.bind.annotation.RequestParam;
  15. import org.springframework.web.bind.annotation.ResponseBody;
  16. import org.springframework.web.bind.annotation.RestController;
  17. import com.annotation.IgnoreAuth;
  18. import com.baomidou.mybatisplus.mapper.EntityWrapper;
  19. import com.entity.TokenEntity;
  20. import com.entity.UserEntity;
  21. import com.service.TokenService;
  22. import com.service.UserService;
  23. import com.utils.CommonUtil;
  24. import com.utils.MPUtil;
  25. import com.utils.PageUtils;
  26. import com.utils.R;
  27. import com.utils.ValidatorUtils;
  28. /**
  29. * 登录相关
  30. */
  31. @RequestMapping("users")
  32. @RestController
  33. public class UserController{
  34. @Autowired
  35. private UserService userService;
  36. @Autowired
  37. private TokenService tokenService;
  38. /**
  39. * 登录
  40. */
  41. @IgnoreAuth
  42. @PostMapping(value = "/login")
  43. public R login(String username, String password, String captcha, HttpServletRequest request) {
  44. UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));
  45. if(user==null || !user.getPassword().equals(password)) {
  46. return R.error("账号或密码不正确");
  47. }
  48. String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());
  49. return R.ok().put("token", token);
  50. }
  51. /**
  52. * 注册
  53. */
  54. @IgnoreAuth
  55. @PostMapping(value = "/register")
  56. public R register(@RequestBody UserEntity user){
  57. // ValidatorUtils.validateEntity(user);
  58. if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {
  59. return R.error("用户已存在");
  60. }
  61. userService.insert(user);
  62. return R.ok();
  63. }
  64. /**
  65. * 退出
  66. */
  67. @GetMapping(value = "logout")
  68. public R logout(HttpServletRequest request) {
  69. request.getSession().invalidate();
  70. return R.ok("退出成功");
  71. }
  72. /**
  73. * 密码重置
  74. */
  75. @IgnoreAuth
  76. @RequestMapping(value = "/resetPass")
  77. public R resetPass(String username, HttpServletRequest request){
  78. UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));
  79. if(user==null) {
  80. return R.error("账号不存在");
  81. }
  82. user.setPassword("123456");
  83. userService.update(user,null);
  84. return R.ok("密码已重置为:123456");
  85. }
  86. /**
  87. * 列表
  88. */
  89. @RequestMapping("/page")
  90. public R page(@RequestParam Map<String, Object> params,UserEntity user){
  91. EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();
  92. PageUtils page = userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));
  93. return R.ok().put("data", page);
  94. }
  95. /**
  96. * 列表
  97. */
  98. @RequestMapping("/list")
  99. public R list( UserEntity user){
  100. EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();
  101. ew.allEq(MPUtil.allEQMapPre( user, "user"));
  102. return R.ok().put("data", userService.selectListView(ew));
  103. }
  104. /**
  105. * 信息
  106. */
  107. @RequestMapping("/info/{id}")
  108. public R info(@PathVariable("id") String id){
  109. UserEntity user = userService.selectById(id);
  110. return R.ok().put("data", user);
  111. }
  112. /**
  113. * 获取用户的session用户信息
  114. */
  115. @RequestMapping("/session")
  116. public R getCurrUser(HttpServletRequest request){
  117. Long id = (Long)request.getSession().getAttribute("userId");
  118. UserEntity user = userService.selectById(id);
  119. return R.ok().put("data", user);
  120. }
  121. /**
  122. * 保存
  123. */
  124. @PostMapping("/save")
  125. public R save(@RequestBody UserEntity user){
  126. // ValidatorUtils.validateEntity(user);
  127. if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {
  128. return R.error("用户已存在");
  129. }
  130. userService.insert(user);
  131. return R.ok();
  132. }
  133. /**
  134. * 修改
  135. */
  136. @RequestMapping("/update")
  137. public R update(@RequestBody UserEntity user){
  138. // ValidatorUtils.validateEntity(user);
  139. UserEntity u = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername()));
  140. if(u!=null && u.getId()!=user.getId() && u.getUsername().equals(user.getUsername())) {
  141. return R.error("用户名已存在。");
  142. }
  143. userService.updateById(user);//全部更新
  144. return R.ok();
  145. }
  146. /**
  147. * 删除
  148. */
  149. @RequestMapping("/delete")
  150. public R delete(@RequestBody Long[] ids){
  151. userService.deleteBatchIds(Arrays.asList(ids));
  152. return R.ok();
  153. }
  154. }
  1. <template>
  2. <div>
  3. <div class="container loginIn" style="backgroundImage: url(http://codegen.caihongy.cn/20210228/c8db205ee3a44746a3113dace7bb9506.jpg)">
  4. <div :class="2 == 1 ? 'left' : 2 == 2 ? 'left center' : 'left right'" style="backgroundColor: rgba(255, 255, 255, 0.71)">
  5. <el-form class="login-form" label-position="left" :label-width="1 == 3 ? '56px' : '0px'">
  6. <div class="title-container"><h3 class="title" style="color: rgba(84, 88, 179, 1)">在线订餐系统小程序登录</h3></div>
  7. <el-form-item :label="1 == 3 ? '用户名' : ''" :class="'style'+1">
  8. <span v-if="1 != 3" class="svg-container" style="color:rgba(89, 97, 102, 1);line-height:44px"><svg-icon icon-class="user" /></span>
  9. <el-input placeholder="请输入用户名" name="username" type="text" v-model="rulesForm.username" />
  10. </el-form-item>
  11. <el-form-item :label="1 == 3 ? '密码' : ''" :class="'style'+1">
  12. <span v-if="1 != 3" class="svg-container" style="color:rgba(89, 97, 102, 1);line-height:44px"><svg-icon icon-class="password" /></span>
  13. <el-input placeholder="请输入密码" name="password" type="password" v-model="rulesForm.password" />
  14. </el-form-item>
  15. <el-form-item v-if="0 == '1'" class="code" :label="1 == 3 ? '验证码' : ''" :class="'style'+1">
  16. <span v-if="1 != 3" class="svg-container" style="color:rgba(89, 97, 102, 1);line-height:44px"><svg-icon icon-class="code" /></span>
  17. <el-input placeholder="请输入验证码" name="code" type="text" v-model="rulesForm.code" />
  18. <div class="getCodeBt" @click="getRandCode(4)" style="height:44px;line-height:44px">
  19. <span v-for="(item, index) in codes" :key="index" :style="{color:item.color,transform:item.rotate,fontSize:item.size}">{{ item.num }}</span>
  20. </div>
  21. </el-form-item>
  22. <el-form-item label="角色" prop="loginInRole" class="role">
  23. <el-radio
  24. v-for="item in menus"
  25. v-if="item.hasBackLogin=='是'"
  26. v-bind:key="item.roleName"
  27. v-model="rulesForm.role"
  28. :label="item.roleName"
  29. >{{item.roleName}}</el-radio>
  30. </el-form-item>
  31. <el-button type="primary" @click="login()" class="loginInBt" style="padding:0;font-size:16px;border-radius:4px;height:44px;line-height:44px;width:100%;backgroundColor:rgba(84, 88, 179, 1); borderColor:rgba(84, 88, 179, 1); color:rgba(255, 255, 255, 1)">{{'1' == '1' ? '登录' : 'login'}}</el-button>
  32. <el-form-item class="setting">
  33. <!-- <div style="color:rgba(255, 255, 255, 1)" class="reset">修改密码</div> -->
  34. <a href="http://www.java1234.com/a/bysj/javaweb/" target='_blank'><font color=red>Java1234收藏整理</font></a>
  35. </el-form-item>
  36. </el-form>
  37. </div>
  38. </div>
  39. </div>
  40. </template>
  41. <script>
  42. import menu from "@/utils/menu";
  43. export default {
  44. data() {
  45. return {
  46. rulesForm: {
  47. username: "",
  48. password: "",
  49. role: "",
  50. code: '',
  51. },
  52. menus: [],
  53. tableName: "",
  54. codes: [{
  55. num: 1,
  56. color: '#000',
  57. rotate: '10deg',
  58. size: '16px'
  59. },{
  60. num: 2,
  61. color: '#000',
  62. rotate: '10deg',
  63. size: '16px'
  64. },{
  65. num: 3,
  66. color: '#000',
  67. rotate: '10deg',
  68. size: '16px'
  69. },{
  70. num: 4,
  71. color: '#000',
  72. rotate: '10deg',
  73. size: '16px'
  74. }],
  75. };
  76. },
  77. mounted() {
  78. let menus = menu.list();
  79. this.menus = menus;
  80. },
  81. created() {
  82. this.setInputColor()
  83. this.getRandCode()
  84. },
  85. methods: {
  86. setInputColor(){
  87. this.$nextTick(()=>{
  88. document.querySelectorAll('.loginIn .el-input__inner').forEach(el=>{
  89. el.style.backgroundColor = "rgba(255, 255, 255, 1)"
  90. el.style.color = "rgba(0, 0, 0, 1)"
  91. el.style.height = "44px"
  92. el.style.lineHeight = "44px"
  93. el.style.borderRadius = "2px"
  94. })
  95. document.querySelectorAll('.loginIn .style3 .el-form-item__label').forEach(el=>{
  96. el.style.height = "44px"
  97. el.style.lineHeight = "44px"
  98. })
  99. document.querySelectorAll('.loginIn .el-form-item__label').forEach(el=>{
  100. el.style.color = "rgba(89, 97, 102, 1)"
  101. })
  102. setTimeout(()=>{
  103. document.querySelectorAll('.loginIn .role .el-radio__label').forEach(el=>{
  104. el.style.color = "rgba(84, 88, 179, 1)"
  105. })
  106. },350)
  107. })
  108. },
  109. register(tableName){
  110. this.$storage.set("loginTable", tableName);
  111. this.$router.push({path:'/register'})
  112. },
  113. // 登陆
  114. login() {
  115. let code = ''
  116. for(let i in this.codes) {
  117. code += this.codes[i].num
  118. }
  119. if ('0' == '1' && !this.rulesForm.code) {
  120. this.$message.error("请输入验证码");
  121. return;
  122. }
  123. if ('0' == '1' && this.rulesForm.code.toLowerCase() != code.toLowerCase()) {
  124. this.$message.error("验证码输入有误");
  125. this.getRandCode()
  126. return;
  127. }
  128. if (!this.rulesForm.username) {
  129. this.$message.error("请输入用户名");
  130. return;
  131. }
  132. if (!this.rulesForm.password) {
  133. this.$message.error("请输入密码");
  134. return;
  135. }
  136. if (!this.rulesForm.role) {
  137. this.$message.error("请选择角色");
  138. return;
  139. }
  140. let menus = this.menus;
  141. for (let i = 0; i < menus.length; i++) {
  142. if (menus[i].roleName == this.rulesForm.role) {
  143. this.tableName = menus[i].tableName;
  144. }
  145. }
  146. this.$http({
  147. url: `${this.tableName}/login?username=${this.rulesForm.username}&password=${this.rulesForm.password}`,
  148. method: "post"
  149. }).then(({ data }) => {
  150. if (data && data.code === 0) {
  151. this.$storage.set("Token", data.token);
  152. this.$storage.set("role", this.rulesForm.role);
  153. this.$storage.set("sessionTable", this.tableName);
  154. this.$storage.set("adminName", this.rulesForm.username);
  155. this.$router.replace({ path: "/index/" });
  156. } else {
  157. this.$message.error(data.msg);
  158. }
  159. });
  160. },
  161. getRandCode(len = 4){
  162. this.randomString(len)
  163. },
  164. randomString(len = 4) {
  165. let chars = [
  166. "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k",
  167. "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v",
  168. "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G",
  169. "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R",
  170. "S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2",
  171. "3", "4", "5", "6", "7", "8", "9"
  172. ]
  173. let colors = ["0", "1", "2","3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]
  174. let sizes = ['14', '15', '16', '17', '18']
  175. let output = [];
  176. for (let i = 0; i < len; i++) {
  177. // 随机验证码
  178. let key = Math.floor(Math.random()*chars.length)
  179. this.codes[i].num = chars[key]
  180. // 随机验证码颜色
  181. let code = '#'
  182. for (let j = 0; j < 6; j++) {
  183. let key = Math.floor(Math.random()*colors.length)
  184. code += colors[key]
  185. }
  186. this.codes[i].color = code
  187. // 随机验证码方向
  188. let rotate = Math.floor(Math.random()*60)
  189. let plus = Math.floor(Math.random()*2)
  190. if(plus == 1) rotate = '-'+rotate
  191. this.codes[i].rotate = 'rotate('+rotate+'deg)'
  192. // 随机验证码字体大小
  193. let size = Math.floor(Math.random()*sizes.length)
  194. this.codes[i].size = sizes[size]+'px'
  195. }
  196. },
  197. }
  198. };
  199. </script>
  200. <style lang="scss" scoped>
  201. .loginIn {
  202. min-height: 100vh;
  203. position: relative;
  204. background-repeat: no-repeat;
  205. background-position: center center;
  206. background-size: cover;
  207. .left {
  208. position: absolute;
  209. left: 0;
  210. top: 0;
  211. width: 360px;
  212. height: 100%;
  213. .login-form {
  214. background-color: transparent;
  215. width: 100%;
  216. right: inherit;
  217. padding: 0 12px;
  218. box-sizing: border-box;
  219. display: flex;
  220. justify-content: center;
  221. flex-direction: column;
  222. }
  223. .title-container {
  224. text-align: center;
  225. font-size: 24px;
  226. .title {
  227. margin: 20px 0;
  228. }
  229. }
  230. .el-form-item {
  231. position: relative;
  232. .svg-container {
  233. padding: 6px 5px 6px 15px;
  234. color: #889aa4;
  235. vertical-align: middle;
  236. display: inline-block;
  237. position: absolute;
  238. left: 0;
  239. top: 0;
  240. z-index: 1;
  241. padding: 0;
  242. line-height: 40px;
  243. width: 30px;
  244. text-align: center;
  245. }
  246. .el-input {
  247. display: inline-block;
  248. height: 40px;
  249. width: 100%;
  250. & /deep/ input {
  251. background: transparent;
  252. border: 0px;
  253. -webkit-appearance: none;
  254. padding: 0 15px 0 30px;
  255. color: #fff;
  256. height: 40px;
  257. }
  258. }
  259. }
  260. }
  261. .center {
  262. position: absolute;
  263. left: 50%;
  264. top: 50%;
  265. width: 360px;
  266. transform: translate3d(-50%,-50%,0);
  267. height: 446px;
  268. border-radius: 8px;
  269. }
  270. .right {
  271. position: absolute;
  272. left: inherit;
  273. right: 0;
  274. top: 0;
  275. width: 360px;
  276. height: 100%;
  277. }
  278. .code {
  279. .el-form-item__content {
  280. position: relative;
  281. .getCodeBt {
  282. position: absolute;
  283. right: 0;
  284. top: 0;
  285. line-height: 40px;
  286. width: 100px;
  287. background-color: rgba(51,51,51,0.4);
  288. color: #fff;
  289. text-align: center;
  290. border-radius: 0 4px 4px 0;
  291. height: 40px;
  292. overflow: hidden;
  293. span {
  294. padding: 0 5px;
  295. display: inline-block;
  296. font-size: 16px;
  297. font-weight: 600;
  298. }
  299. }
  300. .el-input {
  301. & /deep/ input {
  302. padding: 0 130px 0 30px;
  303. }
  304. }
  305. }
  306. }
  307. .setting {
  308. & /deep/ .el-form-item__content {
  309. padding: 0 15px;
  310. box-sizing: border-box;
  311. line-height: 32px;
  312. height: 32px;
  313. font-size: 14px;
  314. color: #999;
  315. margin: 0 !important;
  316. .register {
  317. float: left;
  318. width: 50%;
  319. }
  320. .reset {
  321. float: right;
  322. width: 50%;
  323. text-align: right;
  324. }
  325. }
  326. }
  327. .style2 {
  328. padding-left: 30px;
  329. .svg-container {
  330. left: -30px !important;
  331. }
  332. .el-input {
  333. & /deep/ input {
  334. padding: 0 15px !important;
  335. }
  336. }
  337. }
  338. .code.style2, .code.style3 {
  339. .el-input {
  340. & /deep/ input {
  341. padding: 0 115px 0 15px;
  342. }
  343. }
  344. }
  345. .style3 {
  346. & /deep/ .el-form-item__label {
  347. padding-right: 6px;
  348. }
  349. .el-input {
  350. & /deep/ input {
  351. padding: 0 15px !important;
  352. }
  353. }
  354. }
  355. .role {
  356. & /deep/ .el-form-item__label {
  357. width: 56px !important;
  358. }
  359. & /deep/ .el-radio {
  360. margin-right: 12px;
  361. }
  362. }
  363. }
  364. </style>

源码下载

CSDN 1积分下载:https://download.csdn.net/download/caofeng891102/89082516

或者免费领取加小锋老师wx:java9266

热门推荐

免费分享一套SpringBoot+Vue健身房管理系统,帅呆了~~-CSDN博客

免费分享一套SpringBoot+Vue个人健康管理系统,帅呆了~~_个人健康管理系统springboot vue-CSDN博客

免费分享一套微信小程序扫码点餐(订餐)系统(uni-app+SpringBoot后端+Vue管理端技术实现) ,帅呆了~~_uniapp微信点餐-CSDN博客

免费分享一套SpringBoot+Vue药店(药房)管理系统,帅呆了~~_基于sprintboot+vue的药店管理系统-CSDN博客

免费分享一套SpringBoot+Vue旅游管理系统,帅呆了~~_vue spring boot免费项目-CSDN博客

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/2023面试高手/article/detail/513977
推荐阅读
相关标签
  

闽ICP备14008679号