
<ion-content fullscreen="true" class="mine">
  <img class="item1" alt="Silhouette of mountains" src="../../../assets/image/bcg1.jpg" />
  <ion-item>
    <ion-avatar aria-hidden="true" slot="start">
      <img alt="" src="../../../assets/image/head.jpg" />
    </ion-avatar>
    <ion-label>{{user1?.get("username") || '未登录'}}</ion-label>
  </ion-item>

  <ion-list [inset]="true">
    <!-- 其他代码 -->
  </ion-list>
  
  <ion-list [inset]="true"  class="zoom-list">
    <ion-item [button]="true">
      <ion-icon color="warning" slot="start" name="list-circle" size="large"></ion-icon>
      <ion-label>钱包</ion-label>
    </ion-item>
    <ion-item [button]="true">
      <ion-icon color="danger" slot="start" name="list-circle" size="large"></ion-icon>
      <ion-label>订单</ion-label>
      <ion-note slot="end">6</ion-note>
    </ion-item>
    <ion-item [button]="true">
      <ion-icon color="tertiary" slot="start" name="list-circle" size="large"></ion-icon>
      <ion-label>收藏</ion-label>
      <ion-note slot="end">15</ion-note>
    </ion-item>
    <ion-item [button]="true">
      <ion-icon color="success" slot="start" name="list-circle" size="large"></ion-icon>
      <ion-label>足迹</ion-label>
      <ion-note slot="end">3</ion-note>
    </ion-item>
  </ion-list>

<ion-card>
  <ion-card-header>
    <ion-card-title>{{user1?.get("username") || '未登录'}}</ion-card-title>
    <ion-card-subtitle *ngIf="!user1?.id">请您登陆后继续使用</ion-card-subtitle>
    <ion-card-subtitle *ngIf="user1?.id">{{user1?.get("username")}}-{{user1?.get("gender")}}</ion-card-subtitle>
  </ion-card-header>

  <!-- 新增：根据用户状态，显示登录/登出按钮，执行跳转或登出函数 -->
  <ion-button *ngIf="!user1?.id" fill="clear" routerLink="/craftsmart/page-login">登录</ion-button>
  <ion-button *ngIf="user1?.id" fill="clear" routerLink="/user/edit/info">编辑资料</ion-button>
 <ion-button *ngIf="user1?.id" fill="clear" (click)="logout()">登出</ion-button>
</ion-card>


  </ion-content>

