index.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. import http from "@/utils/request";
  2. export const get_exchange = (params: any, callback: any) => {
  3. return http.request("/priceCollect/api/getExchange", "get", params).then((data: any) => {
  4. if (data) callback && callback(data);
  5. });
  6. };
  7. export const get_coin = (params: any, callback: any) => {
  8. return http.request("/priceCollect/api/getCoin", "get", params).then((data: any) => {
  9. if (data) callback && callback(data);
  10. });
  11. };
  12. export const get_depth = (params: any, callback: any) => {
  13. return http.request("/priceCollect/api/getPrices", "get", params).then((data: any) => {
  14. if (data) callback && callback(data);
  15. });
  16. };
  17. export const get_incremental_depth = (params: any, callback: any) => {
  18. return http.request("/priceCollect/api/getAddPrices", "get", params).then((data: any) => {
  19. if (data) callback && callback(data);
  20. });
  21. };
  22. export const get_hot_list = (params: any, callback: any) => {
  23. return http.request("/hotCollect/api/getHot", "get", params).then((data: any) => {
  24. if (data) callback && callback(data);
  25. });
  26. };
  27. export const get_hotMonitoring_list = (params: any, callback: any) => {
  28. return http.request("/hotCollect/api/getHotMonitoring", "get", params).then((data: any) => {
  29. if (data) callback && callback(data);
  30. });
  31. };