吉光研途前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

187 lines
3.8 KiB

1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
  1. <template>
  2. <view class="page__view">
  3. <view class="bg">
  4. <image class="img" :src="configList.config_image_page_header" mode="scaleToFill"></image>
  5. </view>
  6. <!-- 轮播图 -->
  7. <view class="section swiper">
  8. <uv-swiper :list="bannerList" keyName="image" indicator indicatorMode="dot" indicatorActiveColor="#4883F9" indicatorInactiveColor="#FFFFFF" height="424rpx"></uv-swiper>
  9. </view>
  10. <view class="list">
  11. <view class="list-item" @click="jumpToDetail('academic_advising')">
  12. <image class="list-item-bg" :src="configList.config_image_advising" mode="scaleToFill"></image>
  13. <!-- <view class="list-item-fg">
  14. <view class="title">学术辅导</view>
  15. <view class="desc">Academic Advising</view>
  16. </view> -->
  17. </view>
  18. <view class="list-item" @click="jumpToDetail('thesis_submission')">
  19. <image class="list-item-bg" :src="configList.config_image_submission" mode="scaleToFill"></image>
  20. <!-- <view class="list-item-fg">
  21. <view class="title">论文投递</view>
  22. <view class="desc">Paper submission</view>
  23. </view> -->
  24. </view>
  25. </view>
  26. <tabber select="serve" />
  27. </view>
  28. </template>
  29. <script>
  30. import tabber from '@/components/base/tabbar.vue'
  31. export default {
  32. components: {
  33. tabber,
  34. },
  35. data() {
  36. return {
  37. bannerList: [],
  38. }
  39. },
  40. onLoad() {
  41. this.fetchBanner()
  42. },
  43. methods: {
  44. // 获取轮播图
  45. async fetchBanner() {
  46. try {
  47. this.bannerList = (await this.$fetch('queryBannerList', { type: '2' }))?.records // type:0-首页 1-案例 2-服务 3-其他
  48. } catch (err) {
  49. }
  50. },
  51. jumpToDetail(paramCode) {
  52. uni.navigateTo({
  53. url: `/pages_order/serve/index?paramCode=${paramCode}`
  54. })
  55. },
  56. },
  57. }
  58. </script>
  59. <style scoped lang="scss">
  60. .bg {
  61. width: 100%;
  62. height: 264rpx;
  63. .img {
  64. width: 100%;
  65. height: 100%;
  66. }
  67. }
  68. .main {
  69. position: absolute;
  70. top: 0;
  71. left: 0;
  72. width: 100%;
  73. padding: 156rpx 0 182rpx 0;
  74. }
  75. .header {
  76. .title {
  77. margin-left: 25rpx;
  78. position: relative;
  79. padding: 51rpx 0 6rpx 42rpx;
  80. &-line {
  81. width: 151rpx;
  82. height: 11rpx;
  83. background: linear-gradient(76deg,#ffffff 2%, #4883f9 88%);
  84. border-radius: 6rpx;
  85. }
  86. &-text {
  87. position: absolute;
  88. top: 0;
  89. left: 0;
  90. font-size: 46rpx;
  91. font-weight: 700;
  92. color: #FFFFFF;
  93. }
  94. }
  95. .desc {
  96. font-size: 30rpx;
  97. font-weight: 700;
  98. color: #FFFFFF;
  99. margin: 14rpx 28rpx 32rpx 28rpx;
  100. }
  101. }
  102. .swiper {
  103. margin: 0 18rpx 15rpx 18rpx;
  104. border-radius: 25rpx;
  105. overflow: hidden;
  106. /deep/ .uv-swiper-indicator__wrapper__dot {
  107. width: 15rpx;
  108. height: 15rpx;
  109. }
  110. /deep/ .uv-swiper-indicator__wrapper__dot--active {
  111. width: 15rpx;
  112. }
  113. }
  114. .list {
  115. margin: 0 18rpx;
  116. &-item {
  117. position: relative;
  118. font-size: 0;
  119. border-radius: 25rpx;
  120. overflow: hidden;
  121. box-shadow: 0rpx 3rpx 6rpx 0rpx rgba(0,0,0,0.16);
  122. & + & {
  123. margin-top: 32rpx;
  124. }
  125. &-bg {
  126. $w: calc(100vw - 18rpx*2);
  127. width: $w;
  128. height: calc(#{$w} * 179 / 714);
  129. }
  130. &-fg {
  131. position: absolute;
  132. top: 38rpx;
  133. left: 51rpx;
  134. .title {
  135. font-size: 32rpx;
  136. font-weight: 700;
  137. color: #E67722;
  138. }
  139. .desc {
  140. margin-top: 2rpx;
  141. font-size: 28rpx;
  142. color: #BEA898;
  143. }
  144. }
  145. &:nth-child(2n) {
  146. .list-item-fg {
  147. left: 200rpx;
  148. .title {
  149. color: #052464;
  150. }
  151. .desc {
  152. color: #A8BADE;
  153. }
  154. }
  155. }
  156. }
  157. }
  158. </style>