Commit a766ca5e by heshihao

feat: 修改参数形式

parent a105be40
import api from '@/utils/http'
import api from "@/utils/http";
const industry = {
SendMobileCode: "/api/user/SendMobileCode",
......@@ -11,19 +8,18 @@ const industry = {
Binding: "/api/user/Binding",
backLogin: "/api/user/backLogin",
Register: "/api/user/Register",
}
};
// 获取验证码
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 }) => {
return api.post(industry.LoginBySms, { mobile, sms_code })
}
const LoginByPwd = ({ param }) => {
return api.post(industry.LoginByPwd, { param })
}
return api.post(industry.LoginBySms, { mobile, sms_code });
};
const LoginByPwd = (data) => {
return api.post(industry.LoginByPwd, data);
};
const Register = ({
real_name,
mobile,
......@@ -43,27 +39,22 @@ const Register = ({
password,
password_again,
sms_code,
})
}
});
};
const backLogin = ({ param }) => {
return api.post(industry.backLogin, { param })
}
return api.post(industry.backLogin, { param });
};
const LoginByvx = ({ code }) => {
return api.post(industry.LoginByvx, { code })
}
const Binding = ({
openid,
unionid,
mobile,
sms_code,
}) => {
return api.post(industry.LoginByvx, { code });
};
const Binding = ({ openid, unionid, mobile, sms_code }) => {
return api.post(industry.Binding, {
openid,
unionid,
mobile,
sms_code,
})
}
});
};
export default {
SendMobileCode,
......@@ -72,5 +63,5 @@ export default {
Register,
backLogin,
LoginByvx,
Binding
}
\ No newline at end of file
Binding,
};
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