
node.js相关
Belle唯唯
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
path.resolve()理解
https://www.cnblogs.com/web-record/p/9907680.html https://blog.csdn.net/kikyou_csdn/article/details/83150538原创 2019-01-10 10:30:17 · 1038 阅读 · 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 · 6474 阅读 · 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 · 4700 阅读 · 0 评论 -
Koa-router学习
常用api https://blog.csdn.net/mjzhang1993/article/details/78752314 allowedmethods的用法 https://www.jianshu.com/p/fef91266a44c原创 2018-09-04 15:27:44 · 108 阅读 · 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 · 782 阅读 · 0 评论 -
深入理解koa2的中间件+asycn+next
https://segmentfault.com/a/1190000012881491原创 2018-09-04 10:13:23 · 646 阅读 · 0 评论 -
vue引入外部js方法过滤时间戳
在utils下写一个timeconvert.js function 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 · 929 阅读 · 0 评论 -
vuex更新缓存不渲染的问题
大坑一: vuex的大坑一State不会根据 数组下标更新 我本来是直接给数组state_data【0】 【1】 赋值 但是第一次渲染有 刷新后数据消失 于是改成如下 let tempStateCount=new Array(); tempStateCount[0]=successCount; tempStateCount[1]=failCount; ...原创 2018-08-28 18:05:28 · 1656 阅读 · 0 评论 -
vue引入外部的js文件方法
这是es6的新特性 https://www.cnblogs.com/diligenceday/p/5503777.html 我的外部 js export function getJobJson(){ return fetch(`${host}/latestJobs`, { method: 'GET', mode:'cors', headers:...原创 2018-08-28 17:53:01 · 2297 阅读 · 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 · 1494 阅读 · 0 评论 -
node.js学习相关--http协议
https://www.cnblogs.com/ranyonsue/p/5984001.html HTTP之请求消息Request 客户端发送一个HTTP请求到服务器的请求消息包括以下格式: 请求行(request line)、请求头部(header)、空行和请求数据四个部分组成。 请求行以一个方法符号开头,以空格分开,后面跟着请求的URI和协议的版本。 Get请求例子,使用Char...原创 2018-08-17 14:21:22 · 316 阅读 · 0 评论 -
node.js学习笔记--module.exports
module.exports=xxxx (这种 其实就是暴露出一个对象 eg router就是一个对象) https://my.oschina.net/u/2272916/blog/363608原创 2018-08-16 16:34:41 · 310 阅读 · 0 评论 -
js对象中属性还有空格的处理办法
https://www.jianshu.com/p/90a8d010de42原创 2018-08-22 18:16:12 · 3043 阅读 · 0 评论 -
原型和原型链
https://www.cnblogs.com/xiaohuochai/p/5721552.html https://segmentfault.com/a/1190000015374011#articleHeader4 https://blog.csdn.net/xiaoermingn/article/details/80745117原创 2019-04-18 14:39:35 · 102 阅读 · 0 评论