screen-item.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  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. import {getScreenDict} from "@/api/utility";
  92. export default {
  93. components: {
  94. cjSliderTwo
  95. },
  96. data() {
  97. return {
  98. distance: 50,
  99. age: [18, 30],
  100. sex: [{
  101. 'name': '男生',
  102. 'id': 0
  103. }, {
  104. 'name': '女生',
  105. 'id': 1
  106. }, {
  107. 'name': '不限',
  108. 'id': 2
  109. }],
  110. sexId: 0,
  111. };
  112. },
  113. mounted() {
  114. this.getFilter()
  115. this.getScreenDict()
  116. },
  117. methods: {
  118. getScreenDict(){
  119. getScreenDict('app_user_filter_hobby,app_user_filter_constellation,app_user_filter_purpose').then((res)=>{
  120. console.log(res)
  121. })
  122. },
  123. getFilter() {
  124. getFilter().then((res) => {
  125. console.log(res)
  126. })
  127. },
  128. scroll() {},
  129. scrolltolower() {},
  130. blockMoving(e) {
  131. console.log('正在滑动中', e)
  132. },
  133. sliderChange(e) {
  134. this.distance = e.detail.value
  135. },
  136. selsectSex(id) {
  137. //点击没反应
  138. this.sexId = id
  139. console.log(id);
  140. },
  141. },
  142. }
  143. </script>
  144. <style lang="scss" scoped>
  145. ::v-deep uni-slider {
  146. margin: 0;
  147. }
  148. .screen-item {
  149. width: 100%;
  150. flex: 1;
  151. .list-scroll {
  152. width: 100%;
  153. flex: 1;
  154. overflow: auto;
  155. padding: 24rpx 32rpx 0 32rpx;
  156. box-sizing: border-box;
  157. display: flex;
  158. flex-direction: column;
  159. .screen-box {
  160. .age-name {
  161. margin: 0 0 20rpx 0;
  162. }
  163. .num-section {
  164. padding: 8rpx 0 0 0;
  165. width: 100%;
  166. display: flex;
  167. align-items: center;
  168. justify-content: space-between;
  169. margin: 0 0 40rpx 0;
  170. }
  171. .sex {
  172. display: flex;
  173. align-items: center;
  174. justify-content: space-between;
  175. margin: 0 0 40rpx 0;
  176. .sex-list {
  177. width: 212rpx;
  178. padding: 10rpx 0;
  179. display: flex;
  180. align-items: center;
  181. justify-content: center;
  182. }
  183. }
  184. .view-user {
  185. width: 100%;
  186. display: flex;
  187. align-items: center;
  188. justify-content: space-between;
  189. margin: 0 0 40rpx 0;
  190. .view-user-left {}
  191. .view-user-right {
  192. display: flex;
  193. align-items: center;
  194. .view-user-right-mame {
  195. margin: 0 4rpx 0 0;
  196. }
  197. }
  198. }
  199. .placeholder-box {
  200. width: 100%;
  201. height: 1rpx;
  202. border-bottom: 2rpx dashed #383838;
  203. margin: 0 0 40rpx 0;
  204. }
  205. .aim-box {
  206. width: 100%;
  207. display: flex;
  208. flex-direction: column;
  209. .aim-title {
  210. display: flex;
  211. align-items: center;
  212. margin: 0 0 4rpx 0;
  213. .title-box {
  214. width: 4rpx;
  215. height: 32rpx;
  216. margin: 0 8rpx 0 0;
  217. }
  218. }
  219. .aim-list {
  220. display: flex;
  221. align-items: center;
  222. flex-wrap: wrap;
  223. .list-box {
  224. width: 25%;
  225. display: flex;
  226. flex-direction: column;
  227. align-items: center;
  228. // margin: 0 60rpx 0 0;
  229. padding: 32rpx 0 0 0;
  230. .list-box-img {
  231. width: 120rpx;
  232. height: 120rpx;
  233. margin: 0 0 16rpx 0;
  234. flex-shrink: 0;
  235. }
  236. .list-box-name {
  237. white-space: nowrap;
  238. }
  239. }
  240. .list-box:last-child {
  241. margin: 0;
  242. }
  243. }
  244. }
  245. }
  246. }
  247. }
  248. </style>