封装fetch
const fetcher = (url: IUrl,data: any)=>{...}
//GET
...
//POST
...
//PUT
...
//DELETE
...
...
暴露不同的功能模块
export async function userRegister(regForm:IRegForm){...}
...
...
...
使用方式
import { userRegister } from '...'
await userRegister(regForm)
...
...
封装fetch
暴露不同的功能模块
使用方式