Skip to content

Commit 92f55b0

Browse files
committed
fix post bug
1 parent d5b6606 commit 92f55b0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/api/login.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export function loginByEmail(email, password) {
88
return fetch({
99
url: '/login/loginbyemail',
1010
method: 'post',
11-
params: data
11+
data
1212
});
1313
}
1414

src/mock/login.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const userMap = {
2525

2626
export default {
2727
loginByEmail: config => {
28-
const { email } = config.params;
28+
const { email } = JSON.parse(config.data);
2929
return new Promise((resolve, reject) => {
3030
if (userMap[email.split('@')[0]]) {
3131
setTimeout(() => {

0 commit comments

Comments
 (0)