zhangwei
2025-06-25 ce5e84197b43dec8c01717b116cb77535ad3c91e
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
/**
 * (不建议写成 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}`
    )
  );
};