fix: 秒杀商品SKU属性默认值

fix/0524_ch
向文可 2 years ago
parent da861c397c
commit f0734d3eb7

@ -20,7 +20,16 @@ const mutations = {
const actions = {
search: async ({ commit }, id) => {
let res = await api.searchSkus(id);
commit('setList', res || []);
commit(
'setList',
(res || []).map((item) => {
return {
...item,
price: item.price || 0,
number: item.number || 0,
};
})
);
if (!res) {
ElMessage.error('查询秒杀商品SKU列表失败');
}

Loading…
Cancel
Save