解决在vue中使用swiper loop失效的问题

1.初始化完成后 swiper 轮播出现问题1:不能自动切换 1)问题产生原因: axios 执行get指令是异步请求 即在axios请求数据过程中 initSwiper运行时要绑定的部分元素节点还没有创建成功 导致swiper插件中部分指定并没有绑定到指定元素节点上 导致swiper轮播出现异常 2)...

egg RESTful

Method Path Route Name Controller.Action GET /posts posts app.controllers.posts.index GET /posts/new new_post app.controllers.posts.new GET /posts/:id p...

egg 上传文件

#route.js中添加一个路由规则 router.post('/upload',controller.upload.index); 在controller中新建upload文件 'use strict'; //node.js 文件操作对象 const fs = require('fs'); //nod...

egg使用jwt验证

原理:vue前端登录,提交账号密码给egg后端,后端比对信息后,使用jsonwebtoken对用户信息进行签名生成token,之后通过cookie返回给vue前端,前端需要使用token里的信息就使用js-base64进行token第二段解码即可。 vue前端路由跳转,进入路由前置守卫检测cookie中...

常用util

/** * 存储localStorage */ export const setStore = (name, content) => { if (!name) return; if (typeof content !== 'string') { content = JSON.stringify(cont...

v2ray

https://www.v2ray.com/chapter_00/install.html https://sixu.life/cloudflare-v2ray-ip.html caddy -conf /etc/caddy/Caddyfile --agree nohup /usr/local/bin/c...