refactor:change fetch => fetch

This commit is contained in:
Pan 2017-11-24 13:50:09 +08:00 committed by 花裤衩
parent 52bfe11bb7
commit 3abc6b14c6
3 changed files with 6 additions and 6 deletions

View File

@ -1,7 +1,7 @@
import fetch from '@/utils/fetch' import request from '@/utils/request'
export function login(username, password) { export function login(username, password) {
return fetch({ return request({
url: '/user/login', url: '/user/login',
method: 'post', method: 'post',
data: { data: {
@ -12,7 +12,7 @@ export function login(username, password) {
} }
export function getInfo(token) { export function getInfo(token) {
return fetch({ return request({
url: '/user/info', url: '/user/info',
method: 'get', method: 'get',
params: { token } params: { token }
@ -20,7 +20,7 @@ export function getInfo(token) {
} }
export function logout() { export function logout() {
return fetch({ return request({
url: '/user/logout', url: '/user/logout',
method: 'post' method: 'post'
}) })

View File

@ -1,7 +1,7 @@
import fetch from '@/utils/fetch' import request from '@/utils/request'
export function getList(params) { export function getList(params) {
return fetch({ return request({
url: '/table/list', url: '/table/list',
method: 'get', method: 'get',
params params