|
@@ -15,43 +15,34 @@
|
|
|
</ion-toolbar>
|
|
|
</ion-header>
|
|
|
|
|
|
-<!-- <ion-card>
|
|
|
- <img alt="" src="https://ionicframework.com/docs/img/demos/card-media.png" />
|
|
|
- <ion-card-header>
|
|
|
- <ion-card-title>{{user?.get("username") || '未登录'}}</ion-card-title>
|
|
|
- <ion-card-subtitle *ngIf="!user?.id">请您登陆后继续使用</ion-card-subtitle>
|
|
|
- <ion-card-subtitle *ngIf="user?.id">{{user?.get("name")}}-{{user?.get("gender")}}</ion-card-subtitle>
|
|
|
- </ion-card-header> -->
|
|
|
-
|
|
|
- <!-- 新增:根据用户状态,显示登录/登出按钮,执行跳转或登出函数 -->
|
|
|
- <!-- <ion-button *ngIf="!user?.id" fill="clear" routerLink="../../modules/user/login">登录</ion-button>
|
|
|
- <ion-button *ngIf="user?.id" fill="clear" routerLink="../../modules/user/edit/info">编辑资料</ion-button>
|
|
|
- <ion-button *ngIf="user?.id" fill="clear" (click)="logout()">登出</ion-button>
|
|
|
-</ion-card> -->
|
|
|
|
|
|
<ion-content>
|
|
|
+
|
|
|
<ion-card-content>
|
|
|
<ion-avatar style="margin-left:15px;margin-top:15px; transform:scale(1.8)">
|
|
|
<img src="https://ionicframework.com/docs/img/demos/avatar.svg" alt="User Avatar">
|
|
|
</ion-avatar>
|
|
|
<ion-card-content>
|
|
|
- <p (click)="openLoginPage()" style="margin-left:10px;margin-top:15px;font-size:20px">登录/注册</p>
|
|
|
+ <p *ngIf="!user?.id" (click)="openLoginPage()" style="margin-left:10px;margin-top:15px;font-size:20px">登录/注册</p>
|
|
|
+ <p *ngIf="user?.id" (click)="openLoginPage()" style="margin-left:10px;margin-top:15px;font-size:20px">{{user?.get("username")}}</p>
|
|
|
</ion-card-content>
|
|
|
+ <ion-button *ngIf="user?.id" fill="clear" (click)="logout()">登出</ion-button>
|
|
|
+
|
|
|
</ion-card-content>
|
|
|
|
|
|
<ion-card>
|
|
|
<ion-grid>
|
|
|
<ion-row>
|
|
|
<ion-col size="4">
|
|
|
- <p class="count" style="color:black" (click)="openFollowingPage()">{{user.following}}</p>
|
|
|
+ <p class="count" style="color:black" (click)="openFollowingPage()">{{userCount.following}}</p>
|
|
|
<p class="label" (click)="openFollowerPage()">关注</p>
|
|
|
</ion-col>
|
|
|
<ion-col size="4">
|
|
|
- <p class="count" style="color:black">{{user.followers}}</p>
|
|
|
+ <p class="count" style="color:black">{{userCount.followers}}</p>
|
|
|
<p class="label">粉丝</p>
|
|
|
</ion-col>
|
|
|
<ion-col size="4">
|
|
|
- <p class="count" style="color:black">{{user.likes}}</p>
|
|
|
+ <p class="count" style="color:black">{{userCount.likes}}</p>
|
|
|
<p class="label">获赞</p>
|
|
|
</ion-col>
|
|
|
</ion-row>
|