me.component.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. <ion-header>
  2. <ion-toolbar>
  3. <ion-title>我的</ion-title>
  4. <!-- 编辑信息按钮. -->
  5. <ion-buttons slot="end">
  6. <ion-button routerLink="/user/info">
  7. <ion-icon slot="start" name="create-outline"></ion-icon>
  8. </ion-button>
  9. <ion-button id="myMenu">
  10. <ion-icon name="menu-outline"></ion-icon>
  11. </ion-button>
  12. <ion-popover trigger="myMenu" triggerAction="click">
  13. <ng-template>
  14. <ion-list>
  15. <ion-item [button]="true">
  16. <ion-icon name="scan-outline" size="small"></ion-icon>
  17. <ion-text>扫一扫</ion-text>
  18. </ion-item>
  19. <ion-item [button]="true">
  20. <ion-icon name="share-social-outline" size="small"></ion-icon>
  21. <ion-text>分享</ion-text>
  22. </ion-item>
  23. <ion-item [button]="true">
  24. <ion-icon name="pulse-outline" size="small"></ion-icon>
  25. <ion-text>客服</ion-text>
  26. </ion-item>
  27. <ion-item [button]="true">
  28. <ion-icon name="settings-outline" size="small"></ion-icon>
  29. <ion-text>设置</ion-text>
  30. </ion-item>
  31. </ion-list>
  32. </ng-template>
  33. </ion-popover>
  34. </ion-buttons>
  35. </ion-toolbar>
  36. </ion-header>
  37. <ion-content color="light">
  38. <!-- 基本信息栏 -->
  39. <ion-card>
  40. <ion-list [inset]="true">
  41. <ion-item lines="full">
  42. <ion-avatar slot="start">
  43. <img alt="头像" src="../../assets/1.jpg" />
  44. </ion-avatar>
  45. <ion-label>
  46. {{currentUser?.get("name") || '昵称'}}
  47. </ion-label>
  48. <ion-buttons slot="end">
  49. <ion-button>
  50. <ion-icon name="heart-outline"></ion-icon>
  51. <ion-note>{{currentUser?.get("like") || '99'}}</ion-note>
  52. </ion-button>
  53. </ion-buttons>
  54. </ion-item>
  55. <ion-item lines="none">
  56. <ion-badge slot="start">{{currentUser?.get("tag") || '标签'}}</ion-badge>
  57. </ion-item>
  58. <ion-item lines="none">
  59. <ion-label color="medium">
  60. {{currentUser?.get("desc") || '介绍一下自己吧'}}
  61. </ion-label>
  62. </ion-item>
  63. </ion-list>
  64. </ion-card>
  65. <!-- 列表 -->
  66. <ion-list [inset]="true">
  67. <ion-button *ngIf="!currentUser?.id" expand="block" routerLink="/user/login">登录</ion-button>
  68. <ion-button *ngIf="currentUser?.id" fill="clear" expand="block" (click)="logout()">登出</ion-button>
  69. </ion-list>
  70. <ion-card class="myList">
  71. <ion-list [inset]="true">
  72. <ion-item button detail="true" routerLink="/lesson/me/userFollow">
  73. <ion-icon name="people-sharp"></ion-icon>
  74. <ion-label>
  75. <ion-note>人物</ion-note>
  76. </ion-label>
  77. </ion-item>
  78. <ion-item button detail="true" routerLink="/lesson/me/userTag">
  79. <ion-icon name="gift"></ion-icon>
  80. <ion-label>
  81. <ion-note>礼物</ion-note>
  82. </ion-label>
  83. </ion-item>
  84. <ion-item button detail="true" routerLink="/lesson/me/userCollection">
  85. <ion-icon name="bulb"></ion-icon>
  86. <ion-label>
  87. <ion-note>想法</ion-note>
  88. </ion-label>
  89. </ion-item>
  90. </ion-list>
  91. </ion-card>
  92. <ion-accordion-group [multiple]="true" [value]="['first', 'third']">
  93. <ion-accordion value="first">
  94. <ion-item slot="header" color="light">
  95. <ion-label class="larger-font">🔔提醒</ion-label>
  96. </ion-item>
  97. <div class="ion-padding" slot="content">
  98. <ion-item>
  99. <ion-avatar slot="start">
  100. <img alt="头像" src="../../assets/2.jpg" />
  101. </ion-avatar>
  102. <ion-label><span class="bold-text">葱葱</span><br>
  103. <span class="small-orange-text">生日</span>🎂<br>
  104. <span class="small-red-text">2024-7-01</span> </ion-label>
  105. </ion-item>
  106. <ion-item>
  107. <ion-avatar slot="start">
  108. <img alt="头像" src="../../assets/3.jpg" />
  109. </ion-avatar>
  110. <ion-label>
  111. <span class="bold-text">影影</span><br>
  112. <span class="small-orange-text">生日</span>🎂<br>
  113. <span class="small-red-text">2024-7-03</span>
  114. </ion-label>
  115. </ion-item>
  116. </div>
  117. </ion-accordion>
  118. <ion-accordion value="second">
  119. <ion-item slot="header" color="light">
  120. <ion-label class="larger-font">📌建议</ion-label>
  121. </ion-item>
  122. <div class="ion-padding" slot="content">
  123. <ion-item>
  124. <ion-avatar slot="start">
  125. <img alt="头像" src="../../assets/2.jpg" />
  126. </ion-avatar>
  127. <ion-label><span class="bold-text">boss刘</span> <br>
  128. <span class="small-orange-text">还没记录任何该人物的往来信息</span><br>
  129. </ion-label>
  130. </ion-item>
  131. <ion-item>
  132. <ion-avatar slot="start">
  133. <img alt="头像" src="../../assets/3.jpg" />
  134. </ion-avatar>
  135. <ion-label>
  136. <span class="bold-text">飞马智哥</span><br>
  137. <span class="small-orange-text">还没添加该人物的关系</span><br>
  138. </ion-label>
  139. </ion-item>
  140. </div>
  141. </ion-accordion>
  142. <ion-accordion value="third">
  143. <ion-item slot="header" color="light">
  144. <ion-label class="larger-font">🎡功能</ion-label>
  145. </ion-item>
  146. <div class="ion-padding" slot="content">Third Content</div>
  147. </ion-accordion>
  148. </ion-accordion-group>
  149. <!-- 详细内容 -->
  150. <!-- 导航 -->
  151. <ion-card>
  152. <ion-toolbar>
  153. <ion-segment value="关注">
  154. <ion-segment-button value="推荐" (click)="cate='推荐'">
  155. <ion-icon name="bookmarks-outline"></ion-icon>
  156. <ion-label>浏览记录</ion-label>
  157. </ion-segment-button>
  158. <ion-segment-button value="关注" (click)="cate='关注'">
  159. <ion-icon name="heart-circle-outline"></ion-icon>
  160. <ion-label>赞过</ion-label>
  161. </ion-segment-button>
  162. <ion-segment-button value="科普" (click)="cate='科普'">
  163. <ion-icon name="pricetag-outline"></ion-icon>
  164. <ion-label>笔记</ion-label>
  165. </ion-segment-button>
  166. </ion-segment>
  167. <ion-buttons slot="end"><ion-button>编辑</ion-button></ion-buttons>
  168. </ion-toolbar>
  169. </ion-card>
  170. <!-- 推荐图 -->
  171. <ng-container *ngIf="cate=='推荐'">
  172. <ion-list [inset]="true" lines="inset">
  173. <ng-container *ngFor="let recommend of myRecommendList">
  174. <ion-item>
  175. <ion-thumbnail slot="end">
  176. <img alt="推荐图" [src]="recommend?.get('img')" />
  177. </ion-thumbnail>
  178. <ion-label>
  179. <h2>{{recommend?.get('title')}}</h2>
  180. <p>{{recommend?.get('content')}}</p>
  181. <ion-note slot="start">{{recommend?.get('createdAt')| date: 'YYYY/MM/dd'||"发布时间"}}</ion-note>
  182. </ion-label>
  183. </ion-item>
  184. </ng-container>
  185. </ion-list>
  186. </ng-container>
  187. <!-- 科普关注 -->
  188. <ng-container *ngIf="cate=='关注'">
  189. <ion-grid>
  190. <ion-row>
  191. <ng-container *ngFor="let attention of myAttentionList">
  192. <ion-col size="6">
  193. <ion-card class="roleCard">
  194. <img alt="关注图" [src]="attention?.get('img')" />
  195. <ion-card-header>
  196. <ion-card-title>
  197. {{attention?.get('name')}}
  198. </ion-card-title>
  199. <ion-card-subtitle>{{attention?.get('createdAt')| date:
  200. 'YYYY/MM/dd'||"发布时间"}}</ion-card-subtitle>
  201. </ion-card-header>
  202. </ion-card>
  203. </ion-col>
  204. </ng-container>
  205. </ion-row>
  206. </ion-grid>
  207. </ng-container>
  208. <!-- 科普笔记 -->
  209. <ng-container *ngIf="cate=='科普'">
  210. <ng-container *ngFor="let science of myScienceList">
  211. <ion-card>
  212. <img alt="科普图" [src]="science?.get('img')" />
  213. <ion-card-header>
  214. <ion-card-title>{{science?.get('name')}}</ion-card-title>
  215. <ion-card-subtitle>{{science?.get('createdAt')| date:
  216. 'YYYY/MM/dd/HH:mm'||"发布时间"}}</ion-card-subtitle>
  217. <div class="metadata-end-wrapper-science">
  218. <ion-buttons slot="end">
  219. <ion-button>
  220. <ion-icon name="eye-outline" size="small"></ion-icon>
  221. <ion-note>{{science?.get('see')}}</ion-note>
  222. </ion-button>
  223. <ion-button>
  224. <ion-icon name="heart-outline" size="small"></ion-icon>
  225. <ion-note>{{science?.get('like')}}</ion-note>
  226. </ion-button>
  227. </ion-buttons>
  228. </div>
  229. </ion-card-header>
  230. <ion-card-content>
  231. <p class="foodContent">{{science?.get('content')}}</p>
  232. </ion-card-content>
  233. </ion-card>
  234. </ng-container>
  235. </ng-container>
  236. </ion-content>