user-login.component.html 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <ion-header [translucent]="true">
  2. <ion-toolbar class="custom-toolbar">
  3. <ion-buttons slot="start">
  4. <ion-back-button default-href="/tabs/tab5" style="color:black;"></ion-back-button>
  5. </ion-buttons>
  6. @if(!currentUser?.id){
  7. <ion-title class="custom-title">
  8. 用户登录注册
  9. </ion-title>
  10. }
  11. @if(currentUser?.id){
  12. <ion-title class="custom-title">
  13. 个人信息
  14. </ion-title>
  15. }
  16. </ion-toolbar>
  17. </ion-header>
  18. <ion-content [fullscreen]="true" style="padding-top: 3px;">
  19. <!-- 用户登录状态 -->
  20. <ion-card style="height: 90%;width: 90%;">
  21. <!-- 未登录 -->
  22. @if(!currentUser?.id){
  23. <ion-card-header style="display: flex;align-items: center;">
  24. <ion-card-title>Register/Login</ion-card-title>
  25. <ion-card-subtitle>no user information</ion-card-subtitle>
  26. </ion-card-header>
  27. }
  28. <!-- 已登录 -->
  29. @if(currentUser?.id){
  30. <ion-card-header class="card-header">
  31. <img [src]="currentUser?.get('avatar')|| '../../assets/image/doctor7.png'" alt="头像" class="avatar" />
  32. <div class="user-info">
  33. <ion-card-title>账号:{{currentUser?.get("username")}}</ion-card-title>
  34. <ion-card-subtitle>
  35. 姓名: {{currentUser?.get("realname") || "-"}}
  36. 性别: {{currentUser?.get("gender") || "-"}}
  37. 年龄: {{currentUser?.get("age") || "-"}}
  38. </ion-card-subtitle>
  39. </div>
  40. </ion-card-header>
  41. }
  42. <ion-card-content>
  43. @if(!currentUser?.id){
  44. <img src="../../assets/img/background.png" alt="登录注册">
  45. <ion-button expand="block" (click)="signup()">注册</ion-button>
  46. <ion-button expand="block" (click)="login()">登录</ion-button>
  47. <div style="display: flex;align-items: center;">
  48. <img style="height: 40px;width: 40px;border-radius: 20px;" src="../../assets/img/login_icon.png" alt="">
  49. <img style="height: 40px;width: 40px;border-radius: 10px;" src="../../assets/img/login_icon2.png" alt="">
  50. <!-- <img style="height: 40px;width: 40px;border-radius: 20px;" src="../../assets/img/login_icon3.png" alt="">
  51. <img style="height: 40px;width: 40px;border-radius: 20px;" src="../../assets/img/login_icon4.png" alt=""> -->
  52. </div>
  53. <span style="margin-left: 70px;">Forgot your password?</span>
  54. <!-- <img src="../../assets/img/login_icon.png" alt=""> -->
  55. }
  56. @if(currentUser?.id){
  57. <ion-button expand="block" (click)="editUser()">编辑资料</ion-button>
  58. <ion-button expand="block" (click)="logout()">登出</ion-button>
  59. }
  60. </ion-card-content>
  61. </ion-card>
  62. @if(currentUser?.id){
  63. <ion-card class="memo-card">
  64. <h2 class="memo-title">健康备忘录</h2>
  65. <p class="memo-description">写下您问诊的医生名或者心动的科普知识,便于您下次查找(点击标签可删除)</p>
  66. <edit-tag (onTagChange)="setTagsValue($event)"></edit-tag>
  67. <h2 class="memo-title">收藏夹</h2>
  68. <ul class="tag-list">
  69. @for(tag of editTags; track tag;){
  70. <li class="tag-item">{{tag}}</li>
  71. }
  72. </ul>
  73. </ion-card>
  74. }
  75. </ion-content>