index.ts 521 B

12345678910111213141516171819
  1. import { request, goCommonSearchUrl } from '@/utils/request/index';
  2. import { Method } from 'axios'
  3. /**
  4. * go 接口通用查询
  5. * @param url 接口路径
  6. * @param params 请求参数
  7. * @param method 请求方式
  8. * @returns
  9. */
  10. export function commonSearch_go(url: string, params: Object, method: Method = 'get'): Promise<any> {
  11. return request({
  12. method,
  13. url: goCommonSearchUrl(url),
  14. params,
  15. })
  16. .then((value) => value.data.data)
  17. .catch((err) => Promise.reject(err));
  18. }