modal-user-login.component.html 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <!-- 用户登录状态 -->
  2. <ion-card>
  3. <ion-card-header>
  4. <ion-card-title>
  5. <ion-segment [value]="type" (ionChange)="typeChange($event)">
  6. <ion-segment-button value="login">
  7. <ion-label>登录</ion-label>
  8. </ion-segment-button>
  9. <ion-segment-button value="signup">
  10. <ion-label>注册</ion-label>
  11. </ion-segment-button>
  12. </ion-segment>
  13. </ion-card-title>
  14. <ion-card-subtitle>请输入账号密码</ion-card-subtitle>
  15. </ion-card-header>
  16. <ion-card-content>
  17. <ion-item>
  18. <ion-input [value]="username" (ionChange)="usernameChange($event)" label="昵称" placeholder="昵称"></ion-input>
  19. </ion-item>
  20. <ion-item>
  21. <ion-input [value]="password" (ionChange)="passwordChange($event)" label="密码" type="password" value="password"placeholder="密码"></ion-input>
  22. </ion-item>
  23. @if(type==="signup"){
  24. <ion-item>
  25. <ion-input [value]="password2" (ionChange)="password2Change($event)" label="密码确认" type="password" value="password"></ion-input>
  26. </ion-item>
  27. }
  28. @if(type==="login"){
  29. <ion-button expand="block" color="danger" (click)="login()" style="flex: 1; margin-left: 5px;">登录</ion-button>
  30. }
  31. @if(type==="signup"){
  32. <ion-button expand="block" color="danger" (click)="signup()" style="flex: 1; margin-right: 5px;">注册</ion-button>
  33. }
  34. </ion-card-content>
  35. </ion-card>