page-lesson-detail.component.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <div class="ion-page">
  2. <ion-header>
  3. <ion-toolbar>
  4. <ion-buttons slot="start">
  5. <ion-button routerLink="/cook/lesson">&lt;返回</ion-button>
  6. </ion-buttons>
  7. <ion-title>课程</ion-title>
  8. </ion-toolbar>
  9. </ion-header>
  10. <ion-content>
  11. <ion-img [src]="course?.get('courseImg')" alt="图片加载不出来"></ion-img>
  12. <ion-item>
  13. <ion-avatar slot="start">
  14. <img alt="Silhouette of a person's head"
  15. [src]="course?.get('courseAuthor')?.get('avatar')||'https://ionicframework.com/docs/img/demos/avatar.svg'" />
  16. </ion-avatar>
  17. <ion-label>{{course?.get('courseAuthor')?.get('name')}}</ion-label>
  18. <ion-button fill="outline" color="danger">关注</ion-button>
  19. <!-- <div>{{course?.get('courseStore') | tok}}人收藏</div> -->
  20. </ion-item>
  21. <ion-card>
  22. <ion-card-header>
  23. <ion-card-title>{{course?.get('courseName')}}</ion-card-title>
  24. <ion-card-subtitle class="custom-subtitle">{{course?.get('courseScore')}}<span
  25. style="color: rgb(196, 194, 194); font-size: 10px;">
  26. 评分</span></ion-card-subtitle>
  27. </ion-card-header>
  28. <ion-card-content>
  29. {{course?.get('courseDescript')}}
  30. </ion-card-content>
  31. <ion-button fill="clear">收藏</ion-button>
  32. <ion-button fill="clear">购买</ion-button>
  33. </ion-card>
  34. <!-- <ion-list *ngIf="lesson.videocourse?.length"> -->
  35. <ion-list>
  36. <ion-list-header>
  37. <ion-label>视频</ion-label>
  38. </ion-list-header>
  39. <!-- <ion-item *ngFor="let video of lesson.videocourse"> -->
  40. <ion-item>
  41. <svg class="icon"
  42. style="width: 4em;height: 2em;vertical-align: middle;fill: currentColor;overflow: hidden;"
  43. viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3934">
  44. <path
  45. d="M607.9232 227.84a144.4864 144.4864 0 0 1 143.744 137.728l0.0768 3.2768 52.48-36.6592a61.2352 61.2352 0 0 1 76.8256 8.2688l3.0976 3.328 2.7648 3.4816c5.1712 8.6016 8.8832 17.9968 11.0336 28.032l1.1008 6.0672v276.5824a58.8032 58.8032 0 0 1-58.9056 58.7008c-10.496 0-20.7616-2.7136-29.8496-7.8336l-4.4288-2.7648-54.528-37.0176-0.1792 1.5872a144.3584 144.3584 0 0 1-131.3792 125.0816l-5.9904 0.3584-5.888 0.1024H268.8512a144.4864 144.4864 0 0 1-143.744-137.728l-0.1536-5.632V371.1744a144.4864 144.4864 0 0 1 138.2656-143.2064l5.632-0.128h339.072z m0 61.2608H268.8256a82.56 82.56 0 0 0-82.2528 77.44l-0.1536 4.6592v281.5744A82.56 82.56 0 0 0 264.192 734.72l4.6592 0.1536h338.2016a82.56 82.56 0 0 0 82.2528-77.44l0.1792-4.6592 0.8192-0.8704V371.2a82.56 82.56 0 0 0-77.7472-81.9456l-4.6592-0.1536z m227.0976 96.9728l-84.0448 57.1904-1.1008 149.5808 85.1456 59.2384V386.0736z"
  46. fill="#FB553C" p-id="3935"></path>
  47. <path
  48. d="M529.0752 534.1184l-128.2816 74.624a25.6 25.6 0 0 1-38.4768-22.1184v-149.248a25.6 25.6 0 0 1 38.4768-22.1184l128.256 74.624a25.6 25.6 0 0 1 0 44.2368z"
  49. fill="#FB553C" p-id="3936"></path>
  50. </svg>
  51. <!-- <ion-label>{{video}}</ion-label> -->
  52. </ion-item>
  53. </ion-list>
  54. <!-- <ion-list *ngIf="lesson.test?.length">
  55. <ion-item *ngFor="let questionAndAnswer of lesson.test; let i = index">
  56. <div>
  57. <h2>{{ questionAndAnswer[0] }}</h2>
  58. </div>
  59. <div>
  60. <img [src]="questionAndAnswer[1]" alt="Answer">
  61. </div>
  62. </ion-item>
  63. </ion-list> -->
  64. <div>
  65. <h5 style="padding-left: 12px;">留下你的评论{{commentCount}}</h5>
  66. <!-- <ion-item lines="none">
  67. <ion-avatar slot="start">
  68. <img alt="Silhouette of a person's head"
  69. src="https://ionicframework.com/docs/img/demos/avatar.svg" />
  70. </ion-avatar>
  71. <ion-label><input type="text" class="input-box" placeholder="留下评论,分享你的想法!"></ion-label>
  72. </ion-item> -->
  73. <ng-container *ngIf="commentList">
  74. <ng-container *ngFor="let comment of commentList; let i = index">
  75. <div class="commentbox">
  76. <ion-item lines="none">
  77. <ion-avatar slot="start">
  78. <img alt="Silhouette of a person's head"
  79. [src]="comment.get('user').get('avatar')||'https://ionicframework.com/docs/img/demos/avatar.svg'" />
  80. </ion-avatar>
  81. <ion-label>{{ comment.get("user").get("name") }}</ion-label>
  82. <ion-icon name="heart-outline"></ion-icon>
  83. <div class="likes">27</div>
  84. </ion-item>
  85. <p style="font-size: 15px;">{{comment?.get("commentContent")}}</p>
  86. <p style="color: grey;">{{comment?.get("createdAt")|date:'short'}}</p>
  87. </div>
  88. </ng-container>
  89. </ng-container>
  90. </div>
  91. <div class="footer">
  92. <div class="send-container">
  93. <input type="text" [(ngModel)]="commentContent" class="message-input" placeholder="输入消息...">
  94. <button class="send-button" (click)="saveComment()">发送</button>
  95. </div>
  96. </div>
  97. <div class="navfooter"></div>
  98. </ion-content>
  99. </div>