import { request } from '@/utils/request'

export function getUserInfo() {
  return request('/user/getUserInfo')
}

export function updateUserInfo(params) {
  return request('/user/updateUserInfo','post',params)
}

export function getUserAddress() {
  return request('/user/getUserAddress')
}

export function addUserAddress(params) {
  return request('/user/addUserAddress', 'post', params)
}

export function delUserAddress(id) {
  return request('/user/delUserAddress', 'post', { id })
}

export function setUserAddressDefault(id) {
  return request('/user/setUserAddressDefault', 'post', { id })
}

export function getUserDefaultAddress() {
  return request('/user/getUserDefaultAddress', 'get')
}

export function getUserOrders() {
  return request('/user/getUserOrders', 'post')
}

export function getUserAccounts(page) {
  return request('/user/getUserAccounts', 'get', { page })
}

export function addUserAccount(params) {
  return request('/user/addUserAccount', 'post', params)
}

export function delUserAccount(id) {
  return request('/user/delUserAccount', 'get', { id })
}

export function getUserAccInfo() {
  return request('/user/getUserAccInfo', 'get')
}

export function getShareInfo() {
  return request('/user/getShareInfo', 'get')
}

export function getUserBank() {
  return request('/user/getBank', 'get')
}

export function updateUserBank(params) {
  return request('/user/updateBank', 'post', params)
}

export function getRecommandList(page) {
  return request('/user/getRecommandList', 'get', {page})
}

export function updateUserResale() {
  return request('/user/updateUserResale', 'get')
}