From 3abc6b14c6c1216d2e05175e8d608b4af974ede7 Mon Sep 17 00:00:00 2001 From: Pan Date: Fri, 24 Nov 2017 13:50:09 +0800 Subject: [PATCH] refactor:change fetch => fetch --- src/api/login.js | 8 ++++---- src/api/table.js | 4 ++-- src/utils/{fetch.js => request.js} | 0 3 files changed, 6 insertions(+), 6 deletions(-) rename src/utils/{fetch.js => request.js} (100%) diff --git a/src/api/login.js b/src/api/login.js index 40e7363..3758dec 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -1,7 +1,7 @@ -import fetch from '@/utils/fetch' +import request from '@/utils/request' export function login(username, password) { - return fetch({ + return request({ url: '/user/login', method: 'post', data: { @@ -12,7 +12,7 @@ export function login(username, password) { } export function getInfo(token) { - return fetch({ + return request({ url: '/user/info', method: 'get', params: { token } @@ -20,7 +20,7 @@ export function getInfo(token) { } export function logout() { - return fetch({ + return request({ url: '/user/logout', method: 'post' }) diff --git a/src/api/table.js b/src/api/table.js index 7079817..e29c294 100644 --- a/src/api/table.js +++ b/src/api/table.js @@ -1,7 +1,7 @@ -import fetch from '@/utils/fetch' +import request from '@/utils/request' export function getList(params) { - return fetch({ + return request({ url: '/table/list', method: 'get', params diff --git a/src/utils/fetch.js b/src/utils/request.js similarity index 100% rename from src/utils/fetch.js rename to src/utils/request.js