mutations.js
659 Bytes
import * as Types from './types';
export default {
[Types.FETCH_BANK_LIST_REQUEST](state) {
state.banks = {};
state.fetchingBank = true;
},
[Types.FETCH_BANK_LIST_FAILD](state) {
state.fetchingBank = false;
},
[Types.FETCH_BANK_LIST_SUCCESS](state, {banks}) {
state.fetchingBank = false;
state.banks = banks;
},
[Types.FETCH_BANK_CARD_REQUEST](state) {
state.bankCardList = [];
state.fetchingBank = true;
},
[Types.FETCH_BANK_CARD_FAILD](state) {
state.fetchingBank = false;
},
[Types.FETCH_BANK_CARD_SUCCESS](state, {card}) {
state.fetchingBank = false;
state.bankCardList.push(card);
},
};