index.vue 20 KB

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