newsData.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // import axios from '~plugins/axios'
  2. //
  3. // export const actions = {
  4. // // 获取快讯页新闻
  5. // loadAllNews ({ commit }, params = {}) {
  6. // commit('newsPage/REQUEST_ALLNEWS')
  7. // return axios.get('/api/news/created', {params})
  8. // .then(response => {
  9. // commit('newsPage/GET_ALLNEWS_SUCCESS', response.data)
  10. // }, err => {
  11. // commit('newsPage/GET_ALLNEWS_FAILURE', err)
  12. // })
  13. // },
  14. // // 获取详细新闻
  15. // loadDetailNews ({ commit }, params = {}) {
  16. // let id = params.id
  17. // commit('detailNews/REQUEST_DETAILNEWS', params)
  18. // return axios.get(`/api/news/${id}`)
  19. // .then(response => {
  20. // commit('detailNews/GET_DETAILNEWS_SUCCESS', response.data)
  21. // }, err => {
  22. // commit('detailNews/GET_DETAILNEWS_FAILURE', err)
  23. // })
  24. // },
  25. // // 获取热点新闻
  26. // loadHotNews ({ commit }, params = {}) {
  27. // commit('hotNews/REQUEST_HOTNEWS')
  28. // return axios.get('/api/news/viewCount', {params})
  29. // .then(response => {
  30. // commit('hotNews/GET_HOTNEWS_SUCCESS', response.data)
  31. // }, err => {
  32. // commit('hotNews/GET_HOTNEWS_FAILURE', err)
  33. // })
  34. // }
  35. // }
  36. //