index.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  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="navTab('/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/coursePj')">
  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. navTab(url){
  76. uni.switchTab({
  77. url: url,
  78. })
  79. },
  80. nav(url){
  81. uni.navigateTo({
  82. url: url,
  83. })
  84. }
  85. }
  86. }
  87. </script>
  88. <style lang="scss">
  89. .center{
  90. height: 100%;
  91. }
  92. .cl {
  93. height: 44px;
  94. }
  95. .carousel-section {
  96. margin: 0 auto;
  97. width: 90%;
  98. height: 280rpx;
  99. border-radius: 20rpx;
  100. image{
  101. border-radius: 20rpx;
  102. height: 100%;
  103. width: 100%;
  104. }
  105. // width: 100%;
  106. // height: 320rpx;
  107. // border-radius: 24rpx;
  108. // .titleNview-placing {
  109. // height: var(--status-bar-height);
  110. // padding-top: 44px;
  111. // box-sizing: content-box;
  112. // }
  113. // .carousel {
  114. // width: 92%;
  115. // height: 240rpx;
  116. // .carousel-item {
  117. // width: 100%;
  118. // height: 100%;
  119. // }
  120. // image {
  121. // width: 100%;
  122. // height: 100%;
  123. // border-radius: $border-radius-sm;
  124. // }
  125. // }
  126. }
  127. .bg1{
  128. width: 70rpx;
  129. height: 60rpx;
  130. }
  131. .bg2{
  132. width: 62rpx;
  133. height: 66rpx;
  134. }
  135. .bg3{
  136. width: 78rpx;
  137. height: 70rpx;
  138. }
  139. .bg4{
  140. width: 60rpx;
  141. height: 62rpx;
  142. }
  143. .navBox {
  144. display: flex;
  145. align-items: center;
  146. .navBox-item {
  147. text-align: center;
  148. margin-top: 100rpx;
  149. flex: 1;
  150. .font {
  151. font-size: 24rpx;
  152. font-family: PingFang SC;
  153. font-weight: 500;
  154. color: #69717B;
  155. }
  156. }
  157. }
  158. .title {
  159. margin-top: 60rpx;
  160. padding-left: 32rpx;
  161. font-size: 36rpx;
  162. font-family: PingFang SC;
  163. font-weight: bold;
  164. color: #24272C;
  165. }
  166. .listBox {
  167. margin-top: 28rpx;
  168. }
  169. .list {
  170. margin-bottom: 50rpx;
  171. padding-left: 34rpx;
  172. padding-right: 40rpx;
  173. display: flex;
  174. .img{
  175. background-color: #FFFFFF;
  176. width: 200rpx;
  177. height: 160rpx;
  178. flex-shrink:0;
  179. image {
  180. width: 100%;
  181. height: 100%;
  182. }
  183. }
  184. .right {
  185. text-align: left;
  186. width: 100%;
  187. padding-left: 20rpx;
  188. display: flex;
  189. flex-direction: column;
  190. justify-content: space-between;
  191. .r-title {
  192. font-size: 32rpx;
  193. font-weight: 400;
  194. color: #333333;
  195. }
  196. .time {
  197. font-size: 26rpx;
  198. font-weight: 400;
  199. color: #999999;
  200. }
  201. }
  202. }
  203. </style>