import http from "@/http/http.js";
let baseUrl = "/api/web/auth/accessAuth/springBoard";

//获取短信验证码
export function getVerifyCode(phone) {
    return http.post(baseUrl, {
        actionType: "getVerifyCode",
        actionBody: {
            mobile: phone // Y 手机号
        }
    });
}

//验证码登录
export function userPinByLgoinVcode(params) {
    return http.post(baseUrl, {
        actionType: "userPinByLgoinVcode",
        actionBody: params
    });
}

//账号密码登录
export function userPinByLgoin(params) {
    return http.post(baseUrl, {
        actionType: "userPinByLgoin",
        actionBody: params
    });
}

//用户注册
export function userPinByRegister(params) {
    return http.post(baseUrl, {
        actionType: "userPinByRegister",
        actionBody: params
    });
}

//按照手机号和验证码修改密码
export function putUserPwdByMobile(params) {
    return http.post(baseUrl, {
        actionType: "putUserPwdByMobile",
        actionBody: params
    });
}

//退出
export function logout(userpin) {
    return http.post(baseUrl, {
        actionType: "logout",
        actionBody: {
            userpin: userpin //  Y 用户登录凭证key
        }
    });
}