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...
vue使用html2canvas进行页面截图 Install npm install html2canvas Use import html2canvas from 'html2canvas'; html <!-- 截图区域 --> <div id="faultTree" ref="faultTree" :style="{width: '100%'...
axios上传文件 二、实现方法 1、读取文件 通过input标签,我们可以得到一个file文件将这个file进行处理。 <input class="upload" type="file" ref="upload" accept="image/jpeg,image/jpg,image/png" @change="uploa...
linux挂载google Drive 安装 Rclone Linux或macOS有多种安装方式,这里选择脚本安装: curl https://rclone.org/install.sh | sudo bash install.sh #!/usr/bin/env bash # error codes # 0 - exited without...
vue权限路由 export function recursionRouter (userRouter = [], allRouter = []) { var realRoutes = allRouter . filter (item => userRouter . includes ( item . name ))...
Promise 中的.all(), .race(), .allSettled() Promise.all(promises: Iterable<Promise>): Promise<Array> Promise.all(iterable) 方法返回一个 Promise 实例,此实例在 iterable 参数内所有的 promise 都“完成(resolved)”或参数中不包含 pro...
nodejs Assert中equal(),strictEqual(),deepEqual(),strictDeepEqual()比较 1、equal() equal(actual,expected[,message]) 相当于使用 == 运算符比较两个参数值actual和expected是否相等,如果相等不返回任何值,如果不相等则返回带有message属性的AssertionError,若message为undefined,则为默认的...