import request from '@/utils/request'

export const userLogin = (data: any) => {
    return request({
        url: `/admin/login`,
        method: 'post',
        data
    })
}
export const login = (data: any) => {
    return request({
        url: `pcf-user/login`,
        method: 'post',
        headers: {
            'Content-Type': 'multipart/form-data'
        },
        data
    })
}
// 博世登录

export const boschLogin = (data: any) => {
    return request({
        url: 'bs/login',
        method: 'post',
        data
    })
}

export const havecodem = (data: any) => {
    return request({
        url: 'corian-project/auth/sendCode',
        method: 'post',
        data
    })
}
export const forgetPass = (data: any) => {
    return request({
        url: 'corian-project/auth/resetPassword',
        method: 'post',
        data
    })
}
export const logout = () => {
    return request({
        url: 'corian-project/auth/logout',
        method: 'delete'
    })
}
// auth/saveUserDemand
export const UserDemand = (data: any) => {
    return request({
        url: 'corian-project/auth/saveUserDemand',
        method: 'post',
        data
    })
}
// auth/saveUserDemand
export const checkToken = () => {
    return request({
        url: 'corian-project/auth/checkToken',
        method: 'get'
    })
}



// 通用单点登录

export const singleLogin = (data) => {
    return request({
        url: 'pcf-user/singleLogin',
        method: 'post',
        params: data
    })
}
