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

@@ -3,7 +3,7 @@ import { Message } from 'element-ui';
import store from '../store';
import router from '../router';
export default function fetch(options) {
export default function _fetch(options) {
return new Promise((resolve, reject) => {
const instance = axios.create({
baseURL: process.env.BASE_API,
@@ -49,10 +49,10 @@ export default function fetch(options) {
});
}
export function tpFetch(options) {
export function fetch(options) {
return new Promise((resolve, reject) => {
const instance = axios.create({
// timeout: 2000,
timeout: 2000 // 超时
});
instance(options)
.then(response => {