/**
|
* (不建议写成 request.post(xxx),因为这样 post 时,无法 params 与 data 同时传参)
|
*
|
* 注册api接口集合
|
* @method register 注册
|
* @method captcha 获取验证码
|
*/
|
|
import { http } from "@/utils/http";
|
import { baseUrlApi } from "../util";
|
import type { Result, CaptchaResult } from "../types";
|
|
export const register = (data?: object) => {
|
return http.request<Result>(
|
"post",
|
baseUrlApi("/api/customer/customerRegistration"),
|
{ data }
|
);
|
};
|
|
export const captcha = () => {
|
return http.request<CaptchaResult>("get", baseUrlApi("/api/zCSMS/captcha"));
|
};
|
|
//获取角色
|
export const exRole = () => {
|
return http.request<Result>("get", baseUrlApi("/api/customer/exRole"));
|
};
|
|
// 获取手机验证码
|
export const phoneNumberCode = params => {
|
return http.request<Result>(
|
"post",
|
baseUrlApi(
|
`/api/zCSMS/sendSMS/${params.phone}/${params.code}/${params.codeId}`
|
)
|
);
|
};
|
|
// 注册角色用户资料
|
export const createrExRolsInformation = (data?: object) => {
|
return http.request<Result>(
|
"post",
|
baseUrlApi("/api/customer/createrExRolsInformation"),
|
{ data }
|
);
|
};
|
|
// 获取企业类型
|
export const enterpriseTypes = (data?: object) => {
|
return http.request<Result>(
|
"post",
|
baseUrlApi("/api/customer/enterpriseTypes"),
|
{
|
data
|
}
|
);
|
};
|