skupList.js
733 Bytes
export default function() {
return {
namespaced: true,
state: {
filterData: []
},
mutations: {
setFilterData(state, info) {
state.filterData = info;
}
},
actions: {
// 查询二手/瑕疵商品列表
async fetchSecondSkupList({commit, state}, params) {
let result = await this.$api.get('/api/ufo/secondhand/skupList', {
...params,
});
return result;
},
// 查询二手/瑕疵筛选列表
async fetchSecondFilterData({commit}) {
let {data} = await this.$api.get('/api/ufo/secondhand/filterData');
commit('setFilterData', data.filter || []);
return data.filter || [];
},
},
};
}