SAP Spartacus OccEndpointsService调用getBaseEndpoint的一些场景

加上两处打印信息:

SAP Spartacus OccEndpointsService调用getBaseEndpoint的一些场景
SAP Spartacus OccEndpointsService调用getBaseEndpoint的一些场景

BaseEndpoint由三处信息组成:

SAP Spartacus OccEndpointsService调用getBaseEndpoint的一些场景

一些常见的使用场景:

user-details.effect.ts里获取id为current的用户明细

SAP Spartacus OccEndpointsService调用getBaseEndpoint的一些场景

user-token.interceptor.ts: HTTP请求的拦截器

SAP Spartacus OccEndpointsService调用getBaseEndpoint的一些场景

AnonymousConsentsInterceptor

SAP Spartacus OccEndpointsService调用getBaseEndpoint的一些场景

site-context.interceptor.ts

SAP Spartacus OccEndpointsService调用getBaseEndpoint的一些场景

用得最多的就是加载CMS page:

SAP Spartacus OccEndpointsService调用getBaseEndpoint的一些场景

languages.effect.ts

取site language:

SAP Spartacus OccEndpointsService调用getBaseEndpoint的一些场景

currencies.effect.ts

取site currency:

SAP Spartacus OccEndpointsService调用getBaseEndpoint的一些场景

cart.effect.ts

根据购物车id加载购物车数据:

SAP Spartacus OccEndpointsService调用getBaseEndpoint的一些场景

cms-component.connector.ts:

SAP Spartacus OccEndpointsService调用getBaseEndpoint的一些场景

由此可见,OccEndpointsService的直接和间接类的消费者,最多的就是effect和connector.

这个anonymousConsentTemplates被触发的次数非常非常多:
SAP Spartacus OccEndpointsService调用getBaseEndpoint的一些场景

要获取更多Jerry的原创文章,请关注公众号"汪子熙":
SAP Spartacus OccEndpointsService调用getBaseEndpoint的一些场景