import ajax from './ajax'

export const login = async (params)=> ajax(`/auth/login`,params,"POST")

export const checkLineId = async (lineid)=> ajax(`/auth/checkLineId`,{lineid},"GET")

export const getUserInfo = async ()=> ajax(`/user/getUserInfo`)

export const setUserLevel = async (level)=> ajax(`/user/setUserLevel`,{level},"POST")

export const register = async (userInfo)=> ajax(`/auth/register`,userInfo,"POST")

export const updateCard = async (userInfo)=> ajax(`/card/updateCard`,userInfo,"POST")

export const updateCusCard = async (params)=> ajax(`/card/updateCusCard`,params,"POST")

//取得名片資料
export const checkUser = async (token)=> ajax(`/card/checkUser`,{token},"GET")

export const getCard = async (params)=> ajax(`/card/getCard`,params,"GET")

export const getCusCard = async (params)=> ajax(`/card/getCusCard`,params,"GET")
export const getVipCard = async (params)=> ajax(`/card/getVipCard`,params,"GET")

export const getCard1 = async (userid)=> ajax(`/card/getCard1`,{userid},"GET")
