69 lines
1.8 KiB
TypeScript
69 lines
1.8 KiB
TypeScript
//登录接口
|
|
import { get, post } from "@/utils/request";
|
|
|
|
//密码登录接口
|
|
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
|
|
);
|
|
};
|
|
//验证码登录接口
|
|
export const loginCode = async (param: {
|
|
phone: string | number;
|
|
code: string | number;
|
|
openId: number | string;
|
|
}) => {
|
|
return await post("/open/sms/checkCode", param);
|
|
};
|
|
//验证码登录接口
|
|
export const loginCheckCode = async (param: any) => {
|
|
return await post("/open/sms/checkCode", param);
|
|
};
|
|
//获取验证码接口
|
|
export const sendCodeApi = async (param: any) => {
|
|
return await get("/open/sms/sendCode", param);
|
|
};
|
|
|
|
//获取验证码接口
|
|
export const sendToUserApi = async (param: string) => {
|
|
return await post("/open/sms/sendToUser", param);
|
|
};
|
|
|
|
//微信获取手机号登录接口
|
|
export const weChatLogin = async (param: any) => {
|
|
return await get("/userlogin/weloginByCode", param);
|
|
};
|
|
|
|
//获取用户按钮权限
|
|
export const authenticationApi = async (param: { userId: string }) => {
|
|
return await get("/api/authentication/find-by-user", param);
|
|
};
|
|
|
|
//获取公众号票据
|
|
export const wxConfigApi = async (param: any) => {
|
|
return await post("/userlogin/wxConfig", param);
|
|
};
|
|
|
|
export const checkOpenId = async (param: {
|
|
openId: string | number;
|
|
appCode: string;
|
|
}) => {
|
|
return await post("/open/login/js/checkUser", param);
|
|
};
|
|
export const updateUserApi = async (param: any) => {
|
|
return await post("/open/login/js/updateUser", param);
|
|
};
|
|
export const findJsByPhoneApi = async (param: any) => {
|
|
return await get("/api/js/findJsByPhone", param);
|
|
};
|