index.vue 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  1. <template>
  2. <view class="study">
  3. <view class="top-box">
  4. <view class="search-box">
  5. <input class="search" type="text" :value="search" />
  6. <image class="icon" src="../static/search.png" mode=""></image>
  7. <button class="btn" type="default">搜索</button>
  8. </view>
  9. <image class="banner" src="../static/yanxue.png" mode=""></image>
  10. <view class="type-box">
  11. <view class="type-item" @click="jump('./inspect')">
  12. <image class="icon" src="../static/yanxue1.png" mode=""></image>
  13. <view class="sub-title">
  14. 虚拟考察
  15. </view>
  16. </view>
  17. <view class="type-item" @click="jump('./route')">
  18. <image class="icon" src="../static/yanxue2.png" mode=""></image>
  19. <view class="sub-title">
  20. 个性路径
  21. </view>
  22. </view>
  23. <view class="type-item" @click="jump('./schedule')">
  24. <image class="icon" src="../static/yanxue3.png" mode=""></image>
  25. <view class="sub-title">
  26. 学习进度
  27. </view>
  28. </view>
  29. <view class="type-item" @click="jump('./community')">
  30. <image class="icon" src="../static/yanxue4.png" mode=""></image>
  31. <view class="sub-title">
  32. 互动社区
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. <view class="content">
  38. <view class="title-box">
  39. <view class="title">
  40. 热门课程
  41. </view>
  42. <view class="more">
  43. 查看更多
  44. <u-icon name="arrow-right" size="24rpx" color="#121212"></u-icon>
  45. </view>
  46. </view>
  47. <view class="hot-list">
  48. <view class="item">
  49. <!-- <image class="icon" src="https://alipic.lanhuapp.com/XDSlicePNGMAX04b8341240661e82881f895f65bedb357bfc0052be13668c09975dcf269ac570.png" mode=""></image> -->
  50. <zs-img src="https://gd-hbimg.huaban.com/89311fee7c0633833d6f55bc6f987ecf2b4d580598985-EEpwsJ" width="100%" height="164rpx" radius="half"></zs-img>
  51. <view class="title">
  52. 少儿编程培训基础班
  53. </view>
  54. <view class="author-info">
  55. <image class="head" src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2F1e0466ff-3a60-4544-9630-318439662daf%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1695371853&t=0d9cf33ea0b96e7e0d2778264668a623" mode=""></image>
  56. <view class="name">
  57. 李老师
  58. </view>
  59. </view>
  60. </view>
  61. <view class="item">
  62. <!-- <image class="icon" src="https://alipic.lanhuapp.com/XDSlicePNGMAXe07fd43e559405e57406bd95070f7f221dc99bba9ab4c31834bb2bbe1eed8c53.png" mode=""></image> -->
  63. <zs-img src="https://gd-hbimg.huaban.com/15f6b3f398b496225424ea69676e9484bb7935283de93-NWPARD" width="100%" height="164rpx"></zs-img>
  64. <view class="title">
  65. 少儿编程培训基础班
  66. </view>
  67. <view class="author-info">
  68. <image class="head" src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2F1e0466ff-3a60-4544-9630-318439662daf%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1695371853&t=0d9cf33ea0b96e7e0d2778264668a623" mode=""></image>
  69. <view class="name">
  70. 李老师
  71. </view>
  72. </view>
  73. </view>
  74. </view>
  75. <view class="title-box">
  76. <view class="title">
  77. 热门课程
  78. </view>
  79. <view class="more">
  80. 查看更多
  81. <u-icon name="arrow-right" size="24rpx" color="#121212"></u-icon>
  82. </view>
  83. </view>
  84. <view class="list">
  85. <view class="item" v-for="(item,index) in list" :key="index">
  86. <zs-img :src="item.img" width="164rpx" height="164rpx"></zs-img>
  87. <view class="info">
  88. <view class="title">
  89. 少儿编程培训基础班
  90. </view>
  91. <view class="types">
  92. AI培训 | 编程
  93. </view>
  94. <view class="author-info">
  95. <image class="head" :src="item.head" mode=""></image>
  96. <view class="name">
  97. 李老师
  98. </view>
  99. </view>
  100. </view>
  101. <image class="play" src="../static/play.png" mode=""></image>
  102. </view>
  103. </view>
  104. </view>
  105. </view>
  106. </template>
  107. <script>
  108. export default {
  109. data() {
  110. return {
  111. search: '',
  112. list:[
  113. {
  114. img:'https://gd-hbimg.huaban.com/5519accd3d95a5f992bd2f485fa5ca04c9af67be56754-gus75N_fw658webp',
  115. head:'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2F1e0466ff-3a60-4544-9630-318439662daf%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1695371853&t=0d9cf33ea0b96e7e0d2778264668a623'
  116. },
  117. {
  118. img:'https://gd-hbimg.huaban.com/f6c02f600c1de991ba0e457c263f70d076c61cb535e9c-Yi5djy',
  119. head:'https://gd-hbimg.huaban.com/54c90225377e9ddb9aa260a735f429edf15309361cb73-QCueku_fw658webp'
  120. },
  121. {
  122. img:'https://gd-hbimg.huaban.com/e893b5ded9bcba900a5dde2dabe09d1cf8b4fa43a31c4-usH1ui_fw658webp',
  123. head:'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2F1e0466ff-3a60-4544-9630-318439662daf%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1695371853&t=0d9cf33ea0b96e7e0d2778264668a623'
  124. }
  125. ]
  126. }
  127. },
  128. methods: {
  129. jump(url) {
  130. uni.navigateTo({
  131. url
  132. })
  133. }
  134. },
  135. }
  136. </script>
  137. <style lang="scss" >
  138. .study {
  139. background: #F9F9F9;
  140. padding-bottom: 100rpx;
  141. .top-box{
  142. background: #fff;
  143. padding: 0 30rpx;
  144. .search-box {
  145. position: relative;
  146. height: 80rpx;
  147. background: #FFFFFF;
  148. border-radius: 40rpx 40rpx 40rpx 40rpx;
  149. margin-bottom: 24rpx;
  150. background: #F9F9F9;
  151. .icon {
  152. width: 37rpx;
  153. height: 37rpx;
  154. position: absolute;
  155. top: 50%;
  156. left: 36rpx;
  157. transform: translateY(-50%);
  158. }
  159. .search {
  160. line-height: 80rpx;
  161. height: 80rpx;
  162. padding-left: 100rpx;
  163. padding-right: 130rpx;
  164. }
  165. .btn {
  166. position: absolute;
  167. top: 8rpx;
  168. right: 10rpx;
  169. width: 108rpx;
  170. height: 64rpx;
  171. line-height: 64rpx;
  172. background: linear-gradient(180deg, #9DC1FF 0%, #1C92FD 100%);
  173. color: #fff;
  174. font-size: 28rpx;
  175. border-radius: 32rpx;
  176. padding: 0;
  177. }
  178. }
  179. .banner{
  180. width: 100%;
  181. height: 240rpx;
  182. }
  183. .type-box{
  184. display: flex;
  185. .type-item{
  186. flex: 1;
  187. text-align: center;
  188. padding: 30rpx 0;
  189. .icon{
  190. width: 64rpx;
  191. height: 64rpx;
  192. }
  193. .sub-title{
  194. font-size: 24rpx;
  195. font-weight: 400;
  196. color: #121212;
  197. margin-top: 16rpx;
  198. }
  199. }
  200. }
  201. }
  202. .content{
  203. padding: 0 30rpx;
  204. .title-box{
  205. display: flex;
  206. align-items: center;
  207. justify-content: space-between;
  208. margin: 30rpx 0;
  209. .title{
  210. font-size: 32rpx;
  211. font-weight: bold;
  212. color: #0F0F0F;
  213. position: relative;
  214. z-index: 1;
  215. &::before{
  216. content: '';
  217. position: absolute;
  218. top: 50%;
  219. left: -10rpx;
  220. z-index:0;
  221. transform: translateY(-50%);
  222. width: 52rpx;
  223. height: 52rpx;
  224. border-radius: 50%;
  225. background: linear-gradient(180deg, #9DC1FF 0%, #1C92FD 100%);
  226. opacity: .6;
  227. }
  228. }
  229. .more{
  230. font-size: 24rpx;
  231. font-weight: 400;
  232. color: #121212;
  233. display: flex;
  234. }
  235. }
  236. .hot-list{
  237. display: flex;
  238. justify-content: space-between;
  239. .item{
  240. width: 332rpx;
  241. height: 302rpx;
  242. background: #FFFFFF;
  243. border-radius: 16rpx;
  244. .icon{
  245. width: 100%;
  246. height: 164rpx;
  247. }
  248. .title{
  249. font-size: 28rpx;
  250. font-weight: bold;
  251. color: #0F0F0F;
  252. padding: 20rpx;
  253. }
  254. .author-info{
  255. display: flex;
  256. align-items: center;
  257. .head{
  258. width: 48rpx;
  259. height: 48rpx;
  260. border-radius: 50%;
  261. background: #999;
  262. margin-left: 20rpx;
  263. }
  264. .name{
  265. font-size: 24rpx;
  266. font-weight: 400;
  267. color: #999999;
  268. margin-left: 10rpx;
  269. }
  270. }
  271. }
  272. }
  273. .list{
  274. .item{
  275. background: #fff;
  276. padding: 20rpx;
  277. border-radius: 16rpx;
  278. display: flex;
  279. margin-bottom: 20rpx;
  280. .icon{
  281. width: 164rpx;
  282. height: 164rpx;
  283. }
  284. .info{
  285. margin-left: 20rpx;
  286. display: flex;
  287. flex-direction: column;
  288. justify-content: space-between;
  289. flex: 1;
  290. .title{
  291. font-size: 28rpx;
  292. font-weight: bold;
  293. color: #0F0F0F;
  294. }
  295. .types{
  296. font-size: 24rpx;
  297. font-weight: 400;
  298. color: #999999;
  299. }
  300. .author-info{
  301. display: flex;
  302. align-items: center;
  303. .head{
  304. width: 48rpx;
  305. height: 48rpx;
  306. border-radius: 50%;
  307. background: #999;
  308. }
  309. .name{
  310. font-size: 24rpx;
  311. font-weight: 400;
  312. color: #999999;
  313. margin-left: 10rpx;
  314. }
  315. }
  316. }
  317. .play{
  318. width: 40rpx;
  319. height: 40rpx;
  320. align-self: center;
  321. }
  322. }
  323. }
  324. }
  325. }
  326. </style>