摘要: 尝试用node编写一个简单的登录接口,结果启动服务后请求接口出现了该错误。 其问题就是访问的工具身份验证协议过于落后,在node内安装的2.18.1 mysql包。 解决: 先登录数据库。 use mysql;(mysql为数据库名) 提示Database changed; 查询表中信息 ; sel 阅读全文
posted @ 2023-11-16 15:58 淮生 阅读(86) 评论(0) 推荐(0) 编辑
摘要: Jquery <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script> swiper <script src="https://unpkg.com/swiper/swiper-bundle.js"> </script> < 阅读全文
posted @ 2023-11-10 16:02 淮生 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 防抖: 将函数在规定时间内多次触发整合为一次,基本原理就是 delay 时间内再次触发则 重新计时,计时满delay则执行函数 function debounce(fn, delay) { let time = null; return function () { if (time) { clear 阅读全文
posted @ 2021-06-01 11:30 淮生 阅读(46) 评论(0) 推荐(0) 编辑
摘要: // 属性:(默认) delay: 0, // 延时时间 distance: '0px', // 执行距离 duration: 600, // 执行时长 easing: 'cubic-bezier(0.5, 0, 0, 1)', // 执行速度 interval: 0, // 执行间隔(时间) op 阅读全文
posted @ 2021-05-10 11:06 淮生 阅读(982) 评论(0) 推荐(0) 编辑
摘要: //网页效果部分 var scrollFunc = function (e) { e = e || window.event; if (e.wheelDelta) { //第一步:先判断浏览器IE,谷歌滑轮事件 if (e.wheelDelta > 0) { //当滑轮向上滚动时 console.l 阅读全文
posted @ 2021-05-08 14:45 淮生 阅读(942) 评论(0) 推荐(0) 编辑
摘要: 首先是HTML引用vue.js地址 <!-- 先引入 Vue --> <script src="https://unpkg.com/vue/dist/vue.js"></script> <!-- 引入 http-vue-loader --> <script src="https://unpkg.co 阅读全文
posted @ 2021-05-08 14:29 淮生 阅读(193) 评论(0) 推荐(0) 编辑
摘要: npm install vue-awesome-swiper -save //安装 和HTML一样写入模板 <div class="swiper-container"> <div class="swiper-wrapper"> <div class="swiper-slide">Slide 1</d 阅读全文
posted @ 2021-05-06 17:26 淮生 阅读(323) 评论(0) 推荐(0) 编辑
摘要: 先在轮播图模板中隐藏默认的按钮,JS触发依然存在: <div class="swiper-button-prev" style="display: none;"></div> <div class="swiper-button-next" style="display: none;"></div> 阅读全文
posted @ 2021-04-14 17:26 淮生 阅读(140) 评论(0) 推荐(0) 编辑
摘要: interceptors 如果我们想在请求之前做点什么,用拦截器再好不过了 拦截器一般做什么? 1. 修改请求头的一些配置项 2. 给请求的过程添加一些请求的图标 3. 给请求添加参数 1. 全局的拦截器配置 代码: axios.interceptors.request.use(config=>{ 阅读全文
posted @ 2021-03-05 10:43 淮生 阅读(84) 评论(0) 推荐(0) 编辑
摘要: 1.首先在控制台运行下node -v,确认环境 运行 npm install anywhere -g 来安装anywhere。 最后在控制台中cd到你的文件根目录,然后运行 anywhere 命令 2.http-server 基于npm和node环境 ,运行 npm install -g http- 阅读全文
posted @ 2021-03-05 09:49 淮生 阅读(202) 评论(0) 推荐(0) 编辑