me.component.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  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">
  147. <ion-item button detail="true" routerLink="/lesson/me/userFollow">
  148. <ion-avatar slot="start">
  149. <img alt="" src="../../assets/2.jpg" />
  150. </ion-avatar>
  151. <ion-label><span class="bold-text2">记账</span> <br>
  152. <span class="small-orange-text2">金钱往来</span><br>
  153. </ion-label>
  154. </ion-item>
  155. <ion-item>
  156. <ion-avatar slot="start">
  157. <img alt="头像" src="../../assets/3.jpg" />
  158. </ion-avatar>
  159. <ion-label>
  160. <span class="bold-text2">想法</span><br>
  161. <span class="small-orange-text2">看法,想法,畅所欲言</span><br>
  162. </ion-label>
  163. </ion-item>
  164. <ion-item>
  165. <ion-avatar slot="start">
  166. <img alt="头像" src="../../assets/3.jpg" />
  167. </ion-avatar>
  168. <ion-label>
  169. <span class="bold-text2">礼物</span><br>
  170. <span class="small-orange-text2">送出和收到的礼物</span><br>
  171. </ion-label>
  172. </ion-item>
  173. <ion-item>
  174. <ion-avatar slot="start">
  175. <img alt="头像" src="../../assets/3.jpg" />
  176. </ion-avatar>
  177. <ion-label>
  178. <span class="bold-text2">技能&能力探索</span><br>
  179. <span class="small-orange-text2">检索人物的技能和能力</span><br>
  180. </ion-label>
  181. </ion-item>
  182. </div>
  183. </ion-accordion>
  184. </ion-accordion-group>
  185. <!-- 详细内容 -->
  186. <!-- 导航 -->
  187. <ion-card>
  188. <ion-toolbar>
  189. <ion-segment value="关注">
  190. <ion-segment-button value="推荐" (click)="cate='推荐'">
  191. <ion-icon name="bookmarks-outline"></ion-icon>
  192. <ion-label>浏览记录</ion-label>
  193. </ion-segment-button>
  194. <ion-segment-button value="关注" (click)="cate='关注'">
  195. <ion-icon name="heart-circle-outline"></ion-icon>
  196. <ion-label>赞过</ion-label>
  197. </ion-segment-button>
  198. <ion-segment-button value="科普" (click)="cate='科普'">
  199. <ion-icon name="pricetag-outline"></ion-icon>
  200. <ion-label>笔记</ion-label>
  201. </ion-segment-button>
  202. </ion-segment>
  203. <ion-buttons slot="end"><ion-button>编辑</ion-button></ion-buttons>
  204. </ion-toolbar>
  205. <!-- 好 HH-->
  206. </ion-card>
  207. <!-- 推荐图 -->
  208. <ng-container *ngIf="cate=='推荐'">
  209. <ion-list [inset]="true" lines="inset">
  210. <ng-container *ngFor="let recommend of myRecommendList">
  211. <ion-item>
  212. <ion-thumbnail slot="end">
  213. <img alt="推荐图" [src]="recommend?.get('img')" />
  214. </ion-thumbnail>
  215. <ion-label>
  216. <h2>{{recommend?.get('title')}}</h2>
  217. <p>{{recommend?.get('content')}}</p>
  218. <ion-note slot="start">{{recommend?.get('createdAt')| date: 'YYYY/MM/dd'||"发布时间"}}</ion-note>
  219. </ion-label>
  220. </ion-item>
  221. </ng-container>
  222. </ion-list>
  223. </ng-container>
  224. <!-- 科普关注 -->
  225. <ng-container *ngIf="cate=='关注'">
  226. <ion-grid>
  227. <ion-row>
  228. <ng-container *ngFor="let attention of myAttentionList">
  229. <ion-col size="6">
  230. <ion-card class="roleCard">
  231. <img alt="关注图" [src]="attention?.get('img')" />
  232. <ion-card-header>
  233. <ion-card-title>
  234. {{attention?.get('name')}}
  235. </ion-card-title>
  236. <ion-card-subtitle>{{attention?.get('createdAt')| date:
  237. 'YYYY/MM/dd'||"发布时间"}}</ion-card-subtitle>
  238. </ion-card-header>
  239. </ion-card>
  240. </ion-col>
  241. </ng-container>
  242. </ion-row>
  243. </ion-grid>
  244. </ng-container>
  245. <!-- 科普笔记 -->
  246. <ng-container *ngIf="cate=='科普'">
  247. <ng-container *ngFor="let science of myScienceList">
  248. <ion-card>
  249. <img alt="科普图" [src]="science?.get('img')" />
  250. <ion-card-header>
  251. <ion-card-title>{{science?.get('name')}}</ion-card-title>
  252. <ion-card-subtitle>{{science?.get('createdAt')| date:
  253. 'YYYY/MM/dd/HH:mm'||"发布时间"}}</ion-card-subtitle>
  254. <div class="metadata-end-wrapper-science">
  255. <ion-buttons slot="end">
  256. <ion-button>
  257. <ion-icon name="eye-outline" size="small"></ion-icon>
  258. <ion-note>{{science?.get('see')}}</ion-note>
  259. </ion-button>
  260. <ion-button>
  261. <ion-icon name="heart-outline" size="small"></ion-icon>
  262. <ion-note>{{science?.get('like')}}</ion-note>
  263. </ion-button>
  264. </ion-buttons>
  265. </div>
  266. </ion-card-header>
  267. <ion-card-content>
  268. <p class="foodContent">{{science?.get('content')}}</p>
  269. </ion-card-content>
  270. </ion-card>
  271. </ng-container>
  272. </ng-container>
  273. </ion-content>