index.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <template>
  2. <view class="center">
  3. <!-- <view class="cl"></view> -->
  4. <view class="carousel-section">
  5. <image src="../../static/img/index.jpg"></image>
  6. </view>
  7. <view class="navBox">
  8. <view class="navBox-item" @click="nav('/pages/course/course')">
  9. <image class="bg1" src="../../static/img/indexMycourse.png" ></image>
  10. <view class="font">
  11. 我的课程
  12. </view>
  13. </view>
  14. <view class="navBox-item" @click="nav('/pages/course/courseWan')">
  15. <image class="bg2" src="../../static/img/indexKcpj.png" ></image>
  16. <view class="font">
  17. 课程评价
  18. </view>
  19. </view>
  20. <view class="navBox-item" @click="nav('/pages/leave/leaveClass')">
  21. <image class="bg3" src="../../static/img/indexQjsp.png" mode=""></image>
  22. <view class="font">
  23. 请假审批
  24. </view>
  25. </view>
  26. <view class="navBox-item" @click="nav('/pages/problem/problem')">
  27. <image class="bg4" src="../../static/img/indexWtfq.png" mode="aspectFill"></image>
  28. <view class="font">
  29. 问题反馈
  30. </view>
  31. </view>
  32. </view>
  33. <view class="title">教育资讯</view>
  34. <scroll-view scroll-y="true" class="listBox">
  35. <view v-for="(item,index) in dataList" :key="index" class="list" @click="nav('/pages/index/message')">
  36. <view class="img"><image src="../../static/img/test.jpg" mode=""></image></view>
  37. <view class="right">
  38. <view class="r-title">{{ item.title }}</view>
  39. <view class="time">{{ item.time }}</view>
  40. </view>
  41. </view>
  42. </scroll-view>
  43. </view>
  44. </template>
  45. <script>
  46. export default {
  47. data(){
  48. return{
  49. carouselList: [],
  50. dataList: [
  51. {
  52. title: "马云马化腾对决交通场景,一文说清双方布局",
  53. time: "2020-12-26 12:30",
  54. },
  55. {
  56. title: "贾跃亭的一篇采访,让我的朋友圈干起了架",
  57. time: "2020-12-26 12:30",
  58. },
  59. {
  60. title: "世界互联网大会红利释放 互联网产业发展迅速世界互联网",
  61. time: "2020-12-26 12:30",
  62. },
  63. {
  64. title: "学习教育网名师在线答疑",
  65. time: "2020-12-26 12:30",
  66. },
  67. {
  68. title: "学习教育网名师在线答疑",
  69. time: "2020-12-26 12:30",
  70. },
  71. ]
  72. }
  73. },
  74. methods: {
  75. nav(url){
  76. uni.navigateTo({
  77. url: url,
  78. })
  79. }
  80. }
  81. }
  82. </script>
  83. <style lang="scss">
  84. .center{
  85. height: 100%;
  86. }
  87. .cl {
  88. height: 44px;
  89. }
  90. .carousel-section {
  91. margin: 0 auto;
  92. width: 90%;
  93. height: 280rpx;
  94. border-radius: 20rpx;
  95. image{
  96. border-radius: 20rpx;
  97. height: 100%;
  98. width: 100%;
  99. }
  100. // width: 100%;
  101. // height: 320rpx;
  102. // border-radius: 24rpx;
  103. // .titleNview-placing {
  104. // height: var(--status-bar-height);
  105. // padding-top: 44px;
  106. // box-sizing: content-box;
  107. // }
  108. // .carousel {
  109. // width: 92%;
  110. // height: 240rpx;
  111. // .carousel-item {
  112. // width: 100%;
  113. // height: 100%;
  114. // }
  115. // image {
  116. // width: 100%;
  117. // height: 100%;
  118. // border-radius: $border-radius-sm;
  119. // }
  120. // }
  121. }
  122. .bg1{
  123. width: 70rpx;
  124. height: 60rpx;
  125. }
  126. .bg2{
  127. width: 62rpx;
  128. height: 66rpx;
  129. }
  130. .bg3{
  131. width: 78rpx;
  132. height: 70rpx;
  133. }
  134. .bg4{
  135. width: 60rpx;
  136. height: 62rpx;
  137. }
  138. .navBox {
  139. display: flex;
  140. align-items: center;
  141. .navBox-item {
  142. text-align: center;
  143. margin-top: 100rpx;
  144. flex: 1;
  145. .font {
  146. font-size: 24rpx;
  147. font-family: PingFang SC;
  148. font-weight: 500;
  149. color: #69717B;
  150. }
  151. }
  152. }
  153. .title {
  154. margin-top: 60rpx;
  155. padding-left: 32rpx;
  156. font-size: 36rpx;
  157. font-family: PingFang SC;
  158. font-weight: bold;
  159. color: #24272C;
  160. }
  161. .listBox {
  162. margin-top: 28rpx;
  163. }
  164. .list {
  165. margin-bottom: 50rpx;
  166. padding-left: 34rpx;
  167. padding-right: 40rpx;
  168. display: flex;
  169. .img{
  170. background-color: #FFFFFF;
  171. width: 200rpx;
  172. height: 160rpx;
  173. flex-shrink:0;
  174. image {
  175. width: 100%;
  176. height: 100%;
  177. }
  178. }
  179. .right {
  180. text-align: left;
  181. width: 100%;
  182. padding-left: 20rpx;
  183. display: flex;
  184. flex-direction: column;
  185. justify-content: space-between;
  186. .r-title {
  187. font-size: 32rpx;
  188. font-weight: 400;
  189. color: #333333;
  190. }
  191. .time {
  192. font-size: 26rpx;
  193. font-weight: 400;
  194. color: #999999;
  195. }
  196. }
  197. }
  198. </style>