Commit 4837694f by 姜雷

修改创建API方式

parent 136f54c0
import axios from 'axios';
import { Message, MessageBox } from 'element-ui';
// import store from '../store';
import store from '../store';
import { SUCCESS_CODE } from '@/config';
import { errorHandle } from '@/api/validate';
import { getYourIP } from '@/utils/getIp.js';
......@@ -10,7 +10,7 @@ getYourIP(ipVal => {
ip = ipVal;
});
const createBaseFetch = (config, store) => {
const createBaseFetch = config => {
// 创建axios实例
const service = axios.create({
timeout: 10000,
......
......@@ -14,12 +14,9 @@ import storeModule from './storeModule';
import mixinModule from './mixins';
import utilsModule from './utils';
const fetch = createBaseFetch(
{
const fetch = createBaseFetch({
timeout: 10000,
},
store
);
});
class SystemShell {
constructor() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment