Commit a766ca5e by heshihao

feat: 修改参数形式

parent a105be40
import api from "@/utils/http";
import api from '@/utils/http'
const industry = { const industry = {
SendMobileCode: "/api/user/SendMobileCode", SendMobileCode: "/api/user/SendMobileCode",
...@@ -11,19 +8,18 @@ const industry = { ...@@ -11,19 +8,18 @@ const industry = {
Binding: "/api/user/Binding", Binding: "/api/user/Binding",
backLogin: "/api/user/backLogin", backLogin: "/api/user/backLogin",
Register: "/api/user/Register", Register: "/api/user/Register",
};
}
// 获取验证码 // 获取验证码
const SendMobileCode = ({ mobile, sms_type }) => { const SendMobileCode = ({ mobile, sms_type }) => {
return api.post(industry.SendMobileCode, { mobile, sms_type }) return api.post(industry.SendMobileCode, { mobile, sms_type });
} };
const LoginBySms = ({ mobile, sms_code }) => { const LoginBySms = ({ mobile, sms_code }) => {
return api.post(industry.LoginBySms, { mobile, sms_code }) return api.post(industry.LoginBySms, { mobile, sms_code });
} };
const LoginByPwd = ({ param }) => { const LoginByPwd = (data) => {
return api.post(industry.LoginByPwd, { param }) return api.post(industry.LoginByPwd, data);
} };
const Register = ({ const Register = ({
real_name, real_name,
mobile, mobile,
...@@ -43,27 +39,22 @@ const Register = ({ ...@@ -43,27 +39,22 @@ const Register = ({
password, password,
password_again, password_again,
sms_code, sms_code,
}) });
} };
const backLogin = ({ param }) => { const backLogin = ({ param }) => {
return api.post(industry.backLogin, { param }) return api.post(industry.backLogin, { param });
} };
const LoginByvx = ({ code }) => { const LoginByvx = ({ code }) => {
return api.post(industry.LoginByvx, { code }) return api.post(industry.LoginByvx, { code });
} };
const Binding = ({ const Binding = ({ openid, unionid, mobile, sms_code }) => {
openid,
unionid,
mobile,
sms_code,
}) => {
return api.post(industry.Binding, { return api.post(industry.Binding, {
openid, openid,
unionid, unionid,
mobile, mobile,
sms_code, sms_code,
}) });
} };
export default { export default {
SendMobileCode, SendMobileCode,
...@@ -72,5 +63,5 @@ export default { ...@@ -72,5 +63,5 @@ export default {
Register, Register,
backLogin, backLogin,
LoginByvx, LoginByvx,
Binding Binding,
} };
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment