SprinBoot+Vue图书馆预约与占座微信小程序的设计与实现

目录

  • 1 项目介绍
  • 2 项目截图
  • 3 核心代码
    • 3.1 Controller
    • 3.2 Service
    • 3.3 Dao
    • 3.4 application.yml
    • 3.5 SpringbootApplication
    • 3.5 Vue
    • 3.6 uniapp代码
  • 4 数据库表设计
  • 5 文档参考
  • 6 计算机毕设选题推荐
  • 7 源码获取


在这里插入图片描述

1 项目介绍

博主个人介绍:CSDN认证博客专家,CSDN平台Java领域优质创作者,全网30w+粉丝,超300w访问量,专注于大学生项目实战开发、讲解和答疑辅导,对于专业性数据证明一切!
主要项目:javaweb、ssm、springboot、vue、小程序、python、安卓、uniapp等设计与开发,万套源码成品可供选择学习。

👇🏻👇🏻文末获取源码

SprinBoot+Vue图书馆预约与占座微信小程序的设计与实现(源码+数据库+文档)

项目描述
当今社会已经步入了科学技术进步和经济社会快速发展的新时期,国际信息和学术交流也不断加强,计算机技术对经济社会发展和人民生活改善的影响也日益突出,人类的生存和思考方式也产生了变化。传统图书馆预约与占座管理采取了人工的管理方法,但这种管理方法存在着许多弊端,比如效率低下、安全性低以及信息传输的不准确等,同时由于预约、查看座位中会形成众多的个人文档和信息系统数据,通过人工方法对查看座位等信息进行集中管理会形成检索、更改和维护等较为麻烦的管理问题,同时由于广大用户对网络技术的需求也日益高涨,于是信息技术也需要继续开展全新的改革以满足时代的需求。根据此问题,研发一套图书馆预约与占座小程序,既能够大大提高信息的检索、变更与维护的工作效率,也能够方便微信小程序的管理运用,从而减少信息管理成本,提高效率。
该图书馆预约与占座小程序采用Uni-weixin、springboot架构技术,前端以小程序页面呈现给用户,结合后台java语言使页面更加完善,后台使用MySQL数据库进行数据存储。该微信小程序主要设计并完成了管理过程中的用户注册登录、个人信息修改、信息展示、用户信息、用户排行信息、管理员信息、公告信息、座位分布信息、座位信息等功能。该微信小程序操作简便,界面设计简洁,不但可以基本满足本行业的日常管理工作,同时又可以有效减少人员成本和时间成本,为图书馆预约与占座管理工作提供了方便。

在这里插入图片描述

2 项目截图

springboot+vue图书馆预约与占座小程序

3 核心代码

3.1 Controller


package com.controller;import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.Map;import javax.servlet.http.HttpServletRequest;import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.TokenEntity;
import com.entity.UserEntity;
import com.service.TokenService;
import com.service.UserService;
import com.utils.CommonUtil;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.ValidatorUtils;/*** 登录相关*/
@RequestMapping("users")
@RestController
public class UserController{@Autowiredprivate UserService userService;@Autowiredprivate TokenService tokenService;/*** 登录*/@IgnoreAuth@PostMapping(value = "/login")public R login(String username, String password, String captcha, HttpServletRequest request) {UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));if(user==null || !user.getPassword().equals(password)) {return R.error("账号或密码不正确");}String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());return R.ok().put("token", token);}/*** 注册*/@IgnoreAuth@PostMapping(value = "/register")public R register(@RequestBody UserEntity user){
//    	ValidatorUtils.validateEntity(user);if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {return R.error("用户已存在");}userService.insert(user);return R.ok();}/*** 退出*/@GetMapping(value = "logout")public R logout(HttpServletRequest request) {request.getSession().invalidate();return R.ok("退出成功");}/*** 密码重置*/@IgnoreAuth@RequestMapping(value = "/resetPass")public R resetPass(String username, HttpServletRequest request){UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));if(user==null) {return R.error("账号不存在");}user.setPassword("123456");userService.update(user,null);return R.ok("密码已重置为:123456");}/*** 列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,UserEntity user){EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();PageUtils page = userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/list")public R list( UserEntity user){EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();ew.allEq(MPUtil.allEQMapPre( user, "user")); return R.ok().put("data", userService.selectListView(ew));}/*** 信息*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") String id){UserEntity user = userService.selectById(id);return R.ok().put("data", user);}/*** 获取用户的session用户信息*/@RequestMapping("/session")public R getCurrUser(HttpServletRequest request){Integer id = (Integer)request.getSession().getAttribute("userId");UserEntity user = userService.selectById(id);return R.ok().put("data", user);}/*** 保存*/@PostMapping("/save")public R save(@RequestBody UserEntity user){
//    	ValidatorUtils.validateEntity(user);if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {return R.error("用户已存在");}userService.insert(user);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody UserEntity user){
//        ValidatorUtils.validateEntity(user);UserEntity u = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername()));if(u!=null && u.getId()!=user.getId() && u.getUsername().equals(user.getUsername())) {return R.error("用户名已存在。");}userService.updateById(user);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){userService.deleteBatchIds(Arrays.asList(ids));return R.ok();}
}

3.2 Service


/*** 系统用户*/
public interface UserService extends IService<UserEntity> {PageUtils queryPage(Map<String, Object> params);List<UserEntity> selectListView(Wrapper<UserEntity> wrapper);PageUtils queryPage(Map<String, Object> params,Wrapper<UserEntity> wrapper);}

3.3 Dao

/*** 用户*/
public interface UserDao extends BaseMapper<UserEntity> {List<UserEntity> selectListView(@Param("ew") Wrapper<UserEntity> wrapper);List<UserEntity> selectListView(Pagination page,@Param("ew") Wrapper<UserEntity> wrapper);}

3.4 application.yml

# Tomcat
server:tomcat:uri-encoding: UTF-8port: 8080servlet:context-path: /springbootpkh49spring:datasource:driverClassName: com.mysql.jdbc.Driverurl: jdbc:mysql://127.0.0.1:3306/springbootpkh49?useUnicode=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8username: rootpassword: root#        driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
#        url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=springbootpkh49
#        username: sa
#        password: 123456servlet:multipart:max-file-size: 10MBmax-request-size: 10MBresources:static-locations: classpath:static/,file:static/#mybatis
mybatis-plus:mapper-locations: classpath*:mapper/*.xml#实体扫描,多个package用逗号或者分号分隔typeAliasesPackage: com.entityglobal-config:#主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";id-type: 1#字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"field-strategy: 2#驼峰下划线转换db-column-underline: true#刷新mapper 调试神器refresh-mapper: true#逻辑删除配置logic-delete-value: -1logic-not-delete-value: 0#自定义SQL注入器sql-injector: com.baomidou.mybatisplus.mapper.LogicSqlInjectorconfiguration:map-underscore-to-camel-case: truecache-enabled: falsecall-setters-on-nulls: true#springboot 项目mybatis plus 设置 jdbcTypeForNull (oracle数据库需配置JdbcType.NULL, 默认是Other)jdbc-type-for-null: 'null' 

3.5 SpringbootApplication

@SpringBootApplication
@MapperScan(basePackages = {"com.dao"})
public class SpringbootSchemaApplication extends SpringBootServletInitializer{public static void main(String[] args) {SpringApplication.run(SpringbootSchemaApplication.class, args);}@Overrideprotected SpringApplicationBuilder configure(SpringApplicationBuilder applicationBuilder) {return applicationBuilder.sources(SpringbootSchemaApplication.class);}
}

3.5 Vue

<template><div><div class="container loginIn" style="backgroundImage: url(http://codegen.caihongy.cn/20201206/eaa69c2b4fa742f2b5acefd921a772fc.jpg)"><div :class="2 == 1 ? 'left' : 2 == 2 ? 'left center' : 'left right'" style="backgroundColor: rgba(255, 255, 255, 0.71)"><el-form class="login-form" label-position="left" :label-width="1 == 3 ? '56px' : '0px'"><div class="title-container"><h3 class="title" style="color: rgba(84, 88, 179, 1)">在线文档管理系统登录</h3></div><el-form-item :label="1 == 3 ? '用户名' : ''" :class="'style'+1"><span v-if="1 != 3" class="svg-container" style="color:rgba(89, 97, 102, 1);line-height:44px"><svg-icon icon-class="user" /></span><el-input placeholder="请输入用户名" name="username" type="text" v-model="rulesForm.username" /></el-form-item><el-form-item :label="1 == 3 ? '密码' : ''" :class="'style'+1"><span v-if="1 != 3" class="svg-container" style="color:rgba(89, 97, 102, 1);line-height:44px"><svg-icon icon-class="password" /></span><el-input placeholder="请输入密码" name="password" type="password" v-model="rulesForm.password" /></el-form-item><el-form-item v-if="0 == '1'" class="code" :label="1 == 3 ? '验证码' : ''" :class="'style'+1"><span v-if="1 != 3" class="svg-container" style="color:rgba(89, 97, 102, 1);line-height:44px"><svg-icon icon-class="code" /></span><el-input placeholder="请输入验证码" name="code" type="text" v-model="rulesForm.code" /><div class="getCodeBt" @click="getRandCode(4)" style="height:44px;line-height:44px"><span v-for="(item, index) in codes" :key="index" :style="{color:item.color,transform:item.rotate,fontSize:item.size}">{{ item.num }}</span></div></el-form-item><el-form-item label="角色" prop="loginInRole" class="role"><el-radiov-for="item in menus"v-if="item.hasBackLogin=='是'"v-bind:key="item.roleName"v-model="rulesForm.role":label="item.roleName">{{item.roleName}}</el-radio></el-form-item><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><el-form-item class="setting"><!-- <div style="color:rgba(255, 255, 255, 1)" class="reset">修改密码</div> --></el-form-item></el-form></div></div></div>
</template>
<script>
import menu from "@/utils/menu";
export default {data() {return {rulesForm: {username: "",password: "",role: "",code: '',},menus: [],tableName: "",codes: [{num: 1,color: '#000',rotate: '10deg',size: '16px'},{num: 2,color: '#000',rotate: '10deg',size: '16px'},{num: 3,color: '#000',rotate: '10deg',size: '16px'},{num: 4,color: '#000',rotate: '10deg',size: '16px'}],};},mounted() {let menus = menu.list();this.menus = menus;},created() {this.setInputColor()this.getRandCode()},methods: {setInputColor(){this.$nextTick(()=>{document.querySelectorAll('.loginIn .el-input__inner').forEach(el=>{el.style.backgroundColor = "rgba(255, 255, 255, 1)"el.style.color = "rgba(0, 0, 0, 1)"el.style.height = "44px"el.style.lineHeight = "44px"el.style.borderRadius = "2px"})document.querySelectorAll('.loginIn .style3 .el-form-item__label').forEach(el=>{el.style.height = "44px"el.style.lineHeight = "44px"})document.querySelectorAll('.loginIn .el-form-item__label').forEach(el=>{el.style.color = "rgba(89, 97, 102, 1)"})setTimeout(()=>{document.querySelectorAll('.loginIn .role .el-radio__label').forEach(el=>{el.style.color = "rgba(84, 88, 179, 1)"})},350)})},register(tableName){this.$storage.set("loginTable", tableName);this.$router.push({path:'/register'})},// 登陆login() {let code = ''for(let i in this.codes) {code += this.codes[i].num}if ('0' == '1' && !this.rulesForm.code) {this.$message.error("请输入验证码");return;}if ('0' == '1' && this.rulesForm.code.toLowerCase() != code.toLowerCase()) {this.$message.error("验证码输入有误");this.getRandCode()return;}if (!this.rulesForm.username) {this.$message.error("请输入用户名");return;}if (!this.rulesForm.password) {this.$message.error("请输入密码");return;}if (!this.rulesForm.role) {this.$message.error("请选择角色");return;}let menus = this.menus;for (let i = 0; i < menus.length; i++) {if (menus[i].roleName == this.rulesForm.role) {this.tableName = menus[i].tableName;}}this.$http({url: `${this.tableName}/login?username=${this.rulesForm.username}&password=${this.rulesForm.password}`,method: "post"}).then(({ data }) => {if (data && data.code === 0) {this.$storage.set("Token", data.token);this.$storage.set("role", this.rulesForm.role);this.$storage.set("sessionTable", this.tableName);this.$storage.set("adminName", this.rulesForm.username);this.$router.replace({ path: "/index/" });} else {this.$message.error(data.msg);}});},getRandCode(len = 4){this.randomString(len)},randomString(len = 4) {let chars = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k","l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v","w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G","H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R","S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2","3", "4", "5", "6", "7", "8", "9"]let colors = ["0", "1", "2","3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]let sizes = ['14', '15', '16', '17', '18']let output = [];for (let i = 0; i < len; i++) {// 随机验证码let key = Math.floor(Math.random()*chars.length)this.codes[i].num = chars[key]// 随机验证码颜色let code = '#'for (let j = 0; j < 6; j++) {let key = Math.floor(Math.random()*colors.length)code += colors[key]}this.codes[i].color = code// 随机验证码方向let rotate = Math.floor(Math.random()*60)let plus = Math.floor(Math.random()*2)if(plus == 1) rotate = '-'+rotatethis.codes[i].rotate = 'rotate('+rotate+'deg)'// 随机验证码字体大小let size = Math.floor(Math.random()*sizes.length)this.codes[i].size = sizes[size]+'px'}},}
};
</script>
<style lang="scss" scoped>
.loginIn {min-height: 100vh;position: relative;background-repeat: no-repeat;background-position: center center;background-size: cover;.left {position: absolute;left: 0;top: 0;width: 360px;height: 100%;.login-form {background-color: transparent;width: 100%;right: inherit;padding: 0 12px;box-sizing: border-box;display: flex;justify-content: center;flex-direction: column;}.title-container {text-align: center;font-size: 24px;.title {margin: 20px 0;}}.el-form-item {position: relative;.svg-container {padding: 6px 5px 6px 15px;color: #889aa4;vertical-align: middle;display: inline-block;position: absolute;left: 0;top: 0;z-index: 1;padding: 0;line-height: 40px;width: 30px;text-align: center;}.el-input {display: inline-block;height: 40px;width: 100%;& /deep/ input {background: transparent;border: 0px;-webkit-appearance: none;padding: 0 15px 0 30px;color: #fff;height: 40px;}}}}.center {position: absolute;left: 50%;top: 50%;width: 360px;transform: translate3d(-50%,-50%,0);height: 446px;border-radius: 8px;}.right {position: absolute;left: inherit;right: 0;top: 0;width: 360px;height: 100%;}.code {.el-form-item__content {position: relative;.getCodeBt {position: absolute;right: 0;top: 0;line-height: 40px;width: 100px;background-color: rgba(51,51,51,0.4);color: #fff;text-align: center;border-radius: 0 4px 4px 0;height: 40px;overflow: hidden;span {padding: 0 5px;display: inline-block;font-size: 16px;font-weight: 600;}}.el-input {& /deep/ input {padding: 0 130px 0 30px;}}}}.setting {& /deep/ .el-form-item__content {padding: 0 15px;box-sizing: border-box;line-height: 32px;height: 32px;font-size: 14px;color: #999;margin: 0 !important;.register {float: left;width: 50%;}.reset {float: right;width: 50%;text-align: right;}}}.style2 {padding-left: 30px;.svg-container {left: -30px !important;}.el-input {& /deep/ input {padding: 0 15px !important;}}}.code.style2, .code.style3 {.el-input {& /deep/ input {padding: 0 115px 0 15px;}}}.style3 {& /deep/ .el-form-item__label {padding-right: 6px;}.el-input {& /deep/ input {padding: 0 15px !important;}}}.role {& /deep/ .el-form-item__label {width: 56px !important;}& /deep/ .el-radio {margin-right: 12px;}}}
</style>

3.6 uniapp代码

<template><view class="content"><view class="box" :style='{"padding":"24rpx","background":"url(http://codegen.caihongy.cn/20231129/b245d02724c846eb81ec48ed8ffd3ba3.png)","width":"100%","backgroundSize":"cover","backgroundPosition":"center center","backgroundRepeat":"no-repeat","height":"100%"}'><view :style='{"width":"100%","padding":"24rpx 24rpx","position":"relative","flexWrap":"wrap","display":"flex","height":"auto"}'><image :style='{"width":"120rpx","margin":"0 auto 24rpx","borderRadius":"50%","display":"block","height":"120rpx","order":"1"}' src="https://img-blog.csdnimg.cn/img_convert/51919a48762d28dc6336b713589210e9.webp?x-oss-process=image/format,png" mode="aspectFill"></image><view v-if="loginType==1" :style='{"width":"100%","margin":"0 0 0","flexWrap":"wrap","display":"flex","height":"auto","order":"2"}' class="uni-form-item uni-column"><view :style='{"width":"100%","lineHeight":"88rpx","fontSize":"26rpx","color":"#000","textAlign":"left","fontWeight":"bold"}' class="label">账号:</view><input v-model="username" :style='{"border":"2rpx solid #aaa","padding":"0px 24rpx","margin":"0px","color":"rgb(0, 0, 0)","borderRadius":"0","flex":"1","background":"none","borderWidth":"0 0 2rpx","fontSize":"28rpx","height":"88rpx"}' type="text" class="uni-input" name="" placeholder="请输入账号" /></view><view v-if="loginType==1" :style='{"width":"100%","margin":"0 0 0","flexWrap":"wrap","display":"flex","height":"auto","order":"2"}' class="uni-form-item uni-column"><view :style='{"width":"100%","lineHeight":"88rpx","fontSize":"26rpx","color":"#000","textAlign":"left","fontWeight":"bold"}' class="label">密码:</view><input v-model="password" :style='{"border":"2rpx solid #aaa","padding":"0px 24rpx","margin":"0px","color":"rgb(0, 0, 0)","borderRadius":"0","flex":"1","background":"none","borderWidth":"0 0 2rpx","fontSize":"28rpx","height":"88rpx"}' type="password" class="uni-input" name="" placeholder="请输入密码" /></view><view v-if="roleNum>1" :style='{"width":"100%","margin":"0 0 24rpx 0","display":"block","height":"auto","order":"4"}'><view :style='{"width":"100%","lineHeight":"88rpx","fontSize":"26rpx","color":"#000","textAlign":"left","fontWeight":"bold"}' class="label">用户类型:</view><picker @change="optionsChange" :value="index" :range="options" :style='{"width":"100%","lineHeight":"48rpx","fontSize":"24rpx","textDecoration":"underline","color":"#424EF0","textAlign":"left"}'><view class="uni-picker-type">{{options[index]}}</view></picker></view><button v-if="loginType==1" class="btn-submit" @tap="onLoginTap" type="primary" :style='{"border":"0","padding":"0px","margin":"24rpx auto ","color":"rgb(255, 255, 255)","borderRadius":"8rpx","background":"url(http://codegen.caihongy.cn/20231129/e83626e1e97e489099693ee9348afd12.png)","width":"120rpx","lineHeight":"120rpx","fontSize":"0","backgroundSize":"cover","backgroundPosition":"center center","backgroundRepeat":"no-repeat","fontWeight":"bold","height":"120rpx","order":"7"}'></button><button v-if="loginType==2" class="btn-submit" @tap="onFaceLoginTap" type="primary" :style='{"border":"0","padding":"0px","margin":"24rpx auto ","color":"rgb(255, 255, 255)","borderRadius":"8rpx","background":"url(http://codegen.caihongy.cn/20231129/e83626e1e97e489099693ee9348afd12.png)","width":"120rpx","lineHeight":"120rpx","fontSize":"0","backgroundSize":"cover","backgroundPosition":"center center","backgroundRepeat":"no-repeat","fontWeight":"bold","height":"120rpx","order":"7"}'>人脸识别登录</button><view class="links" :style='{"margin":"0 0 24rpx 0","flexWrap":"wrap","display":"flex","width":"100%","justifyContent":"flex-end","height":"auto","order":"6"}'><view class="link-highlight" @tap="onRegisterTap('xuesheng')" :style='{"color":"#9E9E9E","padding":"0 12rpx","fontSize":"24rpx"}'>注册学生</view><view class="link-highlight" @tap="onRegisterTap('jiaoshi')" :style='{"color":"#9E9E9E","padding":"0 12rpx","fontSize":"24rpx"}'>注册教师</view></view><view class="idea1" :style='{"width":"100%","background":"red","display":"none","height":"80rpx"}'>idea1</view><view class="idea2" :style='{"width":"100%","background":"red","display":"none","height":"80rpx"}'>idea2</view><view class="idea3" :style='{"width":"100%","background":"red","display":"none","height":"80rpx"}'>idea3</view></view></view></view>
</template><script>import menu from '@/utils/menu'export default {data() {return {username: '',password: '',loginType:1,codes: [{num: 1,color: '#000',rotate: '10deg',size: '16px'}, {num: 2,color: '#000',rotate: '10deg',size: '16px'}, {num: 3,color: '#000',rotate: '10deg',size: '16px'}, {num: 4,color: '#000',rotate: '10deg',size: '16px'}],options: ['请选择登录用户类型',],optionsValues: ['','xuesheng','jiaoshi',],index: 0,roleNum:0,}},onLoad() {let options = ['请选择登录用户类型'];let menus = menu.list();this.menuList = menus;for(let i=0;i<this.menuList.length;i++){if(this.menuList[i].hasFrontLogin=='是'){options.push(this.menuList[i].roleName);this.roleNum++;}}if(this.roleNum==1) {this.index = 1;}	this.options = options;this.styleChange()},onShow() {},mounted() {},methods: {styleChange() {this.$nextTick(()=>{// document.querySelectorAll('.uni-input .uni-input-input').forEach(el=>{//   el.style.backgroundColor = this.loginFrom.content.input.backgroundColor// })})},onRegisterTap(tableName) {uni.setStorageSync("loginTable", tableName);this.$utils.jump('../register/register')},async onLoginTap() {if (!this.username) {this.$utils.msg('请输入用户名')return}if (!this.password) {this.$utils.msg('请输入用户密码')return}if (!this.optionsValues[this.index]) {this.$utils.msg('请选择登录用户类型')return}this.loginPost()},async loginPost() {let res = await this.$api.login(`${this.optionsValues[this.index]}`, {username: this.username,password: this.password});uni.removeStorageSync("useridTag");uni.setStorageSync("appToken", res.token);uni.setStorageSync("nickname",this.username);uni.setStorageSync("nowTable", `${this.optionsValues[this.index]}`);res = await this.$api.session(`${this.optionsValues[this.index]}`);if(res.data.touxiang) {uni.setStorageSync('headportrait', res.data.touxiang);} else if(res.data.headportrait) {uni.setStorageSync('headportrait', res.data.headportrait);}uni.setStorageSync('userSession',JSON.stringify(res.data))// 保存用户iduni.setStorageSync("appUserid", res.data.id);if(res.data.vip) {uni.setStorageSync("vip", res.data.vip);}uni.setStorageSync("appRole", `${this.options[this.index]}`);this.$utils.tab('../index/index');},optionsChange(e) {this.index = e.target.value}}}
</script><style lang="scss" scoped>page {height: 100%;}.content {height: 100%;box-sizing: border-box;}</style>

4 数据库表设计

用户注册实体图如图所示:
在这里插入图片描述

数据库表的设计,如下表:
在这里插入图片描述

5 文档参考

在这里插入图片描述

6 计算机毕设选题推荐

最新计算机软件毕业设计选题大全:整理中…

7 源码获取

👇🏻获取联系方式在文章末尾 如果想入行提升技术的可以看我专栏其他内容:

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/419277.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

用了虚拟机后,本机摄像头打不开了(联想电脑thinkpad)

虚拟机有摄像头&#xff0c;我断开了连接&#xff0c;现在本机的摄像头打开就是一个锁 我先把虚拟机的摄像头关了 然后把本机的vm usb关闭了 WinR&#xff09;&#xff0c;输入services.msc&#xff0c;找到VMware USB Arbitration Service&#xff0c;确保其状态为“关闭 然后…

【Day09-IO-字符流其它流】

IO流 IO流-字符流 字节流&#xff1a;适合复制文件等&#xff0c;不适合读写文本文件 字符流&#xff1a;适合读写文本文件内容 FileReader&#xff08;文件字符输入流&#xff09; 作用&#xff1a;以内存为基准&#xff0c;可以把文件中的数据以字符的形式读入到内存中来。 …

【Qt】窗口移动和大小改变事件

窗口移动和大小改变事件 moveEvent窗口移动时触发的事件resizeEvent窗口大小改变时触发的事件 例子&#xff1a;测试移动窗口和改变窗口事件 代码展示 #include "widget.h" #include "ui_widget.h"#include <QDebug> #include <QMoveEvent> …

Springboot中基于X509完成SSL检验的原理与实践

前言 各位对HTTPS不陌生吧&#xff1f;几乎涉及安全的领域&#xff0c;均要求通过HTTPS协议进行数据传输。而在传输过程中&#xff0c;又涉及到了SSL证书的使用。既然提到了SSL证书&#xff0c;那咱们先了解了解什么是SSL证书&#xff1a; SSL证书通过在客户端浏览器和Web服务…

如何恢复回收站中已删除/清空的文件

回收站清空后如何恢复已删除的文件&#xff1f;是否可以恢复永久删除的文件&#xff1f;或者最糟糕的是&#xff0c;如果文件直接被删除怎么办&#xff1f;本文将向您展示清空回收站后恢复已删除数据的最佳方法。 回收站清空后如何恢复已删除的文件&#xff1f; “回收站清空后…

show命令监控分析mysql实例信息

文章目录 思维导图show 查看数据库实例相关信息SHOW VARIABLES 分析数据库当前变量设置分析连接数据分析线程数分析慢查询变量分析缓存相关分析字符集相关 SHOW STATUS 数据库当前实时状态分析分析连接数据分析线程数分析慢查询分析查询缓存分析排序使用情况分析文件打开数mysq…

spring的xml配置文件爆红(原因以及解决办法)

1&#xff09;出现这个原因是因为spring-framework依赖没有导入 可以看到依赖已经导入了 2&#xff09;第二种原因:我们打开maven工程就是不出现右上角刷新的按钮&#xff0c;导致我们无法导入依赖 解决办法如下

【Qt】qt发布Release版本,打包.exe可执行文件

前言&#xff1a;Qt编译的可执行程序&#xff0c;如果直接运行&#xff0c;会出现0xc000007b报错&#xff0c;或者“由于占不到Qt5Network.dll,无法继续执行代码。重新安装程序可能会解决此问题”的报错&#xff0c;因为缺少相关的依赖包和动态库。 1、第一步&#xff1a;找到…

Node.js学习记录(二)

目录 一、express 1、初识express 2、安装express 3、创建并启动web服务器 4、监听 GET&POST 请求、响应内容给客户端 5、获取URL中携带的查询参数 6、获取URL中动态参数 7、静态资源托管 二、工具nodemon 三、express路由 1、express中路由 2、路由的匹配 3、…

网络学习-eNSP配置ACL

AR1路由器配置 <Huawei>system-view Enter system view, return user view with CtrlZ. [Huawei]undo info-center enable Info: Information center is disabled. [Huawei]interface gigabitethernet 0/0/0 [Huawei-GigabitEthernet0/0/0]ip address 192.168.2.254 24 …

Shader 渲染路径

实际的游戏开发中&#xff0c;场景中的光源肯定是更多、更复杂的&#xff0c;如果只有一个平行光的处理&#xff0c;完全不能满足需求。处理更多的光源&#xff0c;我们就需要了解Unity底层是如何处理这些光源的。 1、渲染路径是什么 渲染路径&#xff08;Rendering Path&…

9.8笔试记录

1.在c中哪些运算符不能重载? 在 C 中&#xff0c;有以下几个运算符不能被重载&#xff1a; . &#xff1a;成员访问运算符。例如obj.member中的.不能被重载。 :: &#xff1a;作用域解析运算符。用于指定命名空间、类等的作用域&#xff0c;不能被重载。 ?: &#xff1…

Linux-文本处理三剑客:grep、sed-和-awk

awk、grep、sed是linux操作文本的三大利器&#xff0c;合称文本三剑客&#xff0c;也是必须掌握的linux命令之一。三者的功能都是处理文本&#xff0c;但侧重点各不相同&#xff0c;其中属awk功能最强大&#xff0c;但也最复杂。grep更适合单纯的查找或匹配文本&#xff0c;sed…

Window下编译OpenJDK17

本文详细介绍Window下如何编译OpenJDK17&#xff0c;包含源码路径&#xff0c;各工具下载地址&#xff0c;严格按照文章中的步骤来操作&#xff0c;你将获得一个由自己亲手编译出的jdk。 一、下载OpenJDK17源码 下载地址&#xff1a;GitHub - openjdk/jdk at jdk-1735 说明&a…

【重学 MySQL】二十、运算符的优先级

【重学 MySQL】二十、运算符的优先级 MySQL 运算符的优先级&#xff08;由高到低&#xff09;注意事项示例 在 MySQL 中&#xff0c;运算符的优先级决定了在表达式中各个运算符被计算的先后顺序。了解运算符的优先级对于编写正确且高效的 SQL 语句至关重要。以下是根据高权威性…

神仙公司名单(北京)

神仙公司&#xff08;北京&#xff09; 接着奏乐接着舞&#xff0c;神仙公司系列。 这次写之前几期评论区呼声极高的城市&#xff1a;北京。 北京&#xff0c;是许多人外出打工的梦想之都&#xff0c;是年轻人逃离农村的终点站。 在近两年的就业蓝皮书「外省籍毕业生占比较高城…

react文件详情

1、node_modules&#xff1a;存放项目所依赖的一些第三方包文件 2、public&#xff1a;静态资源文件夹 favicon.ico&#xff1a;导航图标 index.html&#xff1a;项目首页的html模版 logo192.png&#xff1a;logo图片 logo512.png&#xff1a;logo图片 manifest.json&#…

鸿蒙轻内核M核源码分析系列十九 Musl LibC

往期知识点记录&#xff1a; 鸿蒙&#xff08;HarmonyOS&#xff09;应用层开发&#xff08;北向&#xff09;知识点汇总 轻内核M核源码分析系列一 数据结构-双向循环链表 轻内核M核源码分析系列二 数据结构-任务就绪队列 鸿蒙轻内核M核源码分析系列三 数据结构-任务排序链表 轻…

前端:HTML、CSS、JS、Vue

1 前端 内容概要 了解前端三件套(HTML、CSS、JS)在前端所起的作用掌握HTML标签的功能&#xff0c;掌握重要标签(a标签&#xff0c;form标签)了解CSS了解JS的基础语法掌握Vue的基础语法重点掌握Vue项目怎么启动项目掌握前后端分离是什么。前端做什么事情&#xff0c;后端做什么…

2024年第十五届蓝桥杯青少组国赛撞期GESP认证、放弃那个?

昨天蓝桥杯青少组官网发布了速查|第十五届蓝桥杯大赛青少组省赛成绩查询&#xff0c;首先恭喜2024年蓝桥杯青少组省赛一等奖的同学晋级蓝桥杯大赛青少组国赛&#xff0c;蓝桥杯青少组国赛的时间为2024年9月7日&#xff0c;CCF GESP编程能力等级认证也在同一天开始&#xff0c;同…