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

232 lines
4.9 KiB

4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
3 months ago
4 months ago
3 months ago
3 months ago
4 months ago
3 months ago
4 months ago
4 months ago
3 months ago
4 months ago
3 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
4 months ago
  1. <template>
  2. <view class="page__view">
  3. <view class="bg">
  4. <image class="img" src="@/static/image/bg-index.png" mode="widthFix"></image>
  5. <image class="bg-logo" src="@/static/image/bg-icon.png" mode="widthFix"></image>
  6. </view>
  7. <view class="main">
  8. <view class="flex section header">
  9. <view>
  10. <view class="title">{{ configList.page_serve_title }}</view>
  11. <view class="desc">{{ configList.page_serve_desc }}</view>
  12. </view>
  13. </view>
  14. <!-- 搜索栏 -->
  15. <view class="section search">
  16. <uv-search v-model="keyword" :showAction="false" placeholder="输入关键词搜索" placeholderColor="#B2B2B2" bgColor="#FFFFFF" @custom="search" @search="search">
  17. <template #prefix>
  18. <view class="flex search-icon">
  19. <image class="img" src="@/static/image/icon-search.png" mode="widthFix"></image>
  20. </view>
  21. </template>
  22. </uv-search>
  23. </view>
  24. <!-- 轮播图 -->
  25. <!-- <view class="section swiper">
  26. <uv-swiper :list="bannerList" keyName="image" indicator indicatorMode="dot" indicatorActiveColor="#FFFFFF" indicatorInactiveColor="#6851A7" height="424rpx"></uv-swiper>
  27. </view> -->
  28. <!-- <view class="list">
  29. <view class="list-item"
  30. v-for="item in list"
  31. :key="item.id"
  32. @click="jumpToSecondCategory(item.id, item.title)"
  33. >
  34. <image class="list-item-bg" :src="item.image" mode="scaleToFill"></image>
  35. </view>
  36. </view> -->
  37. <view class="list">
  38. <view class="list-item" v-for="item in list" :key="item.id" >
  39. <serveModuleCard :data="item"></serveModuleCard>
  40. </view>
  41. </view>
  42. <tabber select="serve" />
  43. </view>
  44. </view>
  45. </template>
  46. <script>
  47. import mixinsList from '@/mixins/list.js'
  48. import tabber from '@/components/base/tabbar.vue'
  49. import serveModuleCard from '@/components/serve/serveModuleCard.vue'
  50. export default {
  51. mixins: [mixinsList],
  52. components: {
  53. serveModuleCard,
  54. tabber,
  55. },
  56. data() {
  57. return {
  58. keyword: '',
  59. queryParams: {
  60. pageNo: 1,
  61. pageSize: 10,
  62. pid: '0',
  63. },
  64. mixinsListApi: 'queryCategoryServiceModuleList',
  65. bannerList: [],
  66. firstCategoryList: [],
  67. }
  68. },
  69. onLoad() {
  70. // this.fetchBanner()
  71. this.getData()
  72. },
  73. methods: {
  74. // 获取轮播图
  75. async fetchBanner() {
  76. try {
  77. this.bannerList = (await this.$fetch('queryBannerList', { type: '2' }))?.records // type:0-首页 1-案例 2-服务 3-其他
  78. } catch (err) {
  79. }
  80. },
  81. search() {
  82. // todo
  83. },
  84. jumpToSecondCategory(pid, title) {
  85. uni.navigateTo({
  86. url: `/pages_order/serve/category?pid=${pid}&title=${title}`
  87. })
  88. },
  89. },
  90. }
  91. </script>
  92. <style scoped lang="scss">
  93. .page__view {
  94. /deep/ .tabbar-box {
  95. height: 0;
  96. padding: 0;
  97. }
  98. }
  99. .header {
  100. margin-bottom: 32rpx;
  101. padding-top: calc(var(--status-bar-height) + 40rpx);
  102. justify-content: space-between;
  103. .title {
  104. font-size: 44rpx;
  105. font-weight: 600;
  106. color: #6851A7;
  107. }
  108. .desc {
  109. font-size: 18rpx;
  110. font-weight: 500;
  111. color: #808080;
  112. }
  113. .icon {
  114. // margin-top: 16rpx;
  115. width: 62rpx;
  116. height: 62rpx;
  117. border: 2rpx solid #A3A2C5;
  118. border-radius: 50%;
  119. overflow: hidden;
  120. .img {
  121. width: 50rpx;
  122. height: auto;
  123. }
  124. }
  125. }
  126. .bg {
  127. width: 100vw;
  128. height: auto;
  129. .img {
  130. width: 100%;
  131. height: auto;
  132. }
  133. &-logo {
  134. position: absolute;
  135. top: 0;
  136. right: 0;
  137. width: 342rpx;
  138. height: auto;
  139. opacity: 0.3;
  140. }
  141. }
  142. .main {
  143. position: absolute;
  144. top: 0;
  145. left: 0;
  146. width: 100vw;
  147. padding-bottom: 182rpx;
  148. box-sizing: border-box;
  149. }
  150. .section {
  151. margin: 0 38rpx 24rpx 38rpx;
  152. }
  153. .search {
  154. width: calc(100% - 38rpx * 2);
  155. height: 48rpx;
  156. background-color: #FFFFFF;
  157. border-radius: 37rpx;
  158. box-sizing: border-box;
  159. display: flex;
  160. align-items: center;
  161. overflow: hidden;
  162. box-shadow: 2rpx 2rpx 9rpx 0 rgba($color: #C5C5C5, $alpha: 0.75);
  163. /deep/ .uv-search__content {
  164. padding: 0;
  165. border: none;
  166. }
  167. /deep/ .uv-search__content__input {
  168. margin-left: 18rpx;
  169. }
  170. &-icon {
  171. padding: 18rpx 10rpx 18rpx 18rpx;
  172. background: rgba($color: #E8DBF3, $alpha: 0.8);
  173. .img {
  174. width: 30rpx;
  175. height: auto;
  176. }
  177. }
  178. }
  179. .swiper {
  180. border-radius: 10rpx;
  181. overflow: hidden;
  182. /deep/ .uv-swiper-indicator__wrapper__dot {
  183. width: 25rpx;
  184. height: 5rpx;
  185. border-radius: 4rpx;
  186. margin: 0 4rpx;
  187. }
  188. /deep/ .uv-swiper-indicator__wrapper__dot--active {
  189. width: 25rpx;
  190. }
  191. }
  192. .list {
  193. padding: 0 28rpx 0 32rpx;
  194. &-item {
  195. & + & {
  196. margin-top: 26rpx;
  197. }
  198. }
  199. }
  200. </style>