node.js相关
Belle唯唯
这个作者很懒,什么都没留下…
展开
-
path.resolve()理解
https://www.cnblogs.com/web-record/p/9907680.htmlhttps://blog.csdn.net/kikyou_csdn/article/details/83150538原创 2019-01-10 10:30:17 · 945 阅读 · 0 评论 -
Promise.all()错误处理
为了让一个fetch宕机之后,promise.all的then里面还能拿到数据,重点就是给每个fetch的promise对象增加容错处理这样promise.all可以分别处理error问题getLatestJob(context){ const result1=api.getJobJsonFromShield(context) .then(response =>...原创 2018-09-26 15:24:48 · 6364 阅读 · 0 评论 -
promise.all()取多个数据
coherency state•shared:• at least 1 processor has the data cached & memory is upto-date• block can be read by any processor• exclusive:• 1 processor (the owner) has the data cached & memo...原创 2018-09-25 16:39:43 · 4610 阅读 · 0 评论 -
Koa-router学习
常用api https://blog.csdn.net/mjzhang1993/article/details/78752314allowedmethods的用法 https://www.jianshu.com/p/fef91266a44c原创 2018-09-04 15:27:44 · 77 阅读 · 0 评论 -
js 数组map 原型链
var、let、const 区别? https://www.jianshu.com/p/4e9cd99ecbf5创建对象 原型 https://www.liaoxuefeng.com/wiki/001434446689867b27157e896e74d51a89c25cc8b43bdb3000/0014344997235247b53be560ab041a7b10360a567422a780...原创 2018-09-04 14:58:01 · 703 阅读 · 0 评论 -
深入理解koa2的中间件+asycn+next
https://segmentfault.com/a/1190000012881491原创 2018-09-04 10:13:23 · 598 阅读 · 0 评论 -
vue引入外部js方法过滤时间戳
在utils下写一个timeconvert.jsfunction timestampToTime(timestamp) { var date = new Date(timestamp * 1000);//时间戳为10位需*1000,时间戳为13位的话不需乘1000 var Y = date.getFullYear() + '-'; var M = (date.getMo...原创 2018-08-28 18:10:11 · 857 阅读 · 0 评论 -
vuex更新缓存不渲染的问题
大坑一: vuex的大坑一State不会根据 数组下标更新我本来是直接给数组state_data【0】 【1】 赋值 但是第一次渲染有 刷新后数据消失 于是改成如下let tempStateCount=new Array(); tempStateCount[0]=successCount; tempStateCount[1]=failCount; ...原创 2018-08-28 18:05:28 · 1580 阅读 · 0 评论 -
vue引入外部的js文件方法
这是es6的新特性 https://www.cnblogs.com/diligenceday/p/5503777.html 我的外部 jsexport function getJobJson(){ return fetch(`${host}/latestJobs`, { method: 'GET', mode:'cors', headers:...原创 2018-08-28 17:53:01 · 2236 阅读 · 0 评论 -
node.js学习--构造实例化对象
https://blog.csdn.net/theowl/article/details/47361175很容易明白,整个koa-router模块引入后返回的其实是一个Router类的构造函数,如下:function Router(opts) { if (!(this instanceof Router)) { return new Router(opts); ...原创 2018-08-23 14:38:50 · 1392 阅读 · 0 评论 -
node.js学习相关--http协议
https://www.cnblogs.com/ranyonsue/p/5984001.htmlHTTP之请求消息Request 客户端发送一个HTTP请求到服务器的请求消息包括以下格式:请求行(request line)、请求头部(header)、空行和请求数据四个部分组成。请求行以一个方法符号开头,以空格分开,后面跟着请求的URI和协议的版本。 Get请求例子,使用Char...原创 2018-08-17 14:21:22 · 253 阅读 · 0 评论 -
node.js学习笔记--module.exports
module.exports=xxxx (这种 其实就是暴露出一个对象 eg router就是一个对象) https://my.oschina.net/u/2272916/blog/363608原创 2018-08-16 16:34:41 · 256 阅读 · 0 评论 -
js对象中属性还有空格的处理办法
https://www.jianshu.com/p/90a8d010de42原创 2018-08-22 18:16:12 · 2938 阅读 · 0 评论 -
原型和原型链
https://www.cnblogs.com/xiaohuochai/p/5721552.htmlhttps://segmentfault.com/a/1190000015374011#articleHeader4https://blog.csdn.net/xiaoermingn/article/details/80745117原创 2019-04-18 14:39:35 · 70 阅读 · 0 评论