screen-item.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. <template>
  2. <view class="screen-item flex-common-css sys-background-black">
  3. <Nav :bgckgroundBox="'#141414'" :title="'筛选'"></Nav>
  4. <scroll-view :scroll-y="true" class="list-scroll" @scroll="scroll" @scrolltolower="scrolltolower">
  5. <view class="screen-box">
  6. <view class="age-name sys-size-32 sys-color-white">
  7. 距离 {{distance}}
  8. </view>
  9. <slider :value="distance" @changing="sliderChange" min="0" max="500" activeColor="#727272"
  10. backgroundColor="#727272" block-size="6" block-color="#FFC107" />
  11. <view class="num-section sys-size-28 sys-color-5B ">
  12. <view class="">
  13. okm
  14. </view>
  15. <view class="">
  16. </view>
  17. </view>
  18. <view class="age-name sys-size-32 sys-color-white">
  19. 年龄 {{`${age[0]} - ${age[1]}`}}
  20. </view>
  21. <cjSliderTwo v-model="age" :min="0" :max="35" :step="1" :blockWidth="18" @moving="blockMoving"
  22. activeColor="#727272" inactiveColor="#727272" blockColor="#FFC107" />
  23. <view class="num-section sys-size-28 sys-color-5B">
  24. <view class="">
  25. okm
  26. </view>
  27. <view class="">
  28. 35+
  29. </view>
  30. </view>
  31. <view class="sex">
  32. <view v-for="(item,index) in sex" :key="index" class="sex-list sys-size-28 sys-radius-12"
  33. @click="selsectSex(item.id)"
  34. :class="sexId == item.id?'sys-background-FFC107 sys-color-black':'sys-color-gray-646464 sys-background-222'">
  35. {{item.name}}
  36. </view>
  37. </view>
  38. <view class="view-user">
  39. <view class="view-user-left sys-color-white sys-size-32">
  40. 优先查看用户
  41. </view>
  42. <view class="view-user-right">
  43. <view class="view-user-right-name sys-color-5B sys-size-28">
  44. 未设置
  45. </view>
  46. <uni-icons type="forward" size="20" color="#5B5B5B"></uni-icons>
  47. </view>
  48. </view>
  49. <view class="view-user">
  50. <view class="view-user-left sys-color-white sys-size-32">
  51. 速配星座
  52. </view>
  53. <view class="view-user-right">
  54. <view class="view-user-right-name sys-color-5B sys-size-28">
  55. 未设置
  56. </view>
  57. <uni-icons type="forward" size="20" color="#5B5B5B"></uni-icons>
  58. </view>
  59. </view>
  60. <view class="placeholder-box"></view>
  61. <view class="aim-box">
  62. <view class="aim-title">
  63. <view class="title-box sys-radius-200 sys-background-FFC107"></view>
  64. <view class="title-name sys-size-32 sys-color-white">
  65. 交友目的
  66. </view>
  67. </view>
  68. <view class="aim-text sys-color-5B sys-size-24">
  69. 人数不足时,将自动扬大范围
  70. </view>
  71. <view class="aim-list">
  72. <view class="list-box" v-for="(item,index) in 10">
  73. <image class="list-box-img sys-radius-40" src="../../../static/img/circle/1.png" mode="">
  74. </image>
  75. <view class="list-box-name sys-color-5B sys-size-26">
  76. 认识的朋友
  77. </view>
  78. </view>
  79. </view>
  80. </view>
  81. </view>
  82. </scroll-view>
  83. </view>
  84. </template>
  85. <script>
  86. import cjSliderTwo from '@/components/jxs-slider/jxs-slider.vue'
  87. import cjSlider from '@/components/cj-slider/cj-slider.vue'
  88. import {
  89. getFilter
  90. } from "@/api/discovery";
  91. export default {
  92. components: {
  93. cjSliderTwo
  94. },
  95. data() {
  96. return {
  97. distance: 50,
  98. age: [18, 30],
  99. sex: [{
  100. 'name': '男生',
  101. 'id': 0
  102. }, {
  103. 'name': '女生',
  104. 'id': 1
  105. }, {
  106. 'name': '不限',
  107. 'id': 2
  108. }],
  109. sexId: 0,
  110. };
  111. },
  112. mounted() {
  113. this.getFilter()
  114. },
  115. methods: {
  116. getFilter() {
  117. getFilter().then((res) => {
  118. console.log(res)
  119. })
  120. },
  121. scroll() {},
  122. scrolltolower() {},
  123. blockMoving(e) {
  124. console.log('正在滑动中', e)
  125. },
  126. sliderChange(e) {
  127. this.distance = e.detail.value
  128. },
  129. selsectSex(id) {
  130. //点击没反应
  131. this.sexId = id
  132. console.log(id);
  133. },
  134. },
  135. }
  136. </script>
  137. <style lang="scss" scoped>
  138. ::v-deep uni-slider {
  139. margin: 0;
  140. }
  141. .screen-item {
  142. width: 100%;
  143. flex: 1;
  144. .list-scroll {
  145. width: 100%;
  146. flex: 1;
  147. overflow: auto;
  148. padding: 24rpx 32rpx 0 32rpx;
  149. box-sizing: border-box;
  150. display: flex;
  151. flex-direction: column;
  152. .screen-box {
  153. .age-name {
  154. margin: 0 0 20rpx 0;
  155. }
  156. .num-section {
  157. padding: 8rpx 0 0 0;
  158. width: 100%;
  159. display: flex;
  160. align-items: center;
  161. justify-content: space-between;
  162. margin: 0 0 40rpx 0;
  163. }
  164. .sex {
  165. display: flex;
  166. align-items: center;
  167. justify-content: space-between;
  168. margin: 0 0 40rpx 0;
  169. .sex-list {
  170. width: 212rpx;
  171. padding: 10rpx 0;
  172. display: flex;
  173. align-items: center;
  174. justify-content: center;
  175. }
  176. }
  177. .view-user {
  178. width: 100%;
  179. display: flex;
  180. align-items: center;
  181. justify-content: space-between;
  182. margin: 0 0 40rpx 0;
  183. .view-user-left {}
  184. .view-user-right {
  185. display: flex;
  186. align-items: center;
  187. .view-user-right-mame {
  188. margin: 0 4rpx 0 0;
  189. }
  190. }
  191. }
  192. .placeholder-box {
  193. width: 100%;
  194. height: 1rpx;
  195. border-bottom: 2rpx dashed #383838;
  196. margin: 0 0 40rpx 0;
  197. }
  198. .aim-box {
  199. width: 100%;
  200. display: flex;
  201. flex-direction: column;
  202. .aim-title {
  203. display: flex;
  204. align-items: center;
  205. margin: 0 0 4rpx 0;
  206. .title-box {
  207. width: 4rpx;
  208. height: 32rpx;
  209. margin: 0 8rpx 0 0;
  210. }
  211. }
  212. .aim-list {
  213. display: flex;
  214. align-items: center;
  215. flex-wrap: wrap;
  216. .list-box {
  217. width: 25%;
  218. display: flex;
  219. flex-direction: column;
  220. align-items: center;
  221. // margin: 0 60rpx 0 0;
  222. padding: 32rpx 0 0 0;
  223. .list-box-img {
  224. width: 120rpx;
  225. height: 120rpx;
  226. margin: 0 0 16rpx 0;
  227. flex-shrink: 0;
  228. }
  229. .list-box-name {
  230. white-space: nowrap;
  231. }
  232. }
  233. .list-box:last-child {
  234. margin: 0;
  235. }
  236. }
  237. }
  238. }
  239. }
  240. }
  241. </style>