feat: add auth support for axios request; 🌟

新增:axios 请求添加 auth 认证支持;
This commit is contained in:
chenghongxing
2020-07-20 13:10:03 +08:00
parent 886a19ddfc
commit 82e5955c3b
4 changed files with 41 additions and 16 deletions

View File

@@ -22,7 +22,7 @@ Mock.mock('/login', 'post', ({body}) => {
result.message = Mock.mock('@TIMEFIX').CN + ',欢迎回来'
result.data = {}
result.data.user = user
result.data.token = 'Authorization'
result.data.token = 'Authorization:' + Math.random()
}
return result
})