mutations.js
598 Bytes
import * as Types from './types';
export default {
[Types.FETCH_YOHO_COUPON_REQUEST](state) {
state.fetching = true;
},
[Types.FETCH_YOHO_COUPON_SUCCESS](state, {list, filter, type}) {
state.fetching = false;
state.yohoList[type] = list;
if (filter) {
state.filterList = filter;
}
},
[Types.FETCH_YOHO_COUPON_FAILED](state) {
state.fetching = false;
},
[Types.FETCH_YOHO_COUPON_NUM_SUCCESS](state, data) {
state.num = data;
},
[Types.FETCH_UFO_COUPON_SUCCESS](state, {list = []}) {
state.fetching = false;
state.ufoList = list;
}
};