screen-item.vue 5.9 KB

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