index.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838
  1. <template>
  2. <view class="interview-container">
  3. <!-- 职位列表 -->
  4. <view class="job-list-container" v-if="!userInfoFilled">
  5. <view class="job-list-title">可选职位列表</view>
  6. <view class="job-list">
  7. <view v-for="(job, index) in jobList" :key="index" class="job-item"
  8. :class="{'job-selected': selectedJobId === job.id}" @click="selectJob(job)">
  9. <view class="job-name">{{job.title}}</view>
  10. <view class="job-details">
  11. <text class="job-salary">{{job.publish_date}}</text>
  12. <text class="job-location">{{job.location}}</text>
  13. </view>
  14. </view>
  15. </view>
  16. <button class="apply-btn" :disabled="!selectedJobId" @click="applyForJob">申请面试</button>
  17. </view>
  18. <!-- 表单信息 -->
  19. <view class="form-container" v-if="userInfoFilled">
  20. <view class="form-title">请完成验证信息填写</view>
  21. <view class="form-item phone-item">
  22. <view class="country-code">
  23. <text>+86</text>
  24. <!-- <text class="dropdown-icon">▼</text> -->
  25. </view>
  26. <input type="number" v-model="formData.phone" placeholder="请输入手机号" maxlength="11" @input="validatePhone" />
  27. <view class="validation-icon" v-if="formData.phone">
  28. <text class="icon-success" v-if="isPhoneValid">✓</text>
  29. <text class="icon-error" v-else>✗</text>
  30. </view>
  31. </view>
  32. <view class="form-item">
  33. <input type="text" v-model="formData.name" placeholder="请输入姓名" @input="validateName" />
  34. <view class="validation-icon" v-if="formData.name">
  35. <text class="icon-success" v-if="isNameValid">✓</text>
  36. <text class="icon-error" v-else>✗</text>
  37. </view>
  38. </view>
  39. <view class="form-item">
  40. <input type="text" v-model="formData.idCard" placeholder="请输入身份证号" maxlength="18" @input="validateIdCard" />
  41. <view class="validation-icon" v-if="formData.idCard">
  42. <text class="icon-success" v-if="isIdCardValid">✓</text>
  43. <text class="icon-error" v-else>✗</text>
  44. </view>
  45. </view>
  46. <!-- 添加性别选择 -->
  47. <view class="form-item">
  48. <picker @change="genderChange" :value="genderIndex" :range="genderOptions">
  49. <view class="picker-input">
  50. <input type="text" disabled placeholder="请选择性别" :value="formData.gender" />
  51. <view class="dropdown-icon">▼</view>
  52. </view>
  53. </picker>
  54. </view>
  55. <button class="verify-btn" :disabled="!canSubmitSimple" @click="submitForm">确认面试</button>
  56. <view class="agreement">
  57. <checkbox :checked="isAgreed" @tap="toggleAgreement" color="#0039b3" />
  58. <text class="agreement-text">
  59. 我已阅读并同意<text class="agreement-link">《用户协议》</text>和<text class="agreement-link">《隐私政策》</text>
  60. </text>
  61. </view>
  62. </view>
  63. </view>
  64. </template>
  65. <script>
  66. import { apiBaseUrl } from '@/common/config.js';
  67. import {
  68. fillUserInfo,
  69. getUserInfo,
  70. getJobList,
  71. applyJob
  72. } from '@/api/user';
  73. export default {
  74. data() {
  75. return {
  76. formData: {
  77. name: '',
  78. gender: '',
  79. phone: '',
  80. email: '',
  81. idCard: '',
  82. emergencyContact: '',
  83. emergencyPhone: '',
  84. relation: ''
  85. },
  86. relationOptions: ['父母', '配偶', '子女', '兄弟姐妹', '朋友', '其他'],
  87. relationIndex: 0,
  88. isAgreed: false,
  89. userInfoFilled: false,
  90. jobList: [],
  91. selectedJobId: null,
  92. selectedJob: null,
  93. isPhoneValid: false,
  94. isNameValid: false,
  95. isIdCardValid: false,
  96. genderOptions: ['男', '女'],
  97. genderIndex: 0,
  98. genderMapping: {
  99. '男': '1',
  100. '女': '2',
  101. '1': '男',
  102. '2': '女'
  103. }
  104. }
  105. },
  106. onLoad(options) {
  107. console.log('options:', options);
  108. if (options.scene) {
  109. // 对scene进行解码
  110. const scene = decodeURIComponent(options.scene);
  111. console.log('解码后的scene:', scene);
  112. // 如果scene是key1=val1&key2=val2格式
  113. const sceneParams = {};
  114. scene.split('&').forEach(pair => {
  115. const [key, value] = pair.split('=');
  116. sceneParams[key] = value;
  117. });
  118. console.log('解析后的参数:', sceneParams);
  119. }
  120. this.checkUserInfo();
  121. this.fetchJobList();
  122. },
  123. computed: {
  124. canSubmit() {
  125. return this.formData.name.trim() &&
  126. this.formData.gender &&
  127. this.formData.phone.trim() &&
  128. (/^1\d{10}$/.test(this.formData.phone)) &&
  129. (!this.formData.email || /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/.test(this.formData.email)) &&
  130. this.formData.idCard.trim() &&
  131. this.formData.emergencyContact.trim() &&
  132. this.formData.emergencyPhone.trim() &&
  133. (/^1\d{10}$/.test(this.formData.emergencyPhone)) &&
  134. this.formData.relation &&
  135. this.isAgreed;
  136. },
  137. canSubmitSimple() {
  138. return this.formData.name.trim() &&
  139. this.formData.phone.trim() &&
  140. this.isPhoneValid &&
  141. this.formData.idCard.trim() &&
  142. this.isIdCardValid &&
  143. this.isAgreed;
  144. }
  145. },
  146. methods: {
  147. checkLogin() {
  148. const userInfo = uni.getStorageSync('userInfo');
  149. if (!userInfo) {
  150. // 未登录时跳转到身份验证登录页面
  151. uni.reLaunch({
  152. url: '/pages/login/login',
  153. success: () => {
  154. console.log('跳转到身份验证登录页面成功');
  155. },
  156. fail: (err) => {
  157. console.error('跳转到身份验证登录页面失败:', err);
  158. uni.showToast({
  159. title: '跳转失败,请重试',
  160. icon: 'none'
  161. });
  162. }
  163. });
  164. return false;
  165. }
  166. try {
  167. const parsedUserInfo = JSON.parse(userInfo);
  168. if (!parsedUserInfo.openid) {
  169. // 没有openid时跳转到身份验证登录页面
  170. uni.navigateTo({
  171. url: '/pages/login/login'
  172. });
  173. return false;
  174. }
  175. return true;
  176. } catch (e) {
  177. console.error('解析用户信息失败:', e);
  178. uni.removeStorageSync('userInfo');
  179. uni.navigateTo({
  180. url: '/pages/login/login'
  181. });
  182. return false;
  183. }
  184. },
  185. goHome() {
  186. uni.navigateBack({
  187. delta: 1
  188. });
  189. },
  190. toggleAgreement() {
  191. this.isAgreed = !this.isAgreed;
  192. },
  193. relationChange(e) {
  194. this.relationIndex = e.detail.value;
  195. this.formData.relation = this.relationOptions[this.relationIndex];
  196. },
  197. checkUserInfo() {
  198. // if (!this.checkLogin()) {
  199. // return;
  200. // }
  201. uni.showLoading({
  202. title: '加载中...'
  203. });
  204. try {
  205. const userInfo = JSON.parse(uni.getStorageSync('userInfo'));
  206. console.log('id:', userInfo.id);
  207. getUserInfo(userInfo.id)
  208. .then(res => {
  209. uni.hideLoading();
  210. const userData = res;
  211. if (!userData.name || !userData.phone) {
  212. this.userInfoFilled = true;
  213. this.formData.name = userData.name || '';
  214. if (userData.gender) {
  215. this.formData.gender = this.genderMapping[userData.gender] || userData.gender;
  216. const index = this.genderOptions.findIndex(item => item === this.formData.gender);
  217. if (index !== -1) {
  218. this.genderIndex = index;
  219. }
  220. } else {
  221. this.formData.gender = '';
  222. }
  223. this.formData.phone = userData.phone || '';
  224. this.formData.idCard = userData.id_card || '';
  225. this.formData.emergencyContact = userData.emergency_contact || '';
  226. this.formData.emergencyPhone = userData.emergency_phone || '';
  227. this.formData.relation = userData.relation || '';
  228. if (userData.relation) {
  229. const index = this.relationOptions.findIndex(item => item === userData.relation);
  230. if (index !== -1) {
  231. this.relationIndex = index;
  232. }
  233. }
  234. }
  235. })
  236. .catch(err => {
  237. uni.hideLoading();
  238. console.error('获取用户信息失败:', err);
  239. uni.showToast({
  240. title: '获取用户信息失败',
  241. icon: 'none'
  242. });
  243. });
  244. } catch (e) {
  245. uni.hideLoading();
  246. console.error('获取用户信息失败:', e);
  247. uni.showToast({
  248. title: '获取用户信息失败',
  249. icon: 'none'
  250. });
  251. // uni.navigateTo({
  252. // url: '/pages/login/login'
  253. // });
  254. }
  255. },
  256. fetchJobList() {
  257. uni.showLoading({
  258. title: '加载职位列表...'
  259. });
  260. getJobList()
  261. .then(res => {
  262. uni.hideLoading();
  263. console.log(res);
  264. this.jobList = res;
  265. })
  266. .catch(err => {
  267. uni.hideLoading();
  268. console.error('获取职位列表失败:', err);
  269. uni.showToast({
  270. title: '网络错误,请稍后重试',
  271. icon: 'none'
  272. });
  273. });
  274. },
  275. selectJob(job) {
  276. this.selectedJobId = job.id;
  277. this.selectedJob = job;
  278. },
  279. applyForJob() {
  280. if (!this.checkLogin()) {
  281. return;
  282. }
  283. if (!this.selectedJobId) {
  284. uni.showToast({
  285. title: '请选择一个职位',
  286. icon: 'none'
  287. });
  288. return;
  289. }
  290. // 保存所选职位信息
  291. uni.setStorageSync('selectedJob', JSON.stringify(this.selectedJob));
  292. applyJob({
  293. job_id: this.selectedJobId,
  294. tenant_id: 1,
  295. openid: JSON.parse(uni.getStorageSync('userInfo')).openid
  296. }).then(res => {
  297. // 保存返回的应用ID到本地存储
  298. if (res && res.id) {
  299. // 将应用ID保存到本地
  300. uni.setStorageSync('appId', res.id);
  301. // 也可以更新已有的userInfo对象
  302. try {
  303. const userInfo = JSON.parse(uni.getStorageSync('userInfo') || '{}');
  304. userInfo.appId = res.id;
  305. uni.setStorageSync('userInfo', JSON.stringify(userInfo));
  306. } catch (e) {
  307. console.error('更新用户信息失败:', e);
  308. }
  309. }
  310. uni.navigateTo({
  311. url: '/pages/interview-notice/interview-notice',
  312. fail: (err) => {
  313. console.error('页面跳转失败:', err);
  314. uni.showToast({
  315. title: '页面跳转失败',
  316. icon: 'none'
  317. });
  318. }
  319. });
  320. }).catch(err => {
  321. console.error('申请职位失败:', err);
  322. uni.showToast({
  323. title: '申请职位失败,请重试',
  324. icon: 'none'
  325. });
  326. });
  327. },
  328. submitForm() {
  329. if (!this.checkLogin()) {
  330. return;
  331. }
  332. if (!this.formData.name.trim()) {
  333. uni.showToast({
  334. title: '请输入姓名',
  335. icon: 'none'
  336. });
  337. return;
  338. }
  339. if (!this.formData.gender) {
  340. uni.showToast({
  341. title: '请选择性别',
  342. icon: 'none'
  343. });
  344. return;
  345. }
  346. if (!this.formData.phone.trim()) {
  347. uni.showToast({
  348. title: '请输入手机号',
  349. icon: 'none'
  350. });
  351. return;
  352. }
  353. if (!/^1\d{10}$/.test(this.formData.phone)) {
  354. uni.showToast({
  355. title: '请输入正确的手机号',
  356. icon: 'none'
  357. });
  358. return;
  359. }
  360. if (!this.formData.idCard.trim()) {
  361. uni.showToast({
  362. title: '请输入身份证号',
  363. icon: 'none'
  364. });
  365. return;
  366. }
  367. const idCardReg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
  368. if (!idCardReg.test(this.formData.idCard)) {
  369. uni.showToast({
  370. title: '请输入正确的身份证号',
  371. icon: 'none'
  372. });
  373. return;
  374. }
  375. if (!this.isAgreed) {
  376. uni.showToast({
  377. title: '请阅读并同意相关协议',
  378. icon: 'none'
  379. });
  380. return;
  381. }
  382. uni.showLoading({
  383. title: '验证身份信息...'
  384. });
  385. // 先调用身份验证接口
  386. uni.request({
  387. url: `${apiBaseUrl}/wechat/identity/verify`,
  388. method: 'POST',
  389. data: {
  390. name: this.formData.name,
  391. id_number: this.formData.idCard,
  392. mobile: this.formData.phone
  393. },
  394. header: {
  395. 'content-type': 'application/x-www-form-urlencoded'
  396. },
  397. success: (res) => {
  398. // 身份验证成功后,继续提交用户信息
  399. console.log(res);
  400. if (res.statusCode === 200) {
  401. if (res.data.code === 200) {
  402. this.submitUserInfo();
  403. } else {
  404. uni.showToast({
  405. title: res.data.data.message,
  406. icon: 'none'
  407. });
  408. }
  409. } else {
  410. uni.hideLoading();
  411. uni.showToast({
  412. title: '身份验证失败,请检查信息是否正确',
  413. icon: 'none'
  414. });
  415. }
  416. },
  417. fail: (err) => {
  418. uni.hideLoading();
  419. console.error('身份验证失败:', err);
  420. uni.showToast({
  421. title: '网络错误,请稍后重试',
  422. icon: 'none'
  423. });
  424. }
  425. });
  426. },
  427. submitUserInfo() {
  428. const genderValue = this.genderMapping[this.formData.gender] || this.formData.gender;
  429. const submitData = {
  430. openid: JSON.parse(uni.getStorageSync('userInfo') || '{}').openid || '',
  431. name: this.formData.name,
  432. phone: this.formData.phone,
  433. id_card: this.formData.idCard,
  434. status: 1,
  435. source: 'mini',
  436. examine: 0,
  437. tenant_id: '1',
  438. /* emergency_contact: this.formData.emergencyContact,
  439. emergency_phone: this.formData.emergencyPhone,
  440. relation: this.formData.relation, */
  441. age: '20',
  442. job_id: this.selectedJobId,
  443. gender: genderValue
  444. };
  445. fillUserInfo(submitData)
  446. .then(res => {
  447. uni.hideLoading();
  448. this.updateLocalUserInfo(res.id);
  449. uni.showToast({
  450. title: '提交成功',
  451. icon: 'success',
  452. duration: 1500,
  453. success: () => {
  454. this.userInfoFilled = false;
  455. // setTimeout(() => {
  456. // }, 1500);
  457. }
  458. });
  459. })
  460. .catch(err => {
  461. uni.hideLoading();
  462. console.error('提交表单失败:', err);
  463. uni.showToast({
  464. title: '网络错误,请稍后重试',
  465. icon: 'none'
  466. });
  467. });
  468. },
  469. updateLocalUserInfo(data) {
  470. getUserInfo(data)
  471. .then(res => {
  472. if (res.code === 200 && res.data) {
  473. let userInfo = {};
  474. try {
  475. userInfo = JSON.parse(uni.getStorageSync('userInfo') || '{}');
  476. } catch (e) {
  477. console.error('解析本地存储用户信息失败:', e);
  478. userInfo = {};
  479. }
  480. const updatedUserInfo = {
  481. ...userInfo,
  482. ...res.data
  483. };
  484. uni.setStorageSync('userInfo', JSON.stringify(updatedUserInfo));
  485. }
  486. })
  487. .catch(err => {
  488. console.error('更新本地用户信息失败:', err);
  489. });
  490. },
  491. validatePhone() {
  492. this.isPhoneValid = /^1\d{10}$/.test(this.formData.phone);
  493. },
  494. validateName() {
  495. this.isNameValid = this.formData.name.trim().length >= 2;
  496. },
  497. validateIdCard() {
  498. const idCardReg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
  499. this.isIdCardValid = idCardReg.test(this.formData.idCard);
  500. },
  501. genderChange(e) {
  502. this.genderIndex = e.detail.value;
  503. const displayGender = this.genderOptions[this.genderIndex];
  504. this.formData.gender = displayGender;
  505. }
  506. }
  507. }
  508. </script>
  509. <style>
  510. .interview-container {
  511. display: flex;
  512. flex-direction: column;
  513. min-height: 100vh;
  514. background-color: #f5f7fa;
  515. }
  516. .nav-bar {
  517. display: flex;
  518. justify-content: space-between;
  519. align-items: center;
  520. padding: 20rpx 30rpx;
  521. background-color: #0039b3;
  522. color: #fff;
  523. }
  524. .scan-btn {
  525. display: flex;
  526. flex-direction: column;
  527. align-items: center;
  528. background-color: #ff9f43;
  529. padding: 10rpx 30rpx;
  530. border-radius: 30rpx;
  531. font-size: 24rpx;
  532. }
  533. .interview-info {
  534. background-color: #0039b3;
  535. color: #fff;
  536. padding: 20rpx 30rpx 40rpx;
  537. }
  538. .info-item {
  539. margin: 10rpx 0;
  540. font-size: 28rpx;
  541. }
  542. .label {
  543. margin-right: 10rpx;
  544. }
  545. .form-container {
  546. flex: 1;
  547. background-color: #fff;
  548. padding: 40rpx 30rpx;
  549. }
  550. .form-title {
  551. font-size: 32rpx;
  552. font-weight: bold;
  553. margin-bottom: 40rpx;
  554. text-align: center;
  555. color: #333;
  556. }
  557. .form-item {
  558. margin-bottom: 30rpx;
  559. position: relative;
  560. }
  561. .validation-icon {
  562. position: absolute;
  563. right: 20rpx;
  564. top: 50%;
  565. transform: translateY(-50%);
  566. font-size: 36rpx;
  567. display: flex;
  568. align-items: center;
  569. justify-content: center;
  570. }
  571. .icon-success {
  572. color: #4cd964;
  573. }
  574. .icon-error {
  575. color: #ff3b30;
  576. }
  577. input {
  578. width: 100%;
  579. height: 80rpx;
  580. border: 1px solid #eee;
  581. border-radius: 8rpx;
  582. padding: 0 60rpx 0 20rpx;
  583. font-size: 28rpx;
  584. box-sizing: border-box;
  585. background-color: #f9f9f9;
  586. }
  587. .phone-item {
  588. display: flex;
  589. align-items: center;
  590. position: relative;
  591. }
  592. .phone-item .validation-icon {
  593. right: 20rpx;
  594. }
  595. .phone-item input {
  596. flex: 1;
  597. border-radius: 0 8rpx 8rpx 0;
  598. }
  599. .verify-btn {
  600. width: 100%;
  601. height: 90rpx;
  602. line-height: 90rpx;
  603. background-color: #0039b3;
  604. color: #fff;
  605. border-radius: 45rpx;
  606. font-size: 32rpx;
  607. margin-top: 60rpx;
  608. }
  609. .verify-btn[disabled] {
  610. background-color: #b2b2b2;
  611. color: #fff;
  612. opacity: 0.7;
  613. }
  614. .agreement {
  615. display: flex;
  616. align-items: center;
  617. margin-top: 30rpx;
  618. }
  619. .agreement-text {
  620. font-size: 24rpx;
  621. color: #666;
  622. line-height: 1.5;
  623. margin-left: 10rpx;
  624. }
  625. .agreement-link {
  626. color: #0039b3;
  627. }
  628. /* 职位列表样式 */
  629. .job-list-container {
  630. flex: 1;
  631. background-color: #fff;
  632. border-radius: 20rpx 20rpx 0 0;
  633. margin-top: -20rpx;
  634. padding: 40rpx 30rpx;
  635. }
  636. .job-list-title {
  637. font-size: 32rpx;
  638. font-weight: bold;
  639. margin-bottom: 30rpx;
  640. }
  641. .job-list {
  642. max-height: 800rpx;
  643. overflow-y: auto;
  644. }
  645. .job-item {
  646. padding: 30rpx;
  647. border-radius: 12rpx;
  648. background-color: #f8f9fa;
  649. margin-bottom: 20rpx;
  650. border: 2rpx solid transparent;
  651. }
  652. .job-selected {
  653. border-color: #0039b3;
  654. background-color: rgba(108, 92, 231, 0.1);
  655. }
  656. .job-name {
  657. font-size: 30rpx;
  658. font-weight: bold;
  659. margin-bottom: 10rpx;
  660. }
  661. .job-details {
  662. display: flex;
  663. justify-content: space-between;
  664. font-size: 24rpx;
  665. color: #666;
  666. }
  667. .job-salary {
  668. color: #ff6b6b;
  669. }
  670. .apply-btn {
  671. width: 100%;
  672. height: 90rpx;
  673. line-height: 90rpx;
  674. background-color: #0039b3;
  675. color: #fff;
  676. border-radius: 45rpx;
  677. font-size: 32rpx;
  678. margin-top: 40rpx;
  679. }
  680. .apply-btn[disabled] {
  681. background-color: #b2b2b2;
  682. color: #fff;
  683. }
  684. /* 修复国家代码样式 */
  685. .country-code {
  686. display: flex;
  687. align-items: center;
  688. justify-content: space-between;
  689. width: 100rpx;
  690. padding: 0 20rpx;
  691. height: 80rpx;
  692. border: 1px solid #eee;
  693. border-radius: 8rpx 0 0 8rpx;
  694. border-right: none;
  695. font-size: 28rpx;
  696. background-color: #f9f9f9;
  697. }
  698. .dropdown-icon {
  699. font-size: 20rpx;
  700. color: #999;
  701. margin-left: 10rpx;
  702. }
  703. /* 修复手机号输入框样式 */
  704. .phone-item {
  705. display: flex;
  706. align-items: center;
  707. position: relative;
  708. }
  709. .phone-item input {
  710. flex: 1;
  711. border-radius: 0 8rpx 8rpx 0;
  712. }
  713. /* 修复验证图标位置 */
  714. .validation-icon {
  715. position: absolute;
  716. right: 20rpx;
  717. top: 50%;
  718. transform: translateY(-50%);
  719. font-size: 36rpx;
  720. display: flex;
  721. align-items: center;
  722. justify-content: center;
  723. z-index: 2;
  724. }
  725. .phone-item .validation-icon {
  726. right: 20rpx;
  727. }
  728. /* 修改图标样式与图片一致 */
  729. .icon-success {
  730. color: #4cd964;
  731. font-weight: bold;
  732. }
  733. .icon-error {
  734. color: #ff3b30;
  735. font-weight: bold;
  736. }
  737. /* 修改性别选择样式,使其看起来像输入框 */
  738. .picker-input {
  739. position: relative;
  740. width: 100%;
  741. }
  742. .picker-input input {
  743. width: 100%;
  744. height: 80rpx;
  745. border: 1px solid #eee;
  746. border-radius: 8rpx;
  747. padding: 0 60rpx 0 20rpx;
  748. font-size: 28rpx;
  749. box-sizing: border-box;
  750. background-color: #f9f9f9;
  751. }
  752. .picker-input .dropdown-icon {
  753. position: absolute;
  754. right: 20rpx;
  755. top: 50%;
  756. transform: translateY(-50%);
  757. font-size: 24rpx;
  758. color: #999;
  759. }
  760. </style>