index.vue 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. <template>
  2. <div class="findServices">
  3. <header>
  4. <div class="title">找服务</div>
  5. <div class="service-list">
  6. <div class="service-item">
  7. <img src="../../../static/new-images/findServices/give_1.png" alt="">
  8. <span class="act">材料检测</span>
  9. </div>
  10. <div class="service-item">
  11. <img src="../../../static/new-images/findServices/give_2.png" alt="">
  12. <span>跨境支付</span>
  13. </div>
  14. <div class="service-item">
  15. <img src="../../../static/new-images/findServices/give_3.png" alt="">
  16. <span>跨境物流</span>
  17. </div>
  18. <div class="service-item">
  19. <img src="../../../static/new-images/findServices/give_4.png" alt="">
  20. <span>国内物流</span>
  21. </div>
  22. <div class="service-item">
  23. <img src="../../../static/new-images/findServices/give_5.png" alt="">
  24. <span>金融服务</span>
  25. </div>
  26. </div>
  27. </header>
  28. <main>
  29. <div class="left">
  30. <scroll-view scroll-top="0" scroll-y="true" class="detection-list">
  31. <view class="detection-item" v-for="(item, index) in detectionList" :key="index"
  32. :class="index == leftIdx ? 'active' : ''" @click="leftClick(index)">{{ item }}</view>
  33. </scroll-view>
  34. </div>
  35. <div class="right">
  36. <div class="bg-box"></div>
  37. <scroll-view scroll-top="0" scroll-y="true" class="institution-list">
  38. <view class="institution-item" v-for="(item, index) in 10" :key="index">
  39. <div class="img-box">
  40. <tui-lazyload-img width="100%" height="100%"
  41. :src="'../../../static/new-images/findServices/institution_1.png' || ''"></tui-lazyload-img>
  42. </div>
  43. <div class="text-box">
  44. <div class="title">天鉴检测机构</div>
  45. <ul>
  46. <li>专业鉴定</li>
  47. <li>官方机构</li>
  48. </ul>
  49. <span><tui-rate :current="5" :quantity="5" active="#FFC01F" :size="15"></tui-rate></span>
  50. <p>广东 · 佛山</p>
  51. </div>
  52. <template v-if="index < 3">
  53. <div class="top">
  54. <img :src="'../../../static/new-images/findServices/top_' + (index + 1) + '.png'" alt="">
  55. </div>
  56. </template>
  57. </view>
  58. </scroll-view>
  59. </div>
  60. </main>
  61. </div>
  62. </template>
  63. <script>
  64. export default {
  65. data() {
  66. return {
  67. // 左边侧边栏的激活态
  68. leftIdx: 0,
  69. detectionList: ['棉花检测', '金属检测', '石材检测', '木材检测', '涂料检测', '甲醛检测', '皮革检测', '房屋检测', '其他检测']
  70. }
  71. },
  72. methods: {
  73. leftClick(val) {
  74. this.leftIdx = val
  75. }
  76. }
  77. }
  78. </script>
  79. <style lang="scss" scoped>
  80. page {
  81. background-color: #f5f5f5;
  82. }
  83. .findServices {
  84. display: flex;
  85. flex-direction: column;
  86. height: 100%;
  87. header {
  88. padding: 30rpx 30rpx 25rpx;
  89. background-color: #fff;
  90. .title {
  91. font-size: 42rpx;
  92. font-weight: 700;
  93. }
  94. .service-list {
  95. display: flex;
  96. align-items: center;
  97. justify-content: space-between;
  98. padding: 0 20rpx;
  99. box-sizing: border-box;
  100. margin-top: 50rpx;
  101. gap: 40rpx;
  102. .service-item {
  103. display: flex;
  104. align-items: center;
  105. justify-content: center;
  106. flex-direction: column;
  107. gap: 20rpx;
  108. color: rgba(0, 0, 0, 0.5);
  109. font-size: 24rpx;
  110. img {
  111. width: 80rpx;
  112. height: 80rpx;
  113. }
  114. .act {
  115. color: #000;
  116. }
  117. }
  118. }
  119. }
  120. main {
  121. width: 100%;
  122. flex: 1;
  123. display: flex;
  124. overflow: hidden;
  125. .left {
  126. width: 175rpx;
  127. height: 100%;
  128. box-sizing: border-box;
  129. font-size: 26rpx;
  130. color: rgba(0, 0, 0, 0.5);
  131. padding-bottom: 50rpx;
  132. background-color: #fff;
  133. .detection-list {
  134. white-space: nowrap;
  135. height: 100%;
  136. padding-bottom: 100rpx;
  137. .detection-item {
  138. height: 65rpx;
  139. text-align: center;
  140. line-height: 65rpx;
  141. margin-top: 25rpx;
  142. }
  143. .active {
  144. color: #000000;
  145. font-weight: 600;
  146. position: relative;
  147. &::after {
  148. content: "";
  149. width: 8rpx;
  150. height: 70%;
  151. position: absolute;
  152. top: 50%;
  153. transform: translateY(-50%);
  154. left: 0;
  155. background-color: #EF530E;
  156. }
  157. }
  158. }
  159. }
  160. .right {
  161. flex: 1;
  162. height: 100%;
  163. box-sizing: border-box;
  164. position: relative;
  165. padding-top: 15rpx;
  166. .bg-box {
  167. width: 100%;
  168. position: absolute;
  169. top: 0;
  170. left: 0;
  171. height: 500rpx;
  172. background: linear-gradient(to bottom, #fde9d5, #00000000);
  173. }
  174. .institution-list {
  175. white-space: nowrap;
  176. height: 100%;
  177. padding: 0 30rpx;
  178. box-sizing: border-box;
  179. padding-bottom: 20rpx;
  180. .institution-item {
  181. display: flex;
  182. align-items: flex-start;
  183. background-color: #fff;
  184. border-radius: 20rpx;
  185. margin-top: 30rpx;
  186. padding: 20rpx;
  187. position: relative;
  188. .img-box {
  189. width: 175rpx;
  190. height: 175rpx;
  191. box-sizing: border-box;
  192. background-color: #fff;
  193. border-radius: 20rpx;
  194. margin-right: 20rpx;
  195. }
  196. .text-box {
  197. display: flex;
  198. flex-direction: column;
  199. gap: 10rpx;
  200. .title {
  201. font-size: 32rpx;
  202. font-weight: 600;
  203. width: 270rpx;
  204. overflow: hidden;
  205. white-space: nowrap;
  206. text-overflow: ellipsis;
  207. }
  208. ul {
  209. list-style: none;
  210. padding: 0;
  211. display: flex;
  212. gap: 12rpx;
  213. li {
  214. font-size: 20rpx;
  215. color: #EF530E;
  216. padding: 4rpx 12rpx;
  217. background-color: #FFF0DE;
  218. border-radius: 8rpx;
  219. }
  220. }
  221. >p {
  222. font-size: 24rpx;
  223. }
  224. }
  225. .top {
  226. width: 68rpx;
  227. height: 83rpx;
  228. position: absolute;
  229. top: -15rpx;
  230. left: 20rpx;
  231. img {
  232. width: 100%;
  233. height: 100%;
  234. display: block;
  235. }
  236. }
  237. }
  238. }
  239. }
  240. }
  241. }
  242. uni-page-body {
  243. height: 100%;
  244. }</style>