附代碼ios
//引入axios import axios from "axios" let http = axios.create() //請求攔截 http.interceptors.request.use((config)=>{ return config }) //響應攔截 http.interceptors.response.use((res)=>{ return res }) export default http
// 引入http import http from "./config" let getData ={} //封裝基礎地址 let baseUrl = "基礎地址" // 封裝接口 getData.FindTypes = (data)=>{ return http.get(`${baseUrl}/types`,data) } export default getData