mineCollect.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. <template>
  2. <view>
  3. <statusBar :item="navBarData"></statusBar>
  4. <view class="collectBox">
  5. <view class="collect_length">
  6. <span>共{{ classList.length }}条收藏</span>
  7. </view>
  8. <view class="classBox" @click="gotoWeb(index)" v-for="(item,index) in classList" :key="index">
  9. <view class="classTitle">
  10. <span>{{ item.className }}</span>
  11. <image src="http://43.139.158.220:5007/img/static/mine/Collect_yellow.png" mode="aspectFill"></image>
  12. </view>
  13. <view class="classContent">
  14. <view class="contentLeft">
  15. <view class="constDate">
  16. <span class="manage">类型</span>
  17. <span>|</span>
  18. <span class="c_data">03月27日</span>
  19. <span class="c_time">21:07</span>
  20. </view>
  21. <view class="classIntro">
  22. <span>{{ item.intro }}</span>
  23. </view>
  24. </view>
  25. <view class="contentRight">
  26. <image :src="classList[index].url" mode="aspectFill"></image>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. export default {
  35. data() {
  36. return {
  37. navBarData: {
  38. title: '我的收藏',
  39. btn: 1
  40. },
  41. classList: [{
  42. url: "http://43.139.158.220:5007/img/static/img/Cardimg-1.jpg",
  43. className: "中国共产党与中华民族伟大复兴",
  44. intro: '《习近平总书记指出,历史是最好的教科书,也是最好的营养剂、清醒剂。中国共产党近百年的风雨历程中有信仰、有意志,有传统、有警示,启示当下,烛照未来。'
  45. },
  46. {
  47. url: "http://43.139.158.220:5007/img/static/img/Cardimg-2.jpg",
  48. className: "大国航母与舰载机",
  49. intro: '《大国航母与舰载机》课程是国家级一流本科课程。本课程主要介绍美国航母与舰载机、中国航母与舰载机、俄罗斯航母与舰载机、法国航母与舰载机、英国航母与舰载机、印度航母与舰载机、其他国家轻型航母等内容。内容丰富、真实,语言生动、幽默,文采飞扬,也是BOPPPS模型的经典应用。本门课程是进行军事职业教育的精品课程,也是进行国防军事教育、爱国教育的经典课程。 本课程将带您走进大国航母与舰载机的世界,为您揭开世界各国现役航母神秘的面纱!'
  50. },
  51. {
  52. url: "http://43.139.158.220:5007/img/static/img/Cardimg-4.jpg",
  53. className: "体育与社会",
  54. intro: '体育,快乐之源,与人人相关。本课是一门通识教育课,不拘泥于枯燥的概念、判断与推理,而是从大众兴趣爱好出发,以每讲独立的专题形式,讲授体育与社会、政治、经济、文化、生活、未来等六个方面的关系。有趣,是本课最大的特点;会讲,是七个主讲人过人的本领。爱体育,爱生活,请选《体育与社会》!'
  55. },
  56. {
  57. url: "http://43.139.158.220:5007/img/static/img/Cardimg-5.png",
  58. className: "公共管理学",
  59. intro: '公共管理学是探讨以政府为核心的公共组织对社会公共事务的管理活动,旨在提高公共福祉及管理效率的科学。政府部门、社会组织及公共企业的管理者面对复杂多变的社会环境,面对经济的快速发展和激烈的竞争,必须熟悉现代公共管理观念,了解公共管理的基本理论和方法,清楚公共部门的运行规范及程序。'
  60. },
  61. ],
  62. };
  63. },
  64. methods: {
  65. gotoWeb(index) {
  66. const urls = [
  67. "https://www.xuetangx.com/course/zysy06011001641?channel=i.area.course_list_all",
  68. "https://www.xuetangx.com/course/NAU08091000091/16904996?channel=i.area.course_list_all",
  69. "https://www.xuetangx.com/course/Wuhanty04021002450/16906830?channel=i.area.course_list_all",
  70. "https://www.xuetangx.com/course/NUDT12041000081?channel=i.area.course_list_all",
  71. ];
  72. if (index >= 0 && index < urls.length) {
  73. const url = urls[index];
  74. uni.navigateTo({
  75. url: "/pages/skipone/skipone?url=" + encodeURIComponent(url),
  76. });
  77. }
  78. },
  79. }
  80. }
  81. </script>
  82. <style lang="scss">
  83. .collectBox {
  84. margin: 0 30rpx;
  85. // margin-bottom: 30rpx;
  86. padding-bottom: 50rpx;
  87. .collect_length {
  88. width: 100%;
  89. height: 40rpx;
  90. font-size: 24rpx;
  91. font-weight: 400;
  92. color: #00000099;
  93. display: flex;
  94. align-items: center;
  95. margin-top: 6px;
  96. margin-bottom: 6px;
  97. }
  98. .classBox {
  99. width: 100%;
  100. height: 248rpx;
  101. background-color: #fff;
  102. border-radius: 20rpx;
  103. padding: 0 16rpx;
  104. margin-bottom: 20rpx;
  105. .classTitle {
  106. display: flex;
  107. padding-top: 15px;
  108. justify-content: space-between;
  109. margin-bottom: 6px;
  110. span {
  111. font-size: 32rpx;
  112. font-weight: 500;
  113. }
  114. image {
  115. width: 32rpx;
  116. height: 32rpx;
  117. }
  118. }
  119. .classContent {
  120. width: 100%;
  121. display: flex;
  122. justify-content: space-between;
  123. .contentLeft {
  124. display: flex;
  125. flex-direction: column;
  126. .constDate {
  127. display: flex;
  128. margin-bottom: 6px;
  129. span {
  130. color: #00000066;
  131. font-size: 24rpx;
  132. font-weight: 400;
  133. &.manage {
  134. border: 1px #00B2B6 solid;
  135. font-size: 10px;
  136. display: flex;
  137. white-space: nowrap;
  138. justify-content: center;
  139. align-items: center;
  140. padding: 1px 6px;
  141. border-radius: 3px;
  142. margin-right: 10rpx;
  143. color: #00B2B6;
  144. font-weight: 600;
  145. }
  146. &:nth-child(2) {
  147. color: #E7E7E7;
  148. ;
  149. margin-left: 4px;
  150. }
  151. &:nth-child(3) {
  152. margin-left: 6px;
  153. }
  154. &:nth-child(4) {
  155. margin-left: 6px;
  156. }
  157. }
  158. }
  159. .classIntro {
  160. width: 93%;
  161. span {
  162. color: #00000099;
  163. font-size: 28rpx;
  164. display: -webkit-box;
  165. word-break: break-all;
  166. text-overflow: ellipsis;
  167. overflow: hidden;
  168. -webkit-box-orient: vertical;
  169. -webkit-line-clamp: 2;
  170. /*设置 需要显示的行数*/
  171. line-height: 23px;
  172. }
  173. }
  174. }
  175. .contentRight {
  176. image {
  177. width: 182rpx;
  178. height: 132rpx;
  179. border-radius: 8rpx;
  180. }
  181. }
  182. }
  183. }
  184. }
  185. </style>