[免费]微信小程序(校园)二手交易系统(uni-app+SpringBoot后端+Vue管理端)【论文+源码+SQL脚本】

大家好,我是java1234_小锋老师,看到一个不错的微信小程序(校园)二手交易系统(uni-app+SpringBoot后端+Vue管理端),分享下哈。

项目视频演示

【免费】微信小程序(校园)二手交易系统(uni-app+SpringBoot后端+Vue管理端) Java毕业设计_哔哩哔哩_bilibili

项目介绍

当今社会已经步入了科学技术进步和经济社会快速发展的新时期,国际信息和学术交流也不断加强,计算机技术对经济社会发展和人民生活改善的影响也日益突出,人类的生存和思考方式也产生了变化。传统高校二手商品交易采取了人工的管理方法,但这种管理方法存在着许多弊端,比如效率低下、安全性低以及信息传输的不准确等,同时由于高校二手商品交易中会形成众多的个人文档和信息系统数据,通过人工方法对二手物品、二手交易、校园论坛等进行集中管理会形成检索、更改和维护等较为麻烦的管理问题,同时由于广大用户对网络技术的需求也日益高涨,于是信息技术也需要继续开展全新的改革以满足时代的需求。根据此问题,研发一套高校二手商品交易平台,既能够大大提高信息的检索、变更与维护的工作效率,也能够方便微信小程序的管理运用,从而减少信息管理成本,提高效率。

该高校二手商品交易平台采用Uni-weixin、SpringBoot架构技术,前端以小程序页面呈现给用户,结合后台java语言使页面更加完善,后台使用MySQL数据库进行数据存储。该微信小程序主要设计并完成了管理过程中的用户注册登录、个人信息修改、用户、物品分类、二手物品、二手交易、校园论坛等功能。该微信小程序操作简便,界面设计简洁,不但可以基本满足本行业的日常管理工作,同时又可以有效减少人员成本和时间成本,为高校二手商品交易管理工作提供了方便。

系统展示

部分代码


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.UsersEntity;
import com.service.TokenService;
import com.service.UsersService;
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 UsersController{@Autowiredprivate UsersService userService;@Autowiredprivate TokenService tokenService;/*** 登录*/@IgnoreAuth@RequestMapping(value = "/login")public R login(String username, String password, String captcha, HttpServletRequest request) {UsersEntity user = userService.selectOne(new EntityWrapper<UsersEntity>().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 UsersEntity user){
//    	ValidatorUtils.validateEntity(user);if(userService.selectOne(new EntityWrapper<UsersEntity>().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){UsersEntity user = userService.selectOne(new EntityWrapper<UsersEntity>().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,UsersEntity user){EntityWrapper<UsersEntity> ew = new EntityWrapper<UsersEntity>();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( UsersEntity user){EntityWrapper<UsersEntity> ew = new EntityWrapper<UsersEntity>();ew.allEq(MPUtil.allEQMapPre( user, "user")); return R.ok().put("data", userService.selectListView(ew));}/*** 信息*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") String id){UsersEntity user = userService.selectById(id);return R.ok().put("data", user);}/*** 获取用户的session用户信息*/@RequestMapping("/session")public R getCurrUser(HttpServletRequest request){Long id = (Long)request.getSession().getAttribute("userId");UsersEntity user = userService.selectById(id);return R.ok().put("data", user);}/*** 保存*/@PostMapping("/save")public R save(@RequestBody UsersEntity user){
//    	ValidatorUtils.validateEntity(user);if(userService.selectOne(new EntityWrapper<UsersEntity>().eq("username", user.getUsername())) !=null) {return R.error("用户已存在");}userService.insert(user);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody UsersEntity user){
//        ValidatorUtils.validateEntity(user);UsersEntity u = userService.selectOne(new EntityWrapper<UsersEntity>().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();}
}
<template><div><div class="container" :style='{"minHeight":"100vh","alignItems":"center","background":"url(http://codegen.caihongy.cn/20220720/699aa3b06dfe4880b002da88c76067c2.png)","display":"flex","width":"100%","backgroundSize":"cover","backgroundPosition":"center center","backgroundRepeat":"no-repeat","justifyContent":"center"}'><el-form :style='{"padding":"0px 20px","boxShadow":"0px 4px 10px 0px rgba(0, 0, 0, 0.1020)","margin":"0 0 0 550px","borderRadius":"0 10px 10px 0","background":"#fff","flexDirection":"column","display":"flex","width":"400px","position":"relative","justifyContent":"center","height":"550px"}'><div v-if="true" :style='{"padding":"20px 50px","margin":"0 0 10px 0","color":"#fff","alignItems":"center","display":"flex","justifyContent":"center","top":"0","borderRadius":"10px 0 0 10px","left":"-550px","background":"rgba(190, 132, 48, .6)","width":"550px","lineHeight":"44px","fontSize":"30px","position":"absolute","height":"550px"}' class="title-container">高校二手商品交易平台的设计与实现登录</div><div v-if="loginType==1" class="list-item" :style='{"width":"80%","margin":"10px auto 5px","alignItems":"center","flexWrap":"wrap","display":"flex"}'><div v-if="false" class="lable" :style='{"width":"64px","lineHeight":"44px","fontSize":"14px","color":"rgba(64, 158, 255, 1)"}'>用户名:</div><input :style='{"border":"0px solid rgba(64, 158, 255, 1)","padding":"0 10px","boxShadow":"0px 4px 10px 0px rgba(0,0,0,0.3020)","color":"#000","outlineOffset":"4px","width":"100%","fontSize":"14px","height":"44px"}' placeholder="请输入用户名" name="username" type="text" v-model="rulesForm.username"></div><div v-if="loginType==1" class="list-item" :style='{"width":"80%","margin":"10px auto 5px","alignItems":"center","flexWrap":"wrap","display":"flex"}'><div v-if="false" class="lable" :style='{"width":"64px","lineHeight":"44px","fontSize":"14px","color":"rgba(64, 158, 255, 1)"}'>密码:</div><input :style='{"border":"0px solid rgba(64, 158, 255, 1)","padding":"0 10px","boxShadow":"0px 4px 10px 0px rgba(0,0,0,0.3020)","color":"#000","outlineOffset":"4px","width":"100%","fontSize":"14px","height":"44px"}' placeholder="请输入密码" name="password" type="password" v-model="rulesForm.password"></div><div :style='{"width":"80%","margin":"20px auto"}' v-if="roles.length>1" prop="loginInRole" class="list-type"><el-radio v-for="item in roles" v-bind:key="item.roleName" v-model="rulesForm.role" :label="item.roleName">{{item.roleName}}</el-radio></div><div :style='{"width":"80%","margin":"20px auto","alignItems":"center","flexWrap":"wrap","justifyContent":"center","display":"flex"}'><el-button v-if="loginType==1" :style='{"border":"0","cursor":"pointer","padding":"0 24px","margin":"0 50px","outline":"none","color":"#fff","borderRadius":"4px","background":"rgba(253, 190, 96, 1)","width":"150px","fontSize":"16px","height":"44px"}' type="primary" @click="login()" class="loginInBt">登录</el-button></div></el-form></div></div>
</template>
<script>import menu from "@/utils/menu";
export default {data() {return {baseUrl:this.$base.url,loginType: 1,rulesForm: {username: "",password: "",role: "",code: '',},menus: [],roles: [],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;for (let i = 0; i < this.menus.length; i++) {if (this.menus[i].hasBackLogin=='是') {this.roles.push(this.menus[i])}}},created() {this.getRandCode()},destroyed() {},components: {},methods: {//注册register(tableName){this.$storage.set("loginTable", tableName);this.$storage.set("pageFlag", "register");this.$router.push({path:'/register'})},// 登陆login() {if (!this.rulesForm.username) {this.$message.error("请输入用户名");return;}if (!this.rulesForm.password) {this.$message.error("请输入密码");return;}if(this.roles.length>1) {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;}}} else {this.tableName = this.roles[0].tableName;this.rulesForm.role = this.roles[0].roleName;}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>
.container {min-height: 100vh;position: relative;background-repeat: no-repeat;background-position: center center;background-size: cover;background: url(http://codegen.caihongy.cn/20220720/699aa3b06dfe4880b002da88c76067c2.png);.list-item /deep/ .el-input .el-input__inner {border: 0px solid rgba(64, 158, 255, 1);padding: 0 10px;box-shadow: 0px 4px 10px 0px rgba(0,0,0,0.3020);color: #000;width: 100%;font-size: 14px;outline-offset: 4px;height: 44px;}.list-code /deep/ .el-input .el-input__inner {border: 0;padding: 0 10px;box-shadow: 0px 4px 10px 0px rgba(0,0,0,0.3020);outline: none;color: #000;width: 100%;font-size: 14px;height: 44px;}.list-type /deep/ .el-radio__input .el-radio__inner {background: rgba(53, 53, 53, 0);border-color: #666666;}.list-type /deep/ .el-radio__input.is-checked .el-radio__inner {background: rgba(165, 155, 149, 1);border-color: rgba(165, 155, 149, 1);}.list-type /deep/ .el-radio__label {color: #666666;font-size: 14px;}.list-type /deep/ .el-radio__input.is-checked+.el-radio__label {color: rgba(165, 155, 149, 1);font-size: 14px;}
}
</style>

源码下载

链接:https://pan.baidu.com/s/1PgUBG7ubcKkF3W4GQzkiBw
提取码:1234

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

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

相关文章

【详细讲解在STM32的UART通信中使用DMA机制】

详细讲解在STM32的UART通信中使用DMA机制 目录 详细讲解在STM32的UART通信中使用DMA机制一、DMA机制概述二、DMA在UART中的作用三、DMA的配置步骤四、UART初始化与DMA结合五、DMA传输的中断处理六、DMA与中断的结合使用七、注意事项与常见问题八、代码示例九、总结 一、DMA机制…

M系列芯片 MacOS 在 Conda 环境中安装 TensorFlow 2 和 Keras 3 完整指南

目录 1. 引言2. 环境准备3. 安装 TensorFlow 和必要依赖4. 结语Reference 1. 引言 Keras 是搞深度学习很可爱的工具&#xff0c;其友好的接口让我总是将其作为搭建模型原型的首选。然而&#xff0c;当我希望在 M 系列芯片的MacBook Pro上使用 Keras时&#xff0c;使用Conda和P…

清华北大DeepSeek六册

「清华北大-Deepseek使用手册」 链接&#xff1a;https://pan.quark.cn/s/98782f7d61dc 「清华大学Deepseek整理&#xff09; 1&#xff0d;6版本链接&#xff1a;https://pan.quark.cn/s/72194e32428a AI学术工具公测链接:https://pan.baidu.com/s/104w_uBB2F42Da0qnk78_ew …

paddlehub hub TypeError 错误

pip install paddlehub hub install chinese_ocr_db_crnn_mobile 提示错误&#xff1a; TypeError: Descriptors cannot be created directly. If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc > 3.19.0…

零信任沙箱:为网络安全筑牢“隔离墙”

在数字化浪潮汹涌澎湃的今天&#xff0c;网络安全如同一艘船在波涛汹涌的大海中航行&#xff0c;面临着重重挑战。数据泄露、恶意软件攻击、网络钓鱼等安全威胁层出不穷&#xff0c;让企业和个人用户防不胜防。而零信任沙箱&#xff0c;就像是一座坚固的“隔离墙”&#xff0c;…

【String】917. 仅仅反转字母

917. 仅仅反转字母 - 力扣&#xff08;LeetCode&#xff09; 使用双指针&#xff0c;一个指针指向s的开始&#xff0c;一个指向s的末尾&#xff0c;同时遍历即可。

大语言模型学习

大语言模型发展历程 当前国内外主流LLM模型 ‌一、国外主流LLM‌ ‌LLaMA2‌ Meta推出的开源模型&#xff0c;参数规模涵盖70亿至700亿&#xff0c;支持代码生成和多领域任务适配‌57。衍生版本包括Code Llama&#xff08;代码生成优化&#xff09;和Llama Chat&#xff08;对…

3dsmax烘焙光照贴图然后在unity中使用

效果预览 看不清[完蛋&#xff01;] 实现步骤 使用 软件 软体名称地址photoshophttps://www.adobe.com/products/photoshop.htmlunity3Dhttps://unity.com/3dsmaxhttps://www.autodesk.com.cn/products/3ds-max/free-trialpacker-iohttps://www.uv-packer.com/HDR 贴图地址…

P8651 [蓝桥杯 2017 省 B] 日期问题--注意日期问题中2月的天数 / if是否应该连用

P8651 [P8651 [蓝桥杯 2017 省 B] 日期问题--注意日期问题中2月的天数 / if是否应该连用 题目 分析代码 题目 分析 代码中巧妙的用到3重循环&#xff0c;完美的解决了输出的顺序问题【题目要求从小到大】 需要注意的是2月的值&#xff0c;在不同的年份中应该更新2月的值 还有…

android 横竖屏适配工作总结

1、创建一个横屏文件夹&#xff0c;复制一份竖屏的布局。然后修改适配横屏。只要布局id都有&#xff0c;其他想怎么改就怎么修改。 2、最好使用kotlin语言编写和使用viewBinding绑定控件&#xff0c;可以使用?.判空控件是否存在&#xff0c;不至于缺少这个控件时候直接崩溃。 …

VS2022远程调试Ubuntu中的C++程序

前言 最近想基于星火大模型的SDK开发第一些应用。但是&#xff0c;发现星火的SDK当中Linux版本的比较丰富&#xff0c;Windows 版本支持的比较少。但是&#xff0c;从调试的IDE而言&#xff0c;Visual Studio又是最方便的。所以&#xff0c;考虑采用Visual Studio Ubuntu的形式…

VS Code(Cursor)远程开发调试教程(超详细)

前言 &#x1f4e2; 声明&#xff1a;本文配置及开发方法同样适合Cursor &#xff01;&#xff01; 在开始之前&#xff0c;你需要准备以下东西&#xff1a; 本地电脑&#xff1a; 安装好 VS Code&#xff08;Windows、Mac 或 Linux 都可以&#xff09;。 官网下载&#xff0c…

【C++】类与对象:深入理解默认成员函数

类与对象&#xff1a;深入理解默认成员函数 引言1、默认成员函数概述2、构造函数与析构函数2.1 默认构造函数2.2 析构函数 3、拷贝控制成员3.1 拷贝构造函数3.2 赋值运算符重载 4、移动语义&#xff08;C11&#xff09;4.1 移动构造函数4.2 移动赋值运算符 5、三五法则与最佳实…

QT实现计算器

1&#xff1a;在注册登录的练习里面&#xff0c; 追加一个QListWidget 项目列表 要求&#xff1a;点击注册之后&#xff0c;将账号显示到 listWidget上面去 以及&#xff0c;在listWidget中双击某个账号的时候&#xff0c;将该账号删除 Widget.h #ifndef WIDGET_H #define…

算法进阶——二分

二分法&#xff1a; 一种高效查找方法&#xff0c;将问题搜索范围一分为二&#xff0c;迭代地缩小范围&#xff0c;直到找到目标。 二分法适用于有序的数据集合。 常见的二分类型有&#xff1a; 整数二分 浮点二分 二分答案 二分解题步骤&#xff1a; 1.研究并发现数据…

Kotlin函数式编程与Lambda表达式

Kotlin函数式编程与Lambda表达式 一、函数式编程基础 1.1 什么是函数式编程 函数式编程是一种编程范式&#xff0c;它将计算过程视为数学函数的求值&#xff0c;强调使用不可变数据和纯函数。在Kotlin中&#xff0c;函数式编程的特性让我们能够写出更简洁、更易维护的代码。…

Java 并行流(parallelStream)详解

目录 1. 什么是 parallelStream&#xff1f;2. parallelStream 的优势3. parallelStream 的使用3.1 基本使用3.2 计算总和示例3.3 结合groupingByConcurrent实现线程安全的分组操作 4. parallelStream 的注意事项4.1 适用场景4.2 并行流的局限性 5. 控制并行流线程数6. 总结 1.…

Ubuntu 20.04下配置VSCode以支持OpenCV库开发

Ubuntu 20.04下配置VSCode以支持OpenCV库开发 1. 安装OpenCV库安装OpenCV&#xff08;推荐使用APT安装&#xff09;或者从源码安装OpenCV&#xff08;可选&#xff09; 2. 安装VSCode的C扩展3. 配置c_cpp_properties.json4. 编写代码并测试5. 配置tasks.json&#xff08;编译Op…

io学习----->标准io

思维导图&#xff1a; 一.io的作用 io是实现对文件的操作&#xff0c;把运行结果存到文件中&#xff0c;读取文件的数据&#xff0c;方便后期查询。 二.io的概念 io是指系统 和外部设备或用户之间的数据交互 I:input 表示数据从外部设备输入到内存中&#xff1b; O:output…

使用消息队列怎样防止消息重复?

大家好&#xff0c;我是君哥。 使用消息队列时&#xff0c;我们经常会遇到一个可能对业务产生影响的问题&#xff0c;消息重复。在订单、扣款、对账等对幂等有要求的场景&#xff0c;消息重复的问题必须解决。 那怎样应对重复消息呢&#xff1f;今天来聊一聊这个话题。 1.三…