1 .安裝redux 2 .在store中新建index.js和reducer.js index.js reducer.js 3.初始話store的數(shù)據(jù) 在reducer.j...
1 .安裝redux 2 .在store中新建index.js和reducer.js index.js reducer.js 3.初始話store的數(shù)據(jù) 在reducer.j...
1 .要想實(shí)現(xiàn)原生路由,就需要得到他的地址欄輸入的地址,根據(jù)路徑不同進(jìn)行不同的跳轉(zhuǎn) , ctx.request.url就可以實(shí)現(xiàn), 這就是一個(gè)最基本的獲取路徑的方法 2 ....
1. 獲取post請(qǐng)求的步驟 解析上下文的ctx文原生node.js的對(duì)象rep 將post表單數(shù)據(jù)解析成query string 字符串 將字符串轉(zhuǎn)化為json格式 2....
1 .在文件夾里直接初始化npm ,生成package.json 2 .安裝koa 3 .新建index.js文件 在命令行里輸入 node index.js在瀏覽器 ht...