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

125 lines
2.5 KiB

1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
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('other_service')">
  12. <image class="list-item-bg" :src="configList.config_image_service" mode="scaleToFill"></image>
  13. <!-- <view class="list-item-fg">
  14. <view class="title">其他服务</view>
  15. <view class="desc">Other services</view>
  16. </view> -->
  17. </view>
  18. </view>
  19. <tabber select="center" />
  20. </view>
  21. </template>
  22. <script>
  23. import tabber from '@/components/base/tabbar.vue'
  24. export default {
  25. components: {
  26. tabber,
  27. },
  28. data() {
  29. return {
  30. bannerList: [],
  31. }
  32. },
  33. onLoad() {
  34. this.fetchBanner()
  35. },
  36. methods: {
  37. // 获取轮播图
  38. async fetchBanner() {
  39. try {
  40. this.bannerList = (await this.$fetch('queryBannerList', { type: '3' }))?.records // type:0-首页 1-案例 2-服务 3-其他
  41. } catch (err) {
  42. }
  43. },
  44. jumpToDetail(paramCode) {
  45. uni.navigateTo({
  46. url: `/pages_order/serve/index?paramCode=${paramCode}`
  47. })
  48. },
  49. },
  50. }
  51. </script>
  52. <style scoped lang="scss">
  53. .bg {
  54. width: 100%;
  55. height: 264rpx;
  56. .img {
  57. width: 100%;
  58. height: 100%;
  59. }
  60. }
  61. .swiper {
  62. margin: 0 18rpx 15rpx 18rpx;
  63. border-radius: 25rpx;
  64. overflow: hidden;
  65. /deep/ .uv-swiper-indicator__wrapper__dot {
  66. width: 15rpx;
  67. height: 15rpx;
  68. }
  69. /deep/ .uv-swiper-indicator__wrapper__dot--active {
  70. width: 15rpx;
  71. }
  72. }
  73. .list {
  74. margin: 0 18rpx;
  75. &-item {
  76. position: relative;
  77. font-size: 0;
  78. border-radius: 25rpx;
  79. overflow: hidden;
  80. box-shadow: 0rpx 3rpx 6rpx 0rpx rgba(0,0,0,0.16);
  81. & + & {
  82. margin-top: 19rpx;
  83. }
  84. &-bg {
  85. $w: calc(100vw - 18rpx*2);
  86. width: $w;
  87. height: calc(#{$w} * 179 / 714);
  88. }
  89. &-fg {
  90. position: absolute;
  91. top: 70rpx;
  92. left: 43rpx;
  93. .title {
  94. font-size: 32rpx;
  95. font-weight: 700;
  96. color: #000000;
  97. }
  98. .desc {
  99. margin-top: 2rpx;
  100. font-size: 28rpx;
  101. color: #8A8784;
  102. }
  103. }
  104. }
  105. }
  106. </style>