多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
`class HTTP` ~~~ import axios from "axios" axios.defaults.baseURL = 'https://www.easy-mock.com/mock/5bf3c7b551173f3d71de3a58/vue'; class HTTP{ request({url,method="GET",data={},params={}}){ return axios({ method, url, data, params }); } } export {HTTP} ~~~ ~~~ import {HTTP} from "./HTTP"; class HomeModel extends HTTP{ getHomeData(){ return this.request({ url:"/index" }) } } export {HomeModel}; ~~~ 在组件的mounted()中使用