方案一
const getHelpCenter = createAction(GET_HELP_CENTER, () => request('api/hisense/article/menu/list?menuId=4'))
方案二
const searchHelpCenter = createAction(GET_HELP_CENTER, async (key, callback) => {
const res = await request('api/hisense/article/menu/list?menuId=4')
callback(res)
})
引用时(特别注意:这两段只是代码片段,只看用的格式就好)
方案一的引用
this.methods.getHelpCenter().then(() => {
})
方案二的引用
this.searchHelpCenter(value, (res) => {
})