Merge pull request #232 from zhangpenglin/master

fix typo
This commit is contained in:
zuiidea
2017-04-30 19:06:37 +08:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -98,7 +98,7 @@
开发:
```bash
npm run dev # 使用mock拦截请求,数据存储在localStroge里
npm run dev # 使用mock拦截请求,数据存储在localStorage里
打开 http://localhost:8000
```
+1 -1
View File
@@ -84,7 +84,7 @@ module.exports = {
const { username, password } = req.body
const user = adminUsers.filter((item) => item.username === username)
if (user && user[0].password === password) {
if (user.length > 0 && user[0].password === password) {
const now = new Date()
now.setDate(now.getDate() + 1)
res.cookie('token', JSON.stringify({ id: user[0].id, deadline: now.getTime() }), {