From 92f55b093f342305a23717ec02aac6ea55596155 Mon Sep 17 00:00:00 2001 From: Pan Date: Wed, 10 May 2017 15:47:53 +0800 Subject: [PATCH] fix post bug --- src/api/login.js | 2 +- src/mock/login.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/login.js b/src/api/login.js index 639f650f..a0d8d870 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -8,7 +8,7 @@ export function loginByEmail(email, password) { return fetch({ url: '/login/loginbyemail', method: 'post', - params: data + data }); } diff --git a/src/mock/login.js b/src/mock/login.js index 801ab6b1..621cd375 100644 --- a/src/mock/login.js +++ b/src/mock/login.js @@ -25,7 +25,7 @@ const userMap = { export default { loginByEmail: config => { - const { email } = config.params; + const { email } = JSON.parse(config.data); return new Promise((resolve, reject) => { if (userMap[email.split('@')[0]]) { setTimeout(() => {