02 2022 档案

摘要:恢复内容开始 【get】 带param参数和请求头 方式1 axios({ method: "get", url: this.api + "/getstudent", params: { limit: 1, size: 5, }, }) .then((res) => { // 登陆失败 consol 阅读全文
posted @ 2022-02-28 20:52 Hello霖 阅读(319) 评论(0) 推荐(0)
摘要:import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) export default new Vuex.Store({ // 存储数据 state: { school:"卢本伟nb", age:18, gender:"man" }, / 阅读全文
posted @ 2022-02-28 10:34 Hello霖 阅读(395) 评论(0) 推荐(0)
摘要:简单获取写法: <template> <div>{{ $store.state.school}}</div> </template> 每次都需要填写 【$store.state.xxx】 快速获取写法: <script> import { mapState } from "vuex"; export 阅读全文
posted @ 2022-02-28 10:22 Hello霖 阅读(679) 评论(0) 推荐(0)
摘要:1.store目录下的index.js用来存储数据和方法 import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) export default new Vuex.Store({ // 存储数据 state: { school:"卢本伟大 阅读全文
posted @ 2022-02-28 10:07 Hello霖 阅读(1601) 评论(0) 推荐(0)
摘要:1.推荐使用 npm 的方式安装,它能更好地和 webpack 打包工具配合使用。 npm i element-ui -S 2.main.js中加入 import ElementUI from 'element-ui'; import 'element-ui/lib/theme-chalk/inde 阅读全文
posted @ 2022-02-27 19:36 Hello霖 阅读(126) 评论(0) 推荐(0)
摘要:1.pom.xml引入mybatis-plus依赖 <!--Mybatis--> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>3.0. 阅读全文
posted @ 2022-02-27 10:39 Hello霖 阅读(322) 评论(0) 推荐(0)
摘要:用了 lambok /*** * 统一Api返回格式 */ @Data public class ApiRequest { private Integer code;//状态码 private Object data;// 返回数据 private String msg;// 错误信息 public 阅读全文
posted @ 2022-02-27 10:30 Hello霖 阅读(130) 评论(0) 推荐(0)
摘要:方式一: 1.pom.xml引入依赖 <!-- e-mail--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-mail</artifactId> </depende 阅读全文
posted @ 2022-02-27 10:28 Hello霖 阅读(265) 评论(0) 推荐(0)
摘要:1.【准备】pom.xml文件加入redis依赖 <!--redis--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> 阅读全文
posted @ 2022-02-27 10:18 Hello霖 阅读(286) 评论(0) 推荐(0)
摘要:1.springboot程序入口添加注解 //主程序入口 @SpringBootApplication @EnableScheduling //开启定时任务功能 public class MainApplication { public static void main(String[] args) 阅读全文
posted @ 2022-02-27 10:08 Hello霖 阅读(379) 评论(0) 推荐(0)