hotSearch.js 331 B

123456789101112131415161718
  1. export const state = () => ({
  2. hot: {
  3. fetching: false,
  4. data: []
  5. }
  6. })
  7. export const mutations = {
  8. REQUEST_HOT (state) {
  9. state.hot.fetching = true
  10. },
  11. GET_HOT_FAILURE (state) {
  12. state.hot.fetching = false
  13. },
  14. GET_HOT_SUCCESS (state, result) {
  15. state.hot.fetching = false
  16. state.hot.data = result
  17. }
  18. }