add table demo

This commit is contained in:
Pan
2017-04-22 21:44:36 +08:00
parent 95aca8e0c3
commit 6d9ddadcf1
8 changed files with 431 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
import { tpFetch } from 'utils/fetch';
import { fetch } from 'utils/fetch';
export function getList() {
return tpFetch({
return fetch({
url: '/article/list',
method: 'get'
});

48
src/api/article_table.js Normal file
View File

@@ -0,0 +1,48 @@
import { fetch } from 'utils/fetch';
import { param } from 'utils';
// export function calendarsList(query) {
// return fetch({
// url: '/finfo/calendars?' + param(query),
// method: 'get'
// });
// }
export function fetchList(query) {
return fetch({
url: '/article_table/list',
method: 'get'
});
}
export function calendarCreate(data) {
return fetch({
url: '/finfo/calendar/create',
method: 'post',
data
});
}
export function calendarDelete(id) {
return fetch({
url: '/finfo/calendar/delete',
method: 'post',
data: { id }
});
}
export function calendarUpdate(data) {
return fetch({
url: '/finfo/calendar/update',
method: 'post',
data
});
}
export function calcountriesList() {
return fetch({
url: '/finfo/calcountries',
method: 'get'
});
}