import axios from "axios"; export function loginUser(data) { console.log("用户登录service!", data); let baseurl = "/api/user/login/"; let res = null; axios .post(baseurl, data) .then((o) => { res = o; console.log("成功认证", res); localStorage.setItem("yma16siteUserInfoName", res.name); localStorage.setItem("yma16siteUserInfoPwd", res.password); }) .catch((r) => { console.log("登录失败!", r); }); return res; }