api.ts 540 B

123456789101112131415161718192021222324
  1. import { request } from '/@/utils/service';
  2. const apiPrefix = '/api/searchterm/';
  3. export function getTableData(query: any) {
  4. return request({
  5. url: apiPrefix + 'brandview/',
  6. method: 'GET',
  7. params: query,
  8. });
  9. }
  10. export function postDownload(body: any) {
  11. return request({
  12. url: apiPrefix + 'topsearchtermTable/',
  13. method: 'POST',
  14. params: body,
  15. responseType: 'blob',
  16. headers: {
  17. 'Accept': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' // 指定接受 Excel 文件
  18. }
  19. });
  20. }