import * as types from "../type"
import api from "../../fetch/api
const actions = {
/**
*
*/
getTravelsList({ commit }) {
if (state.scroll) {
commit(types.GET_TRAVELS_PAGE_NUM)
commit(types.COM_LOADING_STATUS, true),
commit(types.GET_TRAVELS_SCORLL_STATUS, false)
api.TravelsList()
.then(res => {
commit(types.COM_LOADING_STATUS, false),
commit(types.GET_TRAVELS_SCORLL_STATUS, true)
commit(types.GET_TRAVELS_LIST, res)
})
}
}
}
the above method comes from a demo, on the Internet, but I don"t understand how it is executed. What do you mean?