Giter Site home page Giter Site logo

koa2-blog's Introduction

Hi there, I'm Eric.Li 👋

  • 🔭 I’m currently working in changsha...
  • 🌱 I’m currently learning webgl ...
  • 📫 How to reach me: [email protected]...p

Languages and Tools:

koa2-blog's People

Contributors

193eric avatar shihanqunnie avatar siblelast avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

koa2-blog's Issues

login 方法 sql写的有问题

password 需要用引号引起来,不然sql报错
app.post('/login', function (req, res) {
sql.query('select user from person where user="' + req.body.username + '" and password="' + req.body.password+'"', function (err, rows) {
if (err || rows.length == 0) {
console.log(err)
res.send({code: 0})
}else {
res.send({code: 1})
}
})
})

axios需要更新了

代码中很多axios方法已经不兼容了,建议参考最新文档进行修改

登陆永远不成功

api/index.js 87行
原本是这样:
sql.query('select user from person where user="' + req.body.username + '" and password="' + req.body.password, function (err, rows) {
一直登陆失败

但是,改成这样:
sql.query('select user from person where user="' + req.body.username + '" and password="' + req.body.password+'"', function (err, rows) {
就可以登陆了

区别是:req.body.password后面少个双引号

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.