import {Message} from 'iview';
import {Modal} from 'iview';
// 配置API接口地址(加上export其他组件才能使用)
export const serverIp = 'http://127.0.0.1:82';
// 引用axios
const axios = require('axios');
// 自定义判断元素类型JS
function toType(obj) {
return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase()
}
// 参数过滤函数
function filterNull(o) {
for (const key in o) {
if (o[key] === null) {
delete o[key]
}
if (toType(o[key]) === 'string') {
o[key] = o[key].trim()
} else if (toType(o[key]) === 'object') {
o[key] = filterNull(o[key])
} else if (toType(o[key]) ===