import BaseAPI from '@/api/base_api'

const httpRequest = new BaseAPI(webConf)

// 获取用户信息
export function getUser() {
  return httpRequest.get('/passport/account/get-user-info')
}

// 退出登录
export function logout() {
  return httpRequest.get('/passport/rest/logout')
}

// 获取oss signature
export function getSignature() {
  return httpRequest.get('/usercenter/aliyun/get-signature')
}

// 图片上传
export function uploadFile(data) {
  return httpRequest.post('https://webapp-pub.oss-cn-beijing.aliyuncs.com', data, {
    withCredentials: false,
    headers: { 'Content-Type': 'multipart/form-data' }
  })
}
