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

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