koa学习


koa安装

1
2
3
4
5
6
7
npm install -g koa-generator

koa2 mykoa

npm install ejs

<%name%>

html文件能热部署

js文件不能

ejs

跨域问题

解决跨域问题用koa-cores

client does not support authentication protocal requested by server;consider upgrading mysql client

vuex

不推荐直接操纵state,应该是操作mutations或者actions

updateUsers

登陆跳转方法

  1. 用vuex存储用户名和值并显示
  2. 通过name和params显示
  3. 通过this.$roater.push跳转并携带参数path,query
  4. 通过两个请求


Author: pkq
Reprint policy: All articles in this blog are used except for special statements CC BY 4.0 reprint policy. If reproduced, please indicate source pkq !
  TOC