'-'
zhangwei
4 天以前 ddbf9504fc5faf6764fffa4e9263a3ad927331d8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/**
 * (不建议写成 request.post(xxx),因为这样 post 时,无法 params 与 data 同时传参)
 *
 * 注册api接口集合
 * @method register 注册
 * @method captcha 获取验证码
 */
 
import { http } from "@/utils/http";
import { baseUrlApi } from "../util";
type Result = {
  success: boolean;
  data: Array<any>;
};
 
export const register = (data?: object) => {
  return http.request(
    "post",
    baseUrlApi("/api/customer/customerRegistration"),
    { data }
  );
};
 
export const captcha = () => {
  return http.request<Result>("get", baseUrlApi("/api/zCSMS/captcha"));
};
 
//获取角色
export const exRole = () => {
  return http.request<Result>("get", baseUrlApi("/api/customer/exRole"));
};
 
// 获取手机验证码
export const phoneNumberCode = (params?: object) => {
  return http.request(
    "post",
    baseUrlApi(
      `/api/zCSMS/sendSMS/${params.phone}/${params.code}/${params.codeId}`
    )
  );
};
 
// 注册角色用户资料
export const createrExRolsInformation = (data?: object) => {
  return http.request(
    "post",
    baseUrlApi("/api/customer/createrExRolsInformation"),
    { data }
  );
};
 
// 获取企业类型
export const enterpriseTypes = (data?: object) => {
  return http.request("post", baseUrlApi("/api/customer/enterpriseTypes"), {
    data
  });
};