umi request post请求参数

import umiRequest from 'umi-request';
export async function fakeAccountLogin(params) {
    console.log(params);
    // return request('/api/login/account', {
    // return request('/api/index.php?m=Index&a=userLogin',{
    //     method: 'POST',
    //     body: params,
    // });
    return umiRequest('/api/index.php?m=Index&a=userLogin',{
        method: 'post',
        data: params,
        requestType: 'form',
    })
}

 

你可能感兴趣的:(js)