search

Home  >  Q&A  >  body text

javascript - I want to separate the login page and home page, but I don’t know what’s wrong


I first determine whether there is cookie information. If not, render the login page (the app.use(/api) will not be routed at this time),

After the user clicks to log in on the login page, ajax sends a post request to api/user/login, and then sends the request again. At this time, I thought it would go through app.use(api) in app.use(), but it didn’t. ...Clicking the page multiple times keeps landing on the login page

What's the problem?

黄舟黄舟2768 days ago531

reply all(1)I'll reply

  • 仅有的幸福

    仅有的幸福2017-05-19 10:42:42

    /api and /api/xxx are two routes

    reply
    0
  • Cancelreply