import request from '@/utils/axios.js'

/**
  * @description 验证码
  */
export function captchaApi() {
    return request.get(`captcha`)
}
/**
  * @description 登录
  */
export function login(data) {
    return request.post(`/login/account`, data)
}

/**
  * @description 信息
  */
export function info(data) {
    return request.get(`user`, data)
}

/**
 * @description 退出登录
 */
export function logout() {
    return request.post(`logout`)
}

/**
 * @description 用户类型
 */
export function userShipApi(data) {
    return request.get(`/user/UserShip/lists`, { params: data })
}

/**
* @description 添加会员
*/
export function userAddApi(data) {
    return request.post(`/user/user/add`, data)
}

/**
* @description 发送新增用户档案验证码
*/
export function userArchivesSmsApi(data) {
    return request.post(`/user/user/archives_sms`, data)
}

/**
* @description 会员列表
*/
export function userListsApi(data) {
    return request.get(`/user/user/lists`, { params: data })
}

/**
* @description 用户详情
*/
export function userDetailApi(data) {
    return request.get(`/user/user/detail`, { params: data })
}

/**
* @description 地址详情
*/
export function userAddressDetailApi(data) {
    return request.get(`/user/Address/detail`, { params: data })
}

/**
* @description 修改地址
*/
export function userAddressEditApi(data) {
    return request.post(`/user/Address/edit`, data)
}

/**
* @description 充值
*/
export function userRechangeAmountApi(data) {
    return request.post(`/store_order/StoreOrder/rechange_amount`, data)
}

/**
* @description 设置会员
*/
export function userShipUpdateApi(data) {
    return request.post(`/user/user/user_ship`, data)
}

/**
* @description 用户标签
*/
export function userLabelListApi(data) {
    return request.get(`/user/UserLabel/lists`, { params: data })
}

/**
* @description 编辑用户标签
*/
export function userLabelUpdateApi(data) {
    return request.post(`/user/user/user_label`, data)
}

/**
* @description 用户快捷充值列表
*/
export function userRechargeListApi(data) {
    return request.post(`/user/User/recharge_list`, data)
}
