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

172 lines
3.4 KiB

3 days ago
3 days ago
3 days ago
3 days ago
3 days ago
3 days ago
3 days ago
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('other_service')">
  21. <image class="list-item-bg" src="@/static/image/bg-other-serve.png" mode="widthFix"></image>
  22. <view class="list-item-fg">
  23. <view class="title">其他服务</view>
  24. <view class="desc">Other services</view>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. <tabber select="center" />
  30. </view>
  31. </template>
  32. <script>
  33. import tabber from '@/components/base/tabbar.vue'
  34. export default {
  35. components: {
  36. tabber,
  37. },
  38. data() {
  39. return {
  40. bannerList: [],
  41. }
  42. },
  43. onLoad() {
  44. // todo: check
  45. this.$fetch('querySummaryList')
  46. this.fetchBanner()
  47. },
  48. methods: {
  49. // 获取轮播图
  50. async fetchBanner() {
  51. try {
  52. this.bannerList = (await this.$fetch('queryBannerList', { type: '3' }))?.records // type:0-首页 1-案例 2-服务 3-其他
  53. } catch (err) {
  54. }
  55. },
  56. jumpToDetail(paramCode) {
  57. uni.navigateTo({
  58. url: `/pages_order/serve/index?paramCode=${paramCode}`
  59. })
  60. },
  61. },
  62. }
  63. </script>
  64. <style scoped lang="scss">
  65. .bg {
  66. width: 100%;
  67. height: 438rpx;
  68. background-image: linear-gradient(#4883F9, #4883F9, #4883F9, #FCFDFF);
  69. }
  70. .main {
  71. position: absolute;
  72. top: 0;
  73. left: 0;
  74. width: 100%;
  75. padding: 156rpx 0 182rpx 0;
  76. }
  77. .header {
  78. .title {
  79. margin-left: 25rpx;
  80. position: relative;
  81. padding: 51rpx 0 6rpx 42rpx;
  82. &-line {
  83. width: 151rpx;
  84. height: 11rpx;
  85. background: linear-gradient(76deg,#ffffff 2%, #4883f9 88%);
  86. border-radius: 6rpx;
  87. }
  88. &-text {
  89. position: absolute;
  90. top: 0;
  91. left: 0;
  92. font-size: 46rpx;
  93. font-weight: 700;
  94. color: #FFFFFF;
  95. }
  96. }
  97. .desc {
  98. font-size: 30rpx;
  99. font-weight: 700;
  100. color: #FFFFFF;
  101. margin: 14rpx 28rpx 32rpx 28rpx;
  102. }
  103. }
  104. .swiper {
  105. margin: 0 18rpx;
  106. border-radius: 25rpx;
  107. overflow: hidden;
  108. /deep/ .uv-swiper-indicator__wrapper__dot {
  109. width: 15rpx;
  110. height: 15rpx;
  111. }
  112. /deep/ .uv-swiper-indicator__wrapper__dot--active {
  113. width: 15rpx;
  114. }
  115. }
  116. .list {
  117. padding: 0 12rpx;
  118. &-item {
  119. position: relative;
  120. & + & {
  121. margin-top: 19rpx;
  122. }
  123. &-bg {
  124. width: 100%;
  125. height: auto;
  126. }
  127. &-fg {
  128. position: absolute;
  129. top: 70rpx;
  130. left: 43rpx;
  131. .title {
  132. font-size: 32rpx;
  133. font-weight: 700;
  134. color: #000000;
  135. }
  136. .desc {
  137. margin-top: 2rpx;
  138. font-size: 28rpx;
  139. color: #8A8784;
  140. }
  141. }
  142. }
  143. }
  144. </style>