77 lines
2.0 KiB
TypeScript
Raw Normal View History

2025-04-30 01:43:23 +08:00
//登录接口
2025-05-16 16:16:41 +08:00
import { get, post } from "@/utils/request";
2025-04-30 01:43:23 +08:00
//密码登录接口
2025-05-16 16:16:41 +08:00
export const loginPass = async (param: {
username: string;
password: string;
openId: number | string;
}) => {
return await post(
"/userlogin/check?username=" +
param.username +
"&password=" +
param.password +
"&openId=" +
param.openId,
param
);
2025-04-30 01:43:23 +08:00
};
//验证码登录接口
2025-05-16 16:16:41 +08:00
export const loginCode = async (param: {
phone: string | number;
code: string | number;
openId: number | string;
}) => {
return await post("/open/sms/checkCode", param);
2025-04-30 01:43:23 +08:00
};
//验证码登录接口
export const loginCheckCode = async (param: any) => {
2025-05-16 16:16:41 +08:00
return await post("/open/sms/checkCode", param);
2025-04-30 01:43:23 +08:00
};
//获取验证码接口
2025-05-16 16:16:41 +08:00
export const sendCodeApi = async (param: any) => {
return await get("/open/sms/sendCode", param);
2025-04-30 01:43:23 +08:00
};
//获取验证码接口
export const sendToUserApi = async (param: string) => {
2025-05-16 16:16:41 +08:00
return await post("/open/sms/sendToUser", param);
2025-04-30 01:43:23 +08:00
};
//微信获取手机号登录接口
export const weChatLogin = async (param: any) => {
2025-05-16 16:16:41 +08:00
return await get("/userlogin/weloginByCode", param);
2025-04-30 01:43:23 +08:00
};
//获取用户按钮权限
export const authenticationApi = async (param: { userId: string }) => {
2025-05-16 16:16:41 +08:00
return await get("/api/authentication/find-by-user", param);
2025-04-30 01:43:23 +08:00
};
//获取公众号票据
export const wxConfigApi = async (param: any) => {
2025-05-16 16:16:41 +08:00
return await post("/userlogin/wxConfig", param);
};
export const checkOpenId = async (param: {
openId: string | number;
appCode: string;
}) => {
return await post("/open/login/jz/checkUser", param);
};
export const updateUserApi = async (param: any) => {
return await post("/open/login/js/updateUser", param);
2025-04-30 01:43:23 +08:00
};
2025-08-04 15:23:50 +08:00
export const updateSignFileApi = async (param: { userId: number; signFile: string }) => {
return await post("/api/user/updateSignFile", {
id: param.userId,
signFile: param.signFile
});
};
2025-05-16 16:16:41 +08:00
export const findJsByPhoneApi = async (param: any) => {
return await get("/api/js/findJsByPhone", param);
2025-04-30 01:43:23 +08:00
};