摘要: // aes对称加密 const CryptoJS = require('crypto-js'); //引用AES源码js const key = CryptoJS.enc.Utf8.parse("1234123412ABCDEF"); //十六位十六进制数作为密钥 const iv = CryptoJS.enc.Utf8.parse('ABCDEF1234123412'); ... 阅读全文
posted @ 2019-07-01 13:45 崔凯通 阅读(1741) 评论(0) 推荐(0) 编辑
摘要: redux中间件,用来处理异步action 返回 一个函数 内部函数接收存储方法dispatch和getState参数 demo: 阅读全文
posted @ 2019-06-20 10:34 崔凯通 阅读(202) 评论(0) 推荐(0) 编辑
摘要: mesgNotice(data){ if(data.length>0){ if(window.Notification && Notification.permission !== "denied") { let count = 0; ... 阅读全文
posted @ 2019-06-11 15:14 崔凯通 阅读(385) 评论(0) 推荐(0) 编辑
摘要: 1.事件循环机制 js单线程操作。 1>主线程读取js代码 ,此时为同步环境,形成相应的堆和执行栈。 2>主线程遇到异步任务,指给对应的异步进程处理。 3>异步进程处理完毕后,将相应的异步任务推入到任务队列。 4>主线程执行完毕后会查询任务队列,如果处在任务 ,则取出一个任务推入主线程处理(先进先出 阅读全文
posted @ 2019-04-26 10:59 崔凯通 阅读(119) 评论(0) 推荐(0) 编辑
摘要: //api.jsconst Koa = require('koa'); const router = require('koa-router')(); //路由 const bodyParser = require('koa-bodyparser'); //解析原始request请求 const fs = require('fs'); //文件读取 const cors = require... 阅读全文
posted @ 2019-03-28 15:36 崔凯通 阅读(233) 评论(0) 推荐(0) 编辑
摘要: #user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections ... 阅读全文
posted @ 2019-03-26 15:47 崔凯通 阅读(1123) 评论(0) 推荐(0) 编辑
摘要: var u = navigator.userAgent; var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); if(isiOS){ if(u.toLowerCase().match(/MicroMessenger/i) == "micromessenger... 阅读全文
posted @ 2019-01-27 20:01 崔凯通 阅读(2959) 评论(0) 推荐(1) 编辑
摘要: var u = navigator.userAgent; var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); if(isiOS){ if(u.toLowerCase().match(/MicroMessenger/i) == "micromessenger... 阅读全文
posted @ 2019-01-27 19:59 崔凯通 阅读(1604) 评论(0) 推荐(0) 编辑
摘要: 1、 ...运算符 (浅拷贝) 2、 JSON.parse(JSON.stringify(参数)) (深拷贝) 阅读全文
posted @ 2018-12-11 10:39 崔凯通 阅读(92) 评论(0) 推荐(0) 编辑