news.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. import Service from '../lib/service'
  2. import axios from "axios";
  3. import Config from '../config'
  4. class NewsService extends Service {
  5. constructor () {
  6. super()
  7. axios.defaults.baseURL = Config.Host80
  8. }
  9. //观点分析
  10. async newsAnalysisList (params = {}) {
  11. let res = await this.postAll("Host80","/news/analysis/search/list", params);
  12. return res
  13. }
  14. //观点分析
  15. async newsAnalysisSingle (params = {}) {
  16. let res = await this.postAll("Host80","/news/analysis/search/single", params);
  17. return res
  18. }
  19. //公告通知
  20. async newsInformationList (params = {}) {
  21. let res = await this.postAll("Host80","/web/information/list", params);
  22. return res
  23. }
  24. //公告通知
  25. async newsInformationSingle (params = {}) {
  26. let res = await this.postAll("Host80","/web/information/single", params);
  27. return res
  28. }
  29. //通知
  30. async newsNoticeList (params = {}) {
  31. let res = await this.postAll("Host80","/web/notice/search/list/record", params);
  32. return res
  33. }
  34. //通知-未读数量
  35. async newsNoticeRead (params = {}) {
  36. let res = await this.postAll("Host80","/web/notice/search/read", params);
  37. return res
  38. }
  39. //通知
  40. async newsNoticeSingle (params = {}) {
  41. let res = await this.postAll("Host80","/web/notice/search/single/record", params);
  42. return res
  43. }
  44. //新闻时讯
  45. async newsInformationNewsletterList (params = {}) {
  46. let res = await this.postAll("Host80","/web/information/newsletter/list", params);
  47. return res
  48. }
  49. //新闻时讯
  50. async newsInformationNewsletterSingle (params = {}) {
  51. let res = await this.postAll("Host80","/web/information/single", params);
  52. return res
  53. }
  54. //交易策略
  55. async handShakeGet (params = {}) {
  56. let res = await this.postAll("Host80","/hand/shake/get/featured_forex", params);
  57. return res
  58. }
  59. //财经日历
  60. async handFinancialCalendar (params = {}) {
  61. let res = await this.postAll("Host80","/hand/shake/get/economic_calendar", params);
  62. return res
  63. }
  64. //视频
  65. async newsVideoList (params = {}) {
  66. let res = await this.postAll("Host80","/web/video/list", params);
  67. return res
  68. }
  69. //视频
  70. async newsVideoSingle (params = {}) {
  71. let res = await this.postAll("Host80","/web/video/single", params);
  72. return res
  73. }
  74. //webTv
  75. async newsWebTvSearch (params = {}) {
  76. let res = await this.postAll("Host80","/news/web/tv/search/list", params);
  77. return res
  78. }
  79. //webTv
  80. async newsWebTvSearchSingle (params = {}) {
  81. let res = await this.postAll("Host80","/news/web/tv/search/single", params);
  82. return res
  83. }
  84. //电子书列表
  85. async newsEbookList (params = {}) {
  86. let res = await this.postAll("Host80","/web/ebook/list", params);
  87. return res
  88. }
  89. //电子书详情
  90. async newsEbookSingle (params = {}) {
  91. let res = await this.postAll("Host80","/web/ebook/single", params);
  92. return res
  93. }
  94. }
  95. export default new NewsService