
/**
 *axios封装使用实例
 *
 */

import request from '@/utils/request'
// 对应request.js export default request 可更改默认的baseURL
// const api = request.create({ baseURL: 'http://localhost:8081' })

// **全局唯一 Axios 实例**
// 对应request.js export default (params) => Factory(params)
// const api = request({ baseURL: 'http://localhost:8080' })

// 示例请求
// export function login (params) {
//  return request({
//    url: '/auth/login',
//    method: 'post',
//    data: params
//  })
// }
// 示例请求
// export const login = (params) => api.post('/auth/login', params)
// export const login = (params) => request.post('/auth/login', params)

// 用户登入
export const login = (params) => request.post('/auth/login', params)
// 用户注册
export const register = (params) => request.post('/auth/register', params)
