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. console.log(job);
  522. // 跳转到职位详情页面
  523. uni.navigateTo({
  524. url: '/pages/job-detail/job-detail?id=' + job.id,
  525. fail: (err) => {
  526. console.error('页面跳转失败:', err);
  527. uni.showToast({
  528. title: '页面跳转失败',
  529. icon: 'none'
  530. });
  531. }
  532. });
  533. }
  534. }
  535. }
  536. </script>
  537. <style>
  538. .interview-container {
  539. display: flex;
  540. flex-direction: column;
  541. min-height: 100vh;
  542. background-color: #f5f7fa;
  543. }
  544. .nav-bar {
  545. display: flex;
  546. justify-content: space-between;
  547. align-items: center;
  548. padding: 20rpx 30rpx;
  549. background-color: #0039b3;
  550. color: #fff;
  551. }
  552. .scan-btn {
  553. display: flex;
  554. flex-direction: column;
  555. align-items: center;
  556. background-color: #ff9f43;
  557. padding: 10rpx 30rpx;
  558. border-radius: 30rpx;
  559. font-size: 24rpx;
  560. }
  561. .interview-info {
  562. background-color: #0039b3;
  563. color: #fff;
  564. padding: 20rpx 30rpx 40rpx;
  565. }
  566. .info-item {
  567. margin: 10rpx 0;
  568. font-size: 28rpx;
  569. }
  570. .label {
  571. margin-right: 10rpx;
  572. }
  573. .form-container {
  574. flex: 1;
  575. background-color: #fff;
  576. padding: 40rpx 30rpx;
  577. }
  578. .form-title {
  579. font-size: 32rpx;
  580. font-weight: bold;
  581. margin-bottom: 40rpx;
  582. text-align: center;
  583. color: #333;
  584. }
  585. .form-item {
  586. margin-bottom: 30rpx;
  587. position: relative;
  588. }
  589. .validation-icon {
  590. position: absolute;
  591. right: 20rpx;
  592. top: 50%;
  593. transform: translateY(-50%);
  594. font-size: 36rpx;
  595. display: flex;
  596. align-items: center;
  597. justify-content: center;
  598. }
  599. .icon-success {
  600. color: #4cd964;
  601. }
  602. .icon-error {
  603. color: #ff3b30;
  604. }
  605. input {
  606. width: 100%;
  607. height: 80rpx;
  608. border: 1px solid #eee;
  609. border-radius: 8rpx;
  610. padding: 0 60rpx 0 20rpx;
  611. font-size: 28rpx;
  612. box-sizing: border-box;
  613. background-color: #f9f9f9;
  614. }
  615. .phone-item {
  616. display: flex;
  617. align-items: center;
  618. position: relative;
  619. }
  620. .phone-item .validation-icon {
  621. right: 20rpx;
  622. }
  623. .phone-item input {
  624. flex: 1;
  625. border-radius: 0 8rpx 8rpx 0;
  626. }
  627. .verify-btn {
  628. width: 100%;
  629. height: 90rpx;
  630. line-height: 90rpx;
  631. background-color: #0039b3;
  632. color: #fff;
  633. border-radius: 45rpx;
  634. font-size: 32rpx;
  635. margin-top: 60rpx;
  636. }
  637. .verify-btn[disabled] {
  638. background-color: #b2b2b2;
  639. color: #fff;
  640. opacity: 0.7;
  641. }
  642. .agreement {
  643. display: flex;
  644. align-items: center;
  645. margin-top: 30rpx;
  646. }
  647. .agreement-text {
  648. font-size: 24rpx;
  649. color: #666;
  650. line-height: 1.5;
  651. margin-left: 10rpx;
  652. }
  653. .agreement-link {
  654. color: #0039b3;
  655. }
  656. /* 职位列表样式 */
  657. .job-list-container {
  658. flex: 1;
  659. background-color: #fff;
  660. border-radius: 20rpx 20rpx 0 0;
  661. margin-top: -20rpx;
  662. padding: 40rpx 30rpx;
  663. }
  664. .job-list-title {
  665. font-size: 32rpx;
  666. font-weight: bold;
  667. margin-bottom: 30rpx;
  668. }
  669. .job-list {
  670. max-height: 1000rpx;
  671. overflow-y: auto;
  672. }
  673. .job-item {
  674. padding: 30rpx;
  675. border-radius: 12rpx;
  676. background-color: #f8f9fa;
  677. margin-bottom: 20rpx;
  678. border: 2rpx solid transparent;
  679. }
  680. .job-selected {
  681. border-color: #0039b3;
  682. background-color: rgba(108, 92, 231, 0.1);
  683. }
  684. .job-name {
  685. font-size: 30rpx;
  686. font-weight: bold;
  687. margin-bottom: 10rpx;
  688. }
  689. .job-details {
  690. display: flex;
  691. justify-content: space-between;
  692. font-size: 24rpx;
  693. color: #666;
  694. }
  695. .job-salary {
  696. color: #fb752f;
  697. }
  698. .apply-btn {
  699. width: 100%;
  700. height: 90rpx;
  701. line-height: 90rpx;
  702. background-color: #0039b3;
  703. color: #fff;
  704. border-radius: 45rpx;
  705. font-size: 32rpx;
  706. margin-top: 40rpx;
  707. }
  708. .apply-btn[disabled] {
  709. background-color: #b2b2b2;
  710. color: #fff;
  711. }
  712. /* 修复国家代码样式 */
  713. .country-code {
  714. display: flex;
  715. align-items: center;
  716. justify-content: space-between;
  717. width: 100rpx;
  718. padding: 0 20rpx;
  719. height: 80rpx;
  720. border: 1px solid #eee;
  721. border-radius: 8rpx 0 0 8rpx;
  722. border-right: none;
  723. font-size: 28rpx;
  724. background-color: #f9f9f9;
  725. }
  726. .dropdown-icon {
  727. font-size: 20rpx;
  728. color: #999;
  729. margin-left: 10rpx;
  730. }
  731. /* 修复手机号输入框样式 */
  732. .phone-item {
  733. display: flex;
  734. align-items: center;
  735. position: relative;
  736. }
  737. .phone-item input {
  738. flex: 1;
  739. border-radius: 0 8rpx 8rpx 0;
  740. }
  741. /* 修复验证图标位置 */
  742. .validation-icon {
  743. position: absolute;
  744. right: 20rpx;
  745. top: 50%;
  746. transform: translateY(-50%);
  747. font-size: 36rpx;
  748. display: flex;
  749. align-items: center;
  750. justify-content: center;
  751. z-index: 2;
  752. }
  753. .phone-item .validation-icon {
  754. right: 20rpx;
  755. }
  756. /* 修改图标样式与图片一致 */
  757. .icon-success {
  758. color: #4cd964;
  759. font-weight: bold;
  760. }
  761. .icon-error {
  762. color: #ff3b30;
  763. font-weight: bold;
  764. }
  765. /* 修改性别选择样式,使其看起来像输入框 */
  766. .picker-input {
  767. position: relative;
  768. width: 100%;
  769. }
  770. .picker-input input {
  771. width: 100%;
  772. height: 80rpx;
  773. border: 1px solid #eee;
  774. border-radius: 8rpx;
  775. padding: 0 60rpx 0 20rpx;
  776. font-size: 28rpx;
  777. box-sizing: border-box;
  778. background-color: #f9f9f9;
  779. }
  780. .picker-input .dropdown-icon {
  781. position: absolute;
  782. right: 20rpx;
  783. top: 50%;
  784. transform: translateY(-50%);
  785. font-size: 24rpx;
  786. color: #999;
  787. }
  788. .job-actions {
  789. display: flex;
  790. justify-content: flex-end;
  791. margin-top: 15rpx;
  792. margin-bottom: 15rpx;
  793. }
  794. .detail-btn {
  795. background-color: #0039b3;
  796. color: #fff;
  797. font-size: 24rpx;
  798. padding: 6rpx 20rpx;
  799. border-radius: 30rpx;
  800. line-height: 1.5;
  801. margin: 0;
  802. min-height: auto;
  803. }
  804. </style>