封装请求接口

This commit is contained in:
jqtmviyu@gmail.com 2021-01-13 16:01:05 +08:00
parent 2652b2d608
commit 41eb5e0fd1

View File

@ -1,4 +1,4 @@
// import request from '@/utils/request' import request from '@/utils/request'
export function login(data) { export function login(data) {
// return request({ // return request({
@ -6,6 +6,11 @@ export function login(data) {
// method: 'post', // method: 'post',
// data // data
// }) // })
return request({
url: '/sys/login', // 在baseurl里配置了/api
method: 'post',
data
})
} }
export function getInfo(token) { export function getInfo(token) {