SAP Spartacus OccEndpointsService调用getBaseEndpoint的一些场景
生活随笔
收集整理的這篇文章主要介紹了
SAP Spartacus OccEndpointsService调用getBaseEndpoint的一些场景
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
加上兩處打印信息:
BaseEndpoint由三處信息組成:
一些常見的使用場(chǎng)景:
user-details.effect.ts里獲取id為current的用戶明細(xì)
user-token.interceptor.ts: HTTP請(qǐng)求的攔截器
AnonymousConsentsInterceptor
site-context.interceptor.ts
用得最多的就是加載CMS page:
languages.effect.ts
取site language:
currencies.effect.ts
取site currency:
cart.effect.ts
根據(jù)購(gòu)物車id加載購(gòu)物車數(shù)據(jù):
cms-component.connector.ts:
由此可見,OccEndpointsService的直接和間接類的消費(fèi)者,最多的就是effect和connector.
這個(gè)anonymousConsentTemplates被觸發(fā)的次數(shù)非常非常多:
要獲取更多Jerry的原創(chuàng)文章,請(qǐng)關(guān)注公眾號(hào)"汪子熙":
總結(jié)
以上是生活随笔為你收集整理的SAP Spartacus OccEndpointsService调用getBaseEndpoint的一些场景的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: js如何实现页面跳转_js当前页面跳转
- 下一篇: SAP Spartacus HTTP请求