SAP 电商云 Spartacus UI 根据 CMS Comp
2021-12-18 本文已影响0人
华山令狐冲
uid:LanguageComponent


getComponentData 内部会调用 createComponentData:

如果当前不可用,会加载:



最终从 NgRx store 即内存存储中读取的 Component 数据:

那么从概念上说,这些数据一定是对应的 effect 调用 OCC API 从 Commerce Cloud 后台读取,并且使用 reducer 添加到 Store 里的。
这里就是 Effect 读取成功的代码位置:

运行时调试发现:

Home page 下所有的 CMS Component,一次性被读取回来了:



更多Jerry的原创文章,尽在:"汪子熙":
