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健康管管理微信小程序的设计与实现(源码+数据库+文档)

项目描述
随着社会的发展,空巢老人的数量逐渐增加,他们面临着生活自理能力下降、心理孤独等问题,因此对于空巢老人健康管理的需求也越来越迫切。基于微信小程序的空巢老人健康管理系统应运而生,通过结合智能硬件和软件技术,为空巢老人提供更加全面、便捷的健康管理服务。
基于小程序的空巢老人健康管理系统能够为空巢老人提供全方位的健康管理服务。首先,系统可以通过智能设备监测老人的健康指标,如血压、血糖、心率等,及时发现异常情况并提醒老人及其家人或医护人员。其次,系统还可以根据老人的健康状况和需求,定制个性化健康管理方案,包括饮食、运动、用药等方面的建议,帮助老人保持良好的健康状态。此外,系统还可以提供社交功能,让老人可以与家人、朋友以及其他空巢老人进行交流和互动,减轻他们的孤独感和心理压力。
通过基于小程序的空巢老人健康管理系统,不仅可以提高空巢老人的健康管理水平,还可以减轻其家人和社会的负担。家人可以通过系统随时了解老人的健康状况,并根据系统提供的建议进行照料,从而保证老人的健康和安全。社会可以通过系统为空巢老人提供更多的关爱和支持,提高他们的生活质量,减少医疗资源的浪费和老龄人口的社会负担。
空巢老人可以通过小程序快速记录自己的身体健康数据,包括血压、血糖、体重等指标。系统会根据这些数据生成健康报告,提醒老人及时调整生活方式或就医。其次,系统还可以设定用药提醒功能,帮助老人按时服药,避免漏服或重复服药的情况发生。
系统还可以提供定期健康咨询服务和心理支持,帮助空巢老人保持积极的心态和健康的生活方式。同时,系统还可以实时监测老人的活动量和睡眠质量,提供运动与睡眠建议,帮助他们保持身心健康。基于微信小程序的空巢老人健康管理系统可以帮助空巢老人更好地管理自己的健康状况,提高生活质量,减少疾病发生风险,同时也减轻子女的负担。希望这样的系统能够得到更多的关注和推广,让更多的空巢老人受益。
总的来说,基于小程序的空巢老人健康管理系统对于解决空巢老人健康管理难题具有重要的意义。通过系统的全面监测和个性化管理,可以有效预防老年疾病和健康问题的发生,提高空巢老人的生活质量和幸福感。相信随着这一系统的推广和应用,空巢老人的健康管理将会得到有效的改善,为构建和谐社会做出积极的贡献。

在这里插入图片描述

2 项目截图

springboot基于微信小程序的空巢老人健康管理系统录像演示小程序端

springboot基于微信小程序的空巢老人健康管理系统录像演示2024服务端

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/416493.html

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

相关文章

qt报错 error: undefined reference to `vtable for RelayDevice 解决方法

在 Qt 编程中&#xff0c;当出现错误 undefined reference to ‘vtable for RelayDevice’ 时&#xff0c;通常是因为类的虚函数没有实现&#xff0c;或者未正确实现虚析构函数。以下是一些可能的解决方法&#xff1a; 确保实现所有虚函数&#xff1a; 检查 RelayDevice 类中声…

git clone 别人的项目上传到自己的Gitee或者github仓库

git clone别人的项目 git clone https://github.com/wohuweixiya/yft-design.git 进入该项目内&#xff0c;删除原有的.git信息 rm -r .git 初始化.git git init 将本地代码添加到仓库 git add . git commit -m "提交仓库说明" Github上新建一个和这个clone下来…

Rust多线程编程概述

【图书介绍】《Rust编程与项目实战》-CSDN博客 《Rust编程与项目实战》(朱文伟&#xff0c;李建英)【摘要 书评 试读】- 京东图书 (jd.com) Rust到底值不值得学&#xff0c;之一 -CSDN博客 Rust到底值不值得学&#xff0c;之二-CSDN博客 12.2 多线程编程概述 12.2.1 线程…

基于51单片机的电动机控制系统的设计

文章目录 前言资料获取设计介绍功能介绍程序代码部分参考 设计清单具体实现截图参考文献设计获取 前言 &#x1f497;博主介绍&#xff1a;✌全网粉丝10W,CSDN特邀作者、博客专家、CSDN新星计划导师&#xff0c;一名热衷于单片机技术探索与分享的博主、专注于 精通51/STM32/MSP…

LLM大模型学习:AI时代,敏感词过滤,如何精准且高效,方法+代码实现

前言 自从我开始搞大模型应用&#xff0c;就一直有一个头疼的问题困扰着我的团队&#xff0c;那就是避免敏感信息。 传统的做法是通过一些匹配算法&#xff0c;过滤掉敏感词&#xff0c;这个后面我们再讲。 但大模型的对话中&#xff0c;想要防止他做一些不合法的事情&#…

论文速读|重新审视奖励设计与评估:用于强健人型机器人站立与行走控制的方法

论文地址&#xff1a;https://arxiv.org/pdf/2404.19173 这篇论文为类人机器人站立和行走&#xff08;SaW&#xff09;控制器的持续可衡量改进奠定了基础。通过引入一套定量实际基准测试方法&#xff0c;作者展示了现有控制器的优缺点&#xff0c;并通过基准测试指导新控制器的…

Linux malloc内存分配实现原理

目录 一、用户进程虚拟内存空间布局 二、malloc工作原理 2.1 malloc实现流程 2.1.1 brk方式申请内存 2.1.2 mmap方式分配内存 2.2 核心代码 2.3 malloc分配物理内存的时机 2.4 malloc分配的实际内存大小 三、虚拟内存与物理内存 3.1 如何建立映射 3.2 分配物理内存 …

大数据采集与分析实训室解决方案

随着信息技术的飞速发展&#xff0c;大数据已成为推动产业升级、社会进步的重要力量。为了培养适应未来社会需求的大数据专业人才&#xff0c;构建一套科学、先进的大数据采集与分析实训室解决方案显得尤为重要。为此&#xff0c;唯众特推出全面升级的大数据采集与分析实训室解…

使用实例:xxl-job应用在spring cloud微服务下

1、首先下载&#xff0c;从github上下载&#xff0c;选择zip然后直接解压 https://github.com/xuxueli/xxl-job/releases 2、解压完后用idea启动。 启动这个启动类&#xff0c;然后按照路径访问 http://localhost:8080/xxl-job-admin/ 3、在你的项目里编写一个单独的微服务&a…

mac的使用

mac使用python的问题 对于python的虚拟环境&#xff0c;其实是基于已经安装到本地的python来安装不同的包。&#xff08;之前我的mac上只安装了python3.9.6 &#xff0c;安装的位置为/usr/bin/python3&#xff09;然后我在vscode里怎么找都找不到如何弄一个python3.7.6 的版本…

Nginx部署前端vue项目操作步骤和方法~小皮

部署前端Vue.js项目到Nginx上&#xff0c;是开发流程中至关重要的一步&#xff0c;它意味着将静态文件托管在Web服务器上&#xff0c;使应用程序能够被用户访问和交互。下面将详细介绍如何使用Nginx部署前端Vue项目的操作步骤和方法&#xff1a; 准备构建Vue项目 安装Node.js和…

k8s集群环境搭建(一主二从--kubeadm安装)

前置条件 版本&#xff1a;CentOS Linux release 7.5.1804 (Core) 内存&#xff1a;2G CPU&#xff1a;2 主机名解析 vim /etc/hosts 192.168.109.100 master 192.168.109.101 node1 192.168.109.102 node2时间同步&#xff0c;这里直接使用chronyd服务从网络同步时间syste…

2024.9.2

还没写完 #include <iostream> #include <cstring> using namespace std;class myString { private:char *str; //字符串int size; //实际字符长度int len; //字符串容量 public:myString():size(10) //无参构造函数{len siz…

ES6语法详解

以下是ES6常用的一些语法和特性&#xff1a; 声明变量的关键字变化&#xff1a;使用let和const、var来声明变量。 箭头函数&#xff1a;使用箭头&#xff08;>&#xff09;定义函数&#xff0c;简化函数的写法。 模板字符串&#xff1a;使用反引号&#xff08;&#xff0…

学习大数据DAY52 Docker中的Mysql主从配置

Mysql 数据库主从同步 上机练习 1 容器生成命令 压缩包获取镜像 docker image load -i /root/mysql.tar 创建并开启两个镜像&#xff1a; docker run --name mysql1 -d -p 3333:3306 \ -v /opt/mysql1/conf:/etc/mysql/conf.d/ \ -v /opt/mysql1/data:/var/lib/mysql \…

★ 算法OJ题 ★ 力扣1089 - 复写零

Ciallo&#xff5e;(∠・ω< )⌒☆ ~ 今天&#xff0c;我将和大家一起做一道双指针算法题--复写零~ 目录 一 题目 二 算法解析 2.1 算法思路 2.2 算法流程 三 编写算法 一 题目 1089. 复写零 - 力扣&#xff08;LeetCode&#xff09; 二 算法解析 2.1 算法思路 …

国内独家首发 | OpenCSG开源中文版fineweb edu数据集

01 背景 近年来&#xff0c;人工智能&#xff08;AI&#xff09;技术&#xff0c;特别是自然语言处理&#xff08;NLP&#xff09;的飞速发展深刻影响着各个行业。从智能客服到内容生成&#xff0c;从语音识别到翻译工具&#xff0c;NLP的应用已经无处不在。在这一领域中&…

【Datawhale X 李宏毅苹果书 AI夏令营】深度学习自适应学习率(AdaGrad/RMSProp/Adam)及其调度

1、自适应学习率 理论上&#xff1a;在训练一个网络&#xff0c;训练到现在参数在临界点附近&#xff0c;再根据特征值的正负号判断该 临界点是鞍点还是局部最小值实际上&#xff1a;①在训练的时候&#xff0c;要走到鞍点或局部最小值非常困难&#xff1b;②多数还未走到临界…

一次性了解Neo4j图形数据库

Neo4j高性能的NoSQL图形数据库 它将结构化数据存储在网络&#xff08;从数学角度叫做图&#xff09;上而不是传统的表格中。 Neo4j是一个嵌入式的、基于磁盘的、具备完全事务特性的Java持久化引擎。 但它在数据表示上采用了图形模型&#xff0c;即数据以节点&#xff08;Nod…

基于Yolov5_6.1、LPRNet、PySide6开发的车牌识别系统

项目概述 项目背景 随着车辆数量的不断增加&#xff0c;车牌识别系统在交通管理、停车场自动化等领域变得越来越重要。本项目利用先进的深度学习技术和现代图形用户界面框架来实现高效的车牌识别功能。 项目特点 高效识别&#xff1a;采用 YOLOv5_6.1 进行车牌定位&#xff…