diff --git a/src/store/modules/operation/advertise/advertise.js b/src/store/modules/operation/advertise/advertise.js index 40b8955..7b9294b 100644 --- a/src/store/modules/operation/advertise/advertise.js +++ b/src/store/modules/operation/advertise/advertise.js @@ -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) => {