多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
## 使用class封装好的http ### 1.引入HTTP ``` import { HTTP } from "../utils/http-p"; ``` ### 2.子类继承父类 ``` class MovieModel extends HTTP{ getInTheaters(){ return this.request({ url:"in_theaters" }) } getTop250(){ return this.request({ url:"top250" }) } getComingSoon(){ return this.request({ url:"coming_soon" }) } } ``` >定义更为具体的三个方法 ### 3.向外暴露类MovieModel ``` export {MovieModel}; ```