market.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import Serve from '@/api/serve'
  2. class Market {
  3. /**
  4. * 轮播图列表
  5. * @param {Object} data
  6. * @param {int} type 请求类型 1是pc(默认) 2是app
  7. * @param {int} position 位置 1(币币首页) 2(预留扩展)
  8. */
  9. static cryptocurrenciesWithdrawal(type, position) {
  10. return Serve.post(`/market/banner/${type}/${position}`);
  11. }
  12. /**
  13. * 用户收藏交易对信息 需要先登录
  14. */
  15. static userFavList() {
  16. return Serve.get(`/coin/market/collection/list`);
  17. }
  18. static blogCategoryList() {
  19. return Serve.get(`/blogCategory/list`);
  20. }
  21. static blogDetailList(categoryId, params) {
  22. return Serve.get(`/blog/list/${categoryId}`, params );
  23. }
  24. static blogDetailContent(id) {
  25. return Serve.get(`/blog/detail/${id}`);
  26. }
  27. // 初始化查询市场行情
  28. static getMarketList() {
  29. return Serve.get(`/exchange/getMarketList`);
  30. }
  31. // 初始化买卖盘数据
  32. static getBooks(data) {
  33. return Serve.get(`/exchange/getMarketInfo`,data);
  34. }
  35. // 获取币种信息
  36. static getCoinInfo(data){
  37. return Serve.get(`/exchange/getCoinInfo`,data)
  38. }
  39. }
  40. export default Market;