|
|
|
@ -92,10 +92,19 @@ const actions = {
|
|
|
|
|
return res;
|
|
|
|
|
},
|
|
|
|
|
load: async ({ state, commit }) => {
|
|
|
|
|
const deep = (arr) =>
|
|
|
|
|
arr.map((item) => {
|
|
|
|
|
return {
|
|
|
|
|
...item,
|
|
|
|
|
id: item.id + '',
|
|
|
|
|
childList: deep(item.childList || []),
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
commit('setOpts', {
|
|
|
|
|
...state.opts,
|
|
|
|
|
init: true,
|
|
|
|
|
category: await categoryAPI.search(),
|
|
|
|
|
category: deep(await categoryAPI.search()),
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
detail: async (context, id) => {
|
|
|
|
|