吉光研途前端代码仓库
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.

190 lines
3.9 KiB

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