[免費]微信小程序(校園)二手交易系統(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.pswp.cn/bicheng/72394.shtml
繁體地址,請注明出處:http://hk.pswp.cn/bicheng/72394.shtml
英文地址,請注明出處:http://en.pswp.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.三…