eggjs / eggjs/egg

egg-ant-design-pro 拉到本地运行不能发送 body 数据到 mock server

Open
#3,844 3 comments 0 reactions 0 assignees View on GitHub
Inactive
Dominant language
TypeScript
Stars
19k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

## What happens?

```
git clone https://github.com/eggjs/egg-ant-design-pro
cd egg-ant-design-pro
npm run dev
```
退出登录,再登录时,输入 admin:888888,点击登录没反应。查看 network 得到 status 是 `error`:
![image](https://user-images.githubusercontent.com/3367820/61791532-d5400180-ae4c-11e9-9790-93cf3cc485bc.png)

查看代码:`app/web/mock/user.js`,打印一下获取的 body 全是 undefined:
![image](https://user-images.githubusercontent.com/3367820/61791581-fd2f6500-ae4c-11e9-889e-e2f5d32bc994.png)

查看浏览器中的请求详情,body 是有值的:

![image](https://user-images.githubusercontent.com/3367820/61791609-13d5bc00-ae4d-11e9-8bcb-ab40b43711e8.png)

## 最小可复现仓库
> 请使用 `npm init egg --type=simple bug` 创建,并上传到你的 GitHub 仓库
https://github.com/eggjs/egg-ant-design-pro

## 复现步骤,错误日志以及相关配置

## 相关环境信息
- **操作系统**:
- **Node 版本**:
- **Egg 版本**:

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.