SAP Spartacus checkout Shipping address的页面实现
生活随笔
收集整理的這篇文章主要介紹了
SAP Spartacus checkout Shipping address的页面实现
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
shipping address維護(hù)頁面的id:/checkout/shipping-address:
后臺(tái)cms的請(qǐng)求:
layout實(shí)現(xiàn):
<ng-container *ngIf="cards$ | async as cards"><h3 class="cx-checkout-title d-none d-lg-block d-xl-block">{{ 'checkoutAddress.shippingAddress' | cxTranslate }}</h3><ng-container *ngIf="!forceLoader && !(isLoading$ | async); else loading"><ng-container*ngIf="isAccountPayment || (cards?.length && !addressFormOpened);else newAddressForm"><p class="cx-checkout-text">{{ 'checkoutAddress.selectYourShippingAddress' | cxTranslate }}</p><div class="cx-checkout-btns row" *ngIf="!isAccountPayment"><div class="col-sm-12 col-md-12 col-lg-6"><buttonclass="btn btn-block btn-action"(click)="showNewAddressForm()">{{ 'checkoutAddress.addNewAddress' | cxTranslate }}</button></div></div><div class="cx-checkout-body row"><divclass="cx-shipping-address-card col-md-12 col-lg-6"*ngFor="let card of cards; let i = index"><divclass="cx-shipping-address-card-inner"(click)="selectAddress(card.address)"><cx-card[border]="true"[fitToContainer]="true"[content]="card.card"(sendCard)="selectAddress(card.address)"></cx-card></div></div></div><div class="cx-checkout-btns row"><div class="col-md-12 col-lg-6"><button class="cx-btn btn btn-block btn-action" (click)="back()">{{ backBtnText | cxTranslate }}</button></div><div class="col-md-12 col-lg-6"><buttonclass="cx-btn btn btn-block btn-primary"[disabled]="!selectedAddress?.id"(click)="next()">{{ 'common.continue' | cxTranslate }}</button></div></div></ng-container><ng-template #newAddressForm><cx-address-form*ngIf="cards.length; else initialAddressForm"[showTitleCode]="true"(backToAddress)="hideNewAddressForm(false)"(submitAddress)="addAddress($event)"></cx-address-form><ng-template #initialAddressForm><cx-address-form[showTitleCode]="true"[setAsDefaultField]="!isGuestCheckout"[addressData]="selectedAddress"cancelBtnLabel="{{ backBtnText | cxTranslate }}"(backToAddress)="hideNewAddressForm(true)"(submitAddress)="addAddress($event)"></cx-address-form></ng-template></ng-template></ng-container><ng-template #loading><div class="cx-spinner"><cx-spinner></cx-spinner></div></ng-template> </ng-container>這個(gè)ng-container里的else loading中的loading是一個(gè)template的id:
這個(gè)cx-spinner是一個(gè)reuse的轉(zhuǎn)盤動(dòng)畫控件:
顯示的時(shí)候,UI被鎖住,continue按鈕不可見。
Next按鈕的實(shí)現(xiàn):在next函數(shù)里
要獲取更多Jerry的原創(chuàng)文章,請(qǐng)關(guān)注公眾號(hào)"汪子熙":
總結(jié)
以上是生活随笔為你收集整理的SAP Spartacus checkout Shipping address的页面实现的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: flash如何制作绚丽星空的动画
- 下一篇: telnet命令详解_Telnet命令(