actions.js 934 Bytes
import * as Types from './types'
import { get } from 'lodash';

export default {
    async fetchNoticeList({ commit, state }) {
      console.log("==="+state.fetchNoticeList)
        if (state.fetchNoticeList) {
          return {};
        }
    
        let page = state.fetchNoticePage || 1;
        console.log("page:"+page)
        commit(Types.FETCH_NOTICE_LIST_REQUEST, { page });
    
        const result = await this.$api.post('/api/ufo/mine/orderSummary', {
          // page,
          // limit: 10,
          // filter: 'Y',
          // debug: 'XYZ',
          lastedTime: state.fetchNoticeLastedTime || void 0
        });
    console.log(result)
        if (result && result.code === 200) {
          commit(Types.FETCH_NOTICE_LIST_SUCCESS, {
            data: result.data,
            page
          });
        } else {
          commit(Types.FETCH_NOTICE_LIST_FAILD);
        }
    
        return result;
      },
}