vue中get和post请求
import axios from 'axios'; import router from '@/router'; import { setSessionStorage, getSessionStorage, removeSessionStorage } from '@/utils/mixin'; class Http { constructor(){ this.Domain = 'http://*******'; } require(options) { if (!options.api) throw new Error('api 不能为空'); if (!options.param) { options.param = {} }; if (!options.methods) { options.methods = 'POST' }; //不传递方法默认为POST }; return new Promise((resolve,reject) => { let obj={ method: options.methods, url: options.api, baseURL: '/wap', headers: { 'appname':'com.immortal