Loading

01 2021 档案

摘要:node 常用方法 生成密钥 token验证 验证码生成 生成密钥 //生成密钥 generateToken(data, expires = 7200) { const exp = Math.floor(Date.now() / 1000) + expires const cert = fs.rea 阅读全文
posted @ 2021-01-22 16:35 冯叶青 阅读(1121) 评论(0) 推荐(0)
摘要:middleware/jwt.js module.exports = (options, app) => { return async function userInterceptor(ctx, next) { //获取token 获取前端或以其他方式设置的cookie需要设置signed: fal 阅读全文
posted @ 2021-01-22 16:28 冯叶青 阅读(413) 评论(0) 推荐(1)
摘要:js给页面容器增加水印 /* * 功能:给页面容器增加水印 * * 用法 watermark({ watermark_ele:'#industry-contacts', watermark_txt:`AI固收 ${this.sysUserInfo.phone}`, watermark_width: 阅读全文
posted @ 2021-01-22 15:47 冯叶青 阅读(192) 评论(0) 推荐(0)
摘要:功能:基础功能群聊 文件上传 图片上传 表情发送 超链接跳转 注:里面涉及到诸多函数依赖,请忽略,只看主要功能即可 html <template> <div class="container" :style="{'top':'calc('+marginTop+' + 0.16rem)'}"> <di 阅读全文
posted @ 2021-01-21 15:57 冯叶青 阅读(714) 评论(0) 推荐(0)
摘要:前端工具箱 复制粘贴 获取随机数 滑动防触发点击事件 获取地址栏参数 函数防抖 js动态加载 css动态加载 h5与app交互封装 js时间格式化 阅读全文
posted @ 2021-01-21 15:04 冯叶青 阅读(424) 评论(0) 推荐(0)