[免費]微信小程序智能商城系統(uniapp+Springboot后端+vue管理端)【論文+源碼+SQL腳本】

大家好,我是java1234_小鋒老師,看到一個不錯的微信小程序智能商城系統(uniapp+Springboot后端+vue管理端),分享下哈。

項目視頻演示

【免費】微信小程序智能商城系統(uniapp+Springboot后端+vue管理端) Java畢業設計_嗶哩嗶哩_bilibili

項目介紹

互聯網發展至今,無論是其理論還是技術都已經成熟,而且它廣泛參與在社會中的方方面面。它讓信息都可以通過網絡傳播,搭配信息管理工具可以很好地為人們提供服務。針對高校教師成果信息管理混亂,出錯率高,信息安全性差,勞動強度大,費時費力等問題,采用智能小程序商城可以有效管理,使信息管理能夠更加科學和規范。

智能小程序商城使用Java語言進行編碼,使用Mysql創建數據表保存本系統產生的數據。系統可以提供信息顯示和相應服務,其管理智能小程序商城信息,查看智能小程序商城信息,管理智能小程序商城。

總之,智能小程序商城集中管理信息,有著保密性強,效率高,存儲空間大,成本低等諸多優點。它可以降低信息管理成本,實現信息管理計算機化。

系統展示

部分代碼


package com.controller;import java.util.List;
import java.util.Arrays;
import java.util.Map;import javax.servlet.http.HttpServletRequest;import com.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
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.RestController;import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.UsersEntity;
import com.service.TokenService;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;/*** 登錄相關*/
@RequestMapping("users")
@RestController
public class UsersController {@Autowiredprivate UsersService usersService;@Autowiredprivate TokenService tokenService;/*** 登錄*/@IgnoreAuth@PostMapping(value = "/login")public R login(String username, String password, String captcha, HttpServletRequest request) {UsersEntity user = usersService.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());R r = R.ok();r.put("token", token);r.put("role",user.getRole());r.put("userId",user.getId());return r;}/*** 注冊*/@IgnoreAuth@PostMapping(value = "/register")public R register(@RequestBody UsersEntity user){
//    	ValidatorUtils.validateEntity(user);if(usersService.selectOne(new EntityWrapper<UsersEntity>().eq("username", user.getUsername())) !=null) {return R.error("用戶已存在");}usersService.insert(user);return R.ok();}/*** 退出*/@GetMapping(value = "logout")public R logout(HttpServletRequest request) {request.getSession().invalidate();return R.ok("退出成功");}/*** 修改密碼*/@GetMapping(value = "/updatePassword")public R updatePassword(String  oldPassword, String  newPassword, HttpServletRequest request) {UsersEntity users = usersService.selectById((Integer)request.getSession().getAttribute("userId"));if(newPassword == null){return R.error("新密碼不能為空") ;}if(!oldPassword.equals(users.getPassword())){return R.error("原密碼輸入錯誤");}if(newPassword.equals(users.getPassword())){return R.error("新密碼不能和原密碼一致") ;}users.setPassword(newPassword);usersService.updateById(users);return R.ok();}/*** 密碼重置*/@IgnoreAuth@RequestMapping(value = "/resetPass")public R resetPass(String username, HttpServletRequest request){UsersEntity user = usersService.selectOne(new EntityWrapper<UsersEntity>().eq("username", username));if(user==null) {return R.error("賬號不存在");}user.setPassword("123456");usersService.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 = usersService.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", usersService.selectListView(ew));}/*** 信息*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") String id){UsersEntity user = usersService.selectById(id);return R.ok().put("data", user);}/*** 獲取用戶的session用戶信息*/@RequestMapping("/session")public R getCurrUser(HttpServletRequest request){Integer id = (Integer)request.getSession().getAttribute("userId");UsersEntity user = usersService.selectById(id);return R.ok().put("data", user);}/*** 保存*/@PostMapping("/save")public R save(@RequestBody UsersEntity user){
//    	ValidatorUtils.validateEntity(user);if(usersService.selectOne(new EntityWrapper<UsersEntity>().eq("username", user.getUsername())) !=null) {return R.error("用戶已存在");}usersService.insert(user);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody UsersEntity user){
//        ValidatorUtils.validateEntity(user);usersService.updateById(user);//全部更新return R.ok();}/*** 刪除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){List<UsersEntity> user = usersService.selectList(null);if(user.size() > 1){usersService.deleteBatchIds(Arrays.asList(ids));}else{return R.error("管理員最少保留一個");}return R.ok();}
}
<template><div><div class="container loginIn" style="backgroundImage: url(/zhinengxiaochengxsc/img/back-img-bg.jpg)"><div :class="2 == 1 ? 'left' : 2 == 2 ? 'left center' : 'left right'" style="backgroundColor: rgba(255, 255, 255, 0.15)"><el-form class="login-form" label-position="left" :label-width="1 == 3 ? '56px' : '0px'"><div class="title-container"><h3 class="title" style="color: var(--publicMainColor)">智能小程序商城</h3></div><el-form-item :label="1 == 3 ? '用戶名' : ''" :class="'style'+1"><span v-if="1 != 3" class="svg-container" style="color:rgba(18, 18, 18, 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(18, 18, 18, 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(18, 18, 18, 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 v-if="roleOptions.length>1" label="角色" prop="loginInRole" class="role" style="display: flex;align-items: center;"><el-radio@change="menuChange"v-for="item in roleOptions"v-bind:key="item.value"v-model="rulesForm.role":label="item.value">{{item.key}}</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:var(--publicMainColor); borderColor:var(--publicMainColor); color:rgba(255, 255, 255, 1)">{{'2' == '1' ? '登錄' : 'login'}}</el-button>          <el-form-item class="setting"><div class="register" @click="register('yonghu')">用戶注冊</div><div class="register" @click="register('shangjia')">商家注冊</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: [],roleOptions: [],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=='是') {let menuItem={};menuItem["key"]=this.menus[i].roleName;menuItem["value"]=this.menus[i].tableName;this.roleOptions.push(menuItem);}}},created() {this.getRandCode()},methods: {menuChange(role){},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.roleOptions.length>1) {console.log("1")if (!this.rulesForm.role) {this.$message.error("請選擇角色");return;}let menus = this.menus;for (let i = 0; i < menus.length; i++) {if (menus[i].tableName == this.rulesForm.role) {this.tableName = menus[i].tableName;this.rulesForm.role = menus[i].roleName;}}} else {this.tableName = this.roleOptions[0].value;this.rulesForm.role = this.roleOptions[0].key;}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("userId", data.userId);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","2", "4", "5", "6", "7", "8", "9"]let colors = ["0", "1", "2","2", "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: #fff;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;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%;color: var(--publicMainColor);}.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;color: var(--publicMainColor);}}}
</style>

源碼代碼

鏈接:https://pan.baidu.com/s/1GXFNJ2gs3olK2dVpuFL4pg
提取碼:1234

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/web/67706.shtml
繁體地址,請注明出處:http://hk.pswp.cn/web/67706.shtml
英文地址,請注明出處:http://en.pswp.cn/web/67706.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

PID算法的數學實現和參數確定方法

目錄 概述 1 算法描述 1.1 PID算法模型 1.2 PID離散化的圖形描述 1.3 PID算法的特點 2 離散化的PID算法 2.1 位置式PID算法 2.2 增量式PID算法 2.3 位置式PID與增量式PID比較 3 控制器參數整定 3.1 PID參數確定方法 3.1.1 湊試法 3.1.2 臨界比例法 3.1.3 經驗法…

《DeepSeek R1:大模型最簡安裝秘籍》

DeepSeek R1&#xff1a;AI 大模型界的新起之秀 在人工智能的璀璨星空中&#xff0c;大模型如繁星般閃耀&#xff0c;而 DeepSeek R1 無疑是其中一顆冉冉升起的新星&#xff0c;自問世以來便吸引了全球的目光&#xff0c;在人工智能領域占據了重要的一席之地。 從性能表現上看…

【論文閱讀】RAG-Reward: Optimizing RAG with Reward Modeling and RLHF

研究背景 研究問題&#xff1a;這篇文章要解決的問題是如何優化檢索增強生成&#xff08;RAG&#xff09;系統&#xff0c;特別是通過獎勵建模和人類反饋強化學習&#xff08;RLHF&#xff09;來提高大型語言模型&#xff08;LLMs&#xff09;在RAG任務中的效果。研究難點&…

【數據結構】(3)包裝類和泛型

一、包裝類 1、什么是包裝類 將基礎類型包裝成的類就是包裝類。由于基礎類型不是繼承 Object 類的類&#xff0c;所以在泛型不能直接支持基礎類型&#xff0c;為了解決這個問題&#xff0c;就需要把基礎類型轉換為對應的包裝類。 基礎類型對應的包裝類 基礎類型包裝類byteByte…

DBUtils中QueryRunner(空參,傳數據源)構造方法的區別及應用場景

關于學習Spring框架時重構DAO層時&#xff0c;遇到的QueryRunner構造方法的問題&#xff0c;回憶MySQL中DBUtils部分 1. 空參構造方法 new QueryRunner() 特點&#xff1a; 不綁定數據源&#xff1a;QueryRunner 實例內部沒有 DataSource&#xff0c;因此無法自動獲取連接。 …

C++11線程

C11提供了線程庫&#xff0c;下面我們來看一下如何使用。 線程的創建 頭文件 要創建一個線程需要包一個線程頭文件:#include <thread> 我們先來看看thread支持的構造方式。 支持默認構造&#xff0c;直接使用thread創建一個空的線程對象。 也支持帶參的構造&#x…

梯度提升用于高效的分類與回歸

人工智能例子匯總:AI常見的算法和例子-CSDN博客 使用 決策樹(Decision Tree) 實現 梯度提升(Gradient Boosting) 主要是模擬 GBDT(Gradient Boosting Decision Trees) 的原理,即: 第一棵樹擬合原始數據計算殘差(負梯度方向)用新的樹去擬合殘差累加所有樹的預測值重…

Golang 并發機制-3:通道(channels)機制詳解

并發編程是一種創建性能優化且響應迅速的軟件的強大方法。Golang&#xff08;也稱為 Go&#xff09;通過通道&#xff08;channels&#xff09;這一特性&#xff0c;能夠可靠且優雅地實現并發通信。本文將揭示通道的概念&#xff0c;解釋其在并發編程中的作用&#xff0c;并提供…

Unity開發游戲使用XLua的基礎

Unity使用Xlua的常用編碼方式&#xff0c;做一下記錄 1、C#調用lua 1、Lua解析器 private LuaEnv env new LuaEnv();//保持它的唯一性void Start(){env.DoString("print(你好lua)");//env.DoString("require(Main)"); 默認在resources文件夾下面//幫助…

筆記:使用ST-LINK燒錄STM32程序怎么樣最方便?

一般板子在插件上&#xff0c; 8腳 3.3V;9腳 CLK;10腳 DIO;4腳GND ST_Link 19腳 3.3V;9腳 CLK;7腳 DIO;20腳 GND 燒錄軟件&#xff1a;ST-LINK Utility&#xff0c;Keil_5; ST_Link 接口針腳定義&#xff1a; 按定義連接ST_Link與電路板&#xff1b; 打開STM32 ST-LINK Uti…

網絡測試工具

工具介紹&#xff1a; 這是一個功能完整的網絡測速工具&#xff0c;可以測試網絡的下載速度、上傳速度和延遲。 功能特點&#xff1a; 1. 速度測試 - 下載速度測試 - 上傳速度測試 - Ping延遲測試 - 自動選擇最佳服務器 2. 實時顯示 - 進度條顯示測試進度 - 實時顯示測試狀…

java每日精進1.31(SpringSecurity)

在所有的開發的系統中&#xff0c;都必須做認證(authentication)和授權(authorization)&#xff0c;以保證系統的安全性。 一、基礎使用 1.依賴 <dependencies><!-- 實現對 Spring MVC 的自動化配置 --><dependency><groupId>org.springframework.bo…

簡單的SQL語句的快速復習

語法的執行順序 select 4 字段列表 from 1 表名列表 where 2 條件列表 group by 3 分組前過濾 having 分組后過濾 order by 5 排序字段列表 limit 6 分頁參數 聚合函數 count 統計數量 max 最大值 min 最小值 avg 平均 sum 總和 分組查詢使…

《程序人生》工作2年感悟

一些雜七雜八的感悟&#xff1a; 1.把事做好比什么都重要&#xff0c; 先樹立量良好的形象&#xff0c;再橫向發展。 2.職場就是人情世故&#xff0c;但也不要被人情世故綁架。 3.要常懷感恩的心&#xff0c;要記住幫助過你的人&#xff0c;愿意和你分享的人&#xff0c;有能力…

17.2 圖形繪制8

版權聲明&#xff1a;本文為博主原創文章&#xff0c;轉載請在顯著位置標明本文出處以及作者網名&#xff0c;未經作者允許不得用于商業目的。 17.2.10 重繪 先看以下例子&#xff1a; 【例 17.28】【項目&#xff1a;code17-028】繪制填充矩形。 private void button1_Clic…

自定義數據集 使用pytorch框架實現邏輯回歸并保存模型,然后保存模型后再加載模型進行預測,對預測結果計算精確度和召回率及F1分數

import numpy as np import torch import torch.nn as nn import torch.optim as optim from sklearn.metrics import precision_score, recall_score, f1_score# 數據準備 class1_points np.array([[1.9, 1.2],[1.5, 2.1],[1.9, 0.5],[1.5, 0.9],[0.9, 1.2],[1.1, 1.7],[1.4,…

neo4j入門

文章目錄 neo4j版本說明部署安裝Mac部署docker部署 neo4j web工具使用數據結構圖數據庫VS關系數據庫 neo4j neo4j官網Neo4j是用ava實現的開源NoSQL圖數據庫。Neo4作為圖數據庫中的代表產品&#xff0c;已經在眾多的行業項目中進行了應用&#xff0c;如&#xff1a;網絡管理&am…

腳本運行禁止:npm 無法加載文件,因為在此系統上禁止運行腳本

問題與處理策略 1、問題描述 npm install -D tailwindcss執行上述指令&#xff0c;報如下錯誤 npm : 無法加載文件 D:\nodejs\npm.ps1&#xff0c;因為在此系統上禁止運行腳本。 有關詳細信息&#xff0c;請參閱 https:/go.microsoft.com/fwlink/?LinkID135170 中的 about_…

Java基礎——分層解耦——IOC和DI入門

目錄 三層架構 Controller Service Dao ?編輯 調用過程 面向接口編程 分層解耦 耦合 內聚 軟件設計原則 控制反轉 依賴注入 Bean對象 如何將類產生的對象交給IOC容器管理&#xff1f; 容器怎樣才能提供依賴的bean對象呢&#xff1f; 三層架構 Controller 控制…

智慧園區系統集成解決方案引領未來城市管理的智能化轉型

內容概要 在現代城市管理的背景下&#xff0c;“智慧園區系統集成解決方案”正扮演著越來越重要的角色。這種解決方案不僅僅是技術上的創新&#xff0c;更是一種全新的管理理念&#xff0c;它旨在通過高效的數據整合與分析&#xff0c;優化資源配置&#xff0c;提升運營效率。…