NIUCLOUD是一款SaaS管理后台框架多应用插件+云编译。上千名开发者、服务商正在积极拥抱开发者生态。欢迎开发者们免费入驻。一起助力发展! 广告
# 具体某接口的请求封装:api/index.js配置 > 引入上一章的get函数 ``` import { get } from './helpers' ``` > 定义具体访问的接口,注意,这些接口是已存在的,不是在这里定义的,这里仅仅是为了规范代码而进行的简单封装。 ``` const getSeller = get('api/seller') const getGoods = get('api/goods') const getRatings = get('api/ratings') ``` > 将所有封装输出 ``` export { getSeller, getGoods, getRatings } ```