详情小程序
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.

385 lines
8.2 KiB

  1. <template>
  2. <view class="lf-p-30">
  3. <view class="up-the-wall">
  4. <view class="lf-row-between lf-p-t-30 lf-p-b-30 border-register">
  5. <view class="lf-font-28 lf-color-333"><text class="lf-color-primary">*</text>婚史要求</view>
  6. <view class="lf-font-28 lf-color-333">
  7. <picker mode="selector" @change="getValue('marriage', $event)" :range="marriage" :value="marriage_index">
  8. <text>{{ marriage[marriage_index] || '请选择' }}</text>
  9. </picker>
  10. </view>
  11. </view>
  12. <view class="lf-row-between lf-p-t-30 lf-p-b-30 border-register">
  13. <view class="lf-font-28 lf-color-333"><text class="lf-color-primary">*</text>最低身高</view>
  14. <view class="lf-font-28 lf-color-333">
  15. <picker mode="selector" @change="getValue('marriage', $event)" :range="marriage" :value="marriage_index">
  16. <text>{{ marriage[marriage_index] || '请选择' }}</text>
  17. </picker>
  18. </view>
  19. </view>
  20. <view class="lf-row-between lf-p-t-30 lf-p-b-30 border-register">
  21. <view class="lf-font-28 lf-color-333"><text class="lf-color-primary">*</text>最低学历要求</view>
  22. <view class="lf-font-28 lf-color-333">
  23. <picker mode="selector" @change="getValue('marriage', $event)" :range="marriage" :value="marriage_index">
  24. <text>{{ marriage[marriage_index] || '请选择' }}</text>
  25. </picker>
  26. </view>
  27. </view>
  28. <view class="lf-row-between lf-p-t-30 lf-p-b-30 border-register">
  29. <view class="lf-font-28 lf-color-333"><text class="lf-font-28" style="color: #E21196;">*</text>最低年薪要求</view>
  30. <view @tap="showModal" data-target="ChooseModal" class="lf-font-28 lf-color-333">
  31. 请选择
  32. </view>
  33. </view>
  34. <view class="tag-content">
  35. <view class="personal-tag" :class="item.hot?'personal-special1':'personal-active1'" v-for="item of chooseList">{{item.name}}</view>
  36. </view>
  37. <view class="cu-modal" :class="modalName=='ChooseModal'?'show':''" @tap="hideModal">
  38. <view class="cu-dialog">
  39. <view class="lf-p-b-30 lf-font-32" style="color: #E21196;">
  40. 请选择你的家庭成员
  41. </view>
  42. <view class="tag-content1">
  43. <view class="personal-tag1" :class="item.checked?'personal-active':''" :data-value="item.value" v-for="(item,index) of checkbox" @tap.stop="ChooseCheckbox">{{item.name}}</view>
  44. </view>
  45. <view class="lf-row-center">
  46. <view class="work-btn1 work-btn" @click.stop="makeSure()">
  47. 确认选择
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. <button class="btn" hover-class="lf-opacity">最后一步</button>
  53. </view>
  54. </view>
  55. </template>
  56. <script>
  57. export default {
  58. data(){
  59. return {
  60. marriage: ['已婚', '未婚'],
  61. marriage_index: null,
  62. birth_date: '',
  63. modalName: null,
  64. checkbox: [{
  65. value: 0,
  66. name: '父亲',
  67. checked: true,
  68. hot: false,
  69. }, {
  70. value: 1,
  71. name: '母亲',
  72. checked: true,
  73. hot: false,
  74. }, {
  75. value: 2,
  76. name: '哥哥',
  77. checked: false,
  78. hot: false,
  79. }, {
  80. value: 3,
  81. name: '姐姐',
  82. checked: false,
  83. hot: false,
  84. }, {
  85. value: 4,
  86. name: '儿子',
  87. checked: false,
  88. hot: false,
  89. }, {
  90. value: 5,
  91. name: '儿子(离异归对方)',
  92. checked: false,
  93. hot: true,
  94. }],
  95. chooseList: []
  96. }
  97. },
  98. onLoad(){
  99. },
  100. methods: {
  101. getValue(current, event){
  102. this[current +'_index'] = event.detail.value;
  103. },
  104. showModal(e) {
  105. this.modalName = e.currentTarget.dataset.target
  106. },
  107. hideModal(e) {
  108. this.modalName = null
  109. },
  110. makeSure(e) {
  111. this.chooseList = [];
  112. this.checkbox.forEach(item => {
  113. if(item.checked == true) {
  114. this.chooseList.push(item)
  115. }
  116. });
  117. this.modalName = null
  118. },
  119. ChooseCheckbox(e) {
  120. let items = this.checkbox;
  121. let values = e.currentTarget.dataset.value;
  122. for (let i = 0, lenI = items.length; i < lenI; ++i) {
  123. if (items[i].value == values) {
  124. items[i].checked = !items[i].checked;
  125. break
  126. }
  127. }
  128. }
  129. }
  130. }
  131. </script>
  132. <style>
  133. page {
  134. background-color: #F5F5F5;
  135. }
  136. </style>
  137. <style scoped lang="scss">
  138. .perfance-area {
  139. background-color: #F5F5F5;
  140. width: 560rpx;
  141. border-radius: 10rpx;
  142. padding: 30rpx;
  143. }
  144. .up-the-wall {
  145. width: 100%;
  146. height: max-content;
  147. padding: 21rpx 32rpx 21rpx;
  148. background-color: white;
  149. border-radius: 10rpx;
  150. }
  151. /deep/.input-placeholder {
  152. /* placeholder颜色 */
  153. color: #777777;
  154. /* placeholder字体大小 */
  155. font-size: 28rpx;
  156. }
  157. .border-register {
  158. border-bottom: 1px solid #f5f5f5;
  159. }
  160. .btn{
  161. width: 100%;
  162. height: 90rpx;
  163. line-height: 90rpx;
  164. margin-top: 20rpx;
  165. padding-bottom: 10rpx;
  166. background: #E21196;
  167. border-radius: 46rpx;
  168. color: #FFFFFF;
  169. }
  170. .tag-content {
  171. width: 600rpx;
  172. flex-wrap: wrap;
  173. display: flex;
  174. margin-top: 10rpx;
  175. }
  176. .personal-tag {
  177. margin: 10rpx 4rpx;
  178. width: max-content;
  179. padding: 2rpx 20rpx;
  180. height: 55rpx;
  181. border-radius: 28rpx;
  182. border: 1rpx solid #E21196;
  183. color: #E21196;
  184. font-size: 28rpx;
  185. margin-right: 15rpx;
  186. display: flex;
  187. justify-content: center;
  188. align-items: center;
  189. &:nth-child(5n) {
  190. margin-right: 0;
  191. }
  192. &:nth-child(n + 6) {
  193. margin-top: 20rpx;
  194. }
  195. }
  196. .tag-content1 {
  197. width: 600rpx;
  198. flex-wrap: wrap;
  199. display: flex;
  200. }
  201. .personal-tag1 {
  202. width: max-content;
  203. padding: 8rpx 25rpx;
  204. height: 55rpx;
  205. border-radius: 10rpx;
  206. border: 1rpx solid #ccc;
  207. color: #969090;
  208. font-size: 28rpx;
  209. margin-right: 15rpx;
  210. display: flex;
  211. justify-content: center;
  212. align-items: center;
  213. &:nth-child(5n) {
  214. margin-right: 0;
  215. }
  216. &:nth-child(n + 6) {
  217. margin-top: 20rpx;
  218. }
  219. }
  220. .personal-active {
  221. border: 1rpx solid #E21196!important;
  222. color: #E21196!important;
  223. }
  224. .personal-special {
  225. border: 1rpx solid orange!important;
  226. color: orange!important;
  227. }
  228. .personal-active1 {
  229. border: none!important;
  230. background-color: #E21196!important;
  231. color: #fff!important;
  232. }
  233. .personal-special1 {
  234. border: none!important;
  235. background-color: orange!important;
  236. color: #fff!important;
  237. }
  238. .work-btn1 {
  239. border-radius: 10rpx!important;
  240. }
  241. .work-btn {
  242. width: 626rpx;
  243. height: 90rpx;
  244. background: #E21196;
  245. border-radius: 45rpx;
  246. color: white;
  247. font-size: 32rpx;
  248. display: flex;
  249. justify-content: center;
  250. text-align: center;
  251. align-items: center;
  252. margin-top: 60rpx;
  253. }
  254. .work-tag {
  255. height: 100%!important;
  256. }
  257. .work-tag {
  258. width: 686rpx;
  259. height: 215rpx;
  260. background: #FFFFFF;
  261. border-radius: 10rpx;
  262. margin: 30rpx auto;
  263. display: flex;
  264. flex-direction: column;
  265. /* justify-content: space-around; */
  266. padding: 30rpx;
  267. }
  268. //窗口
  269. .cu-modal {
  270. position: fixed;
  271. top: 0;
  272. right: 0;
  273. bottom: 0;
  274. left: 0;
  275. z-index: 1110;
  276. opacity: 0;
  277. outline: 0;
  278. text-align: center;
  279. -ms-transform: scale(1.185);
  280. transform: scale(1.185);
  281. backface-visibility: hidden;
  282. perspective: 2000upx;
  283. background: rgba(0, 0, 0, 0.6);
  284. transition: all 0.3s ease-in-out 0s;
  285. pointer-events: none;
  286. }
  287. .cu-modal::before {
  288. content: "\200B";
  289. display: inline-block;
  290. height: 100%;
  291. vertical-align: middle;
  292. }
  293. .cu-modal.show {
  294. opacity: 1;
  295. transition-duration: 0.3s;
  296. -ms-transform: scale(1);
  297. transform: scale(1);
  298. overflow-x: hidden;
  299. overflow-y: auto;
  300. pointer-events: auto;
  301. }
  302. .cu-dialog {
  303. position: relative;
  304. display: inline-block;
  305. vertical-align: middle;
  306. margin-left: auto;
  307. margin-right: auto;
  308. width: 680upx;
  309. max-width: 100%;
  310. background-color: #f8f8f8;
  311. border-radius: 10upx;
  312. overflow: hidden;
  313. padding: 30rpx;
  314. }
  315. .cu-modal.bottom-modal::before {
  316. vertical-align: bottom;
  317. }
  318. .cu-modal.bottom-modal .cu-dialog {
  319. width: 100%;
  320. border-radius: 0;
  321. }
  322. .cu-modal.bottom-modal {
  323. margin-bottom: -1000upx;
  324. }
  325. .cu-modal.bottom-modal.show {
  326. margin-bottom: 0;
  327. }
  328. .cu-modal.drawer-modal {
  329. transform: scale(1);
  330. display: flex;
  331. }
  332. .cu-modal.drawer-modal .cu-dialog {
  333. height: 100%;
  334. min-width: 200upx;
  335. border-radius: 0;
  336. margin: initial;
  337. transition-duration: 0.3s;
  338. }
  339. .cu-modal.drawer-modal.justify-start .cu-dialog {
  340. transform: translateX(-100%);
  341. }
  342. .cu-modal.drawer-modal.justify-end .cu-dialog {
  343. transform: translateX(100%);
  344. }
  345. .cu-modal.drawer-modal.show .cu-dialog {
  346. transform: translateX(0%);
  347. }
  348. .cu-modal .cu-dialog>.cu-bar:first-child .action{
  349. min-width: 100rpx;
  350. margin-right: 0;
  351. min-height: 100rpx;
  352. }
  353. </style>