api/index.js
@@ -1,4 +1,4 @@ import { fetch } from '@/api/request.js' import { fetch,fetchId } from '@/api/request.js' const typeObj = { headerGET: { 'Content-type': 'application/x-www-from-urlencoded' }, @@ -33,6 +33,12 @@ opt.data = params return fetch(url, opt) } export const reqGetId = (url, params, opt = {}) => { opt.header = typeObj['headerGET'] opt.method = 'GET' opt.data = params return fetchId(url, opt) } // urlParam是拼接路径的参数 export const reqGet2 = (url, params, opt = {}) => {