index.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922
  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"></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. // 获取当前职位配置
  292. getConfig(){
  293. uni.request({
  294. url: `${apiBaseUrl}/api/job/config/position/${this.selectedJobId}`,
  295. method: 'GET',
  296. data: {
  297. openid: JSON.parse(uni.getStorageSync('userInfo')).openid
  298. },
  299. header: {
  300. 'content-type': 'application/x-www-form-urlencoded'
  301. },
  302. success: (res) => {
  303. // 身份验证成功后,继续提交用户信息
  304. console.log(res);
  305. if (res.statusCode === 200) {
  306. if (res.data.code === 2000) {
  307. uni.setStorageSync('configData', JSON.stringify(res.data.data))
  308. } else {
  309. }
  310. } else {
  311. uni.hideLoading();
  312. }
  313. },
  314. fail: (err) => {
  315. uni.hideLoading();
  316. uni.showToast({
  317. title: '网络错误,请稍后重试',
  318. icon: 'none'
  319. });
  320. }
  321. });
  322. },
  323. applyForJob() {
  324. if (!this.checkLogin()) {
  325. return;
  326. }
  327. if (!this.selectedJobId) {
  328. uni.showToast({
  329. title: '请选择一个职位',
  330. icon: 'none'
  331. });
  332. return;
  333. }
  334. // 保存所选职位信息
  335. uni.setStorageSync('selectedJob', JSON.stringify(this.selectedJob));
  336. applyJob({
  337. job_id: this.selectedJobId,
  338. tenant_id: 1,
  339. openid: JSON.parse(uni.getStorageSync('userInfo')).openid
  340. }).then(res => {
  341. // 保存返回的应用ID到本地存储
  342. if (res && res.id) {
  343. // 将应用ID保存到本地
  344. uni.setStorageSync('appId', res.id);
  345. // 也可以更新已有的userInfo对象
  346. try {
  347. const userInfo = JSON.parse(uni.getStorageSync('userInfo') || '{}');
  348. userInfo.appId = res.id;
  349. uni.setStorageSync('userInfo', JSON.stringify(userInfo));
  350. } catch (e) {
  351. console.error('更新用户信息失败:', e);
  352. }
  353. }
  354. this.getConfig()
  355. uni.navigateTo({
  356. url: '/pages/Personal/Personal',
  357. fail: (err) => {
  358. console.error('页面跳转失败:', err);
  359. uni.showToast({
  360. title: '页面跳转失败',
  361. icon: 'none'
  362. });
  363. }
  364. });
  365. }).catch(err => {
  366. console.error('申请职位失败:', err);
  367. uni.showToast({
  368. title: '申请职位失败,请重试',
  369. icon: 'none'
  370. });
  371. });
  372. },
  373. submitForm() {
  374. if (!this.checkLogin()) {
  375. return;
  376. }
  377. if (!this.formData.name.trim()) {
  378. uni.showToast({
  379. title: '请输入姓名',
  380. icon: 'none'
  381. });
  382. return;
  383. }
  384. if (!this.formData.gender) {
  385. uni.showToast({
  386. title: '请选择性别',
  387. icon: 'none'
  388. });
  389. return;
  390. }
  391. if (!this.formData.phone.trim()) {
  392. uni.showToast({
  393. title: '请输入手机号',
  394. icon: 'none'
  395. });
  396. return;
  397. }
  398. if (!/^1\d{10}$/.test(this.formData.phone)) {
  399. uni.showToast({
  400. title: '请输入正确的手机号',
  401. icon: 'none'
  402. });
  403. return;
  404. }
  405. if (!this.formData.idCard.trim()) {
  406. uni.showToast({
  407. title: '请输入身份证号',
  408. icon: 'none'
  409. });
  410. return;
  411. }
  412. const idCardReg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
  413. if (!idCardReg.test(this.formData.idCard)) {
  414. uni.showToast({
  415. title: '请输入正确的身份证号',
  416. icon: 'none'
  417. });
  418. return;
  419. }
  420. if (!this.isAgreed) {
  421. uni.showToast({
  422. title: '请阅读并同意相关协议',
  423. icon: 'none'
  424. });
  425. return;
  426. }
  427. uni.showLoading({
  428. title: '验证身份信息...'
  429. });
  430. // 先调用身份验证接口
  431. uni.request({
  432. url: `${apiBaseUrl}/wechat/identity/verify`,
  433. method: 'POST',
  434. data: {
  435. name: this.formData.name,
  436. id_number: this.formData.idCard,
  437. mobile: this.formData.phone
  438. },
  439. header: {
  440. 'content-type': 'application/x-www-form-urlencoded'
  441. },
  442. success: (res) => {
  443. // 身份验证成功后,继续提交用户信息
  444. console.log(res);
  445. if (res.statusCode === 200) {
  446. if (res.data.code === 200) {
  447. this.submitUserInfo();
  448. } else {
  449. uni.showToast({
  450. title: res.data.data.message,
  451. icon: 'none'
  452. });
  453. }
  454. } else {
  455. uni.hideLoading();
  456. uni.showToast({
  457. title: '身份验证失败,请检查信息是否正确',
  458. icon: 'none'
  459. });
  460. }
  461. },
  462. fail: (err) => {
  463. uni.hideLoading();
  464. console.error('身份验证失败:', err);
  465. uni.showToast({
  466. title: '网络错误,请稍后重试',
  467. icon: 'none'
  468. });
  469. }
  470. });
  471. },
  472. submitUserInfo() {
  473. const genderValue = this.genderMapping[this.formData.gender] || this.formData.gender;
  474. const submitData = {
  475. openid: JSON.parse(uni.getStorageSync('userInfo') || '{}').openid || '',
  476. name: this.formData.name,
  477. phone: this.formData.phone,
  478. id_card: this.formData.idCard,
  479. status: 1,
  480. source: 'mini',
  481. examine: 0,
  482. tenant_id: '1',
  483. /* emergency_contact: this.formData.emergencyContact,
  484. emergency_phone: this.formData.emergencyPhone,
  485. relation: this.formData.relation, */
  486. age: '20',
  487. job_id: this.selectedJobId,
  488. gender: genderValue
  489. };
  490. fillUserInfo(submitData)
  491. .then(res => {
  492. uni.hideLoading();
  493. this.updateLocalUserInfo(res.id,JSON.parse(uni.getStorageSync('userInfo')).openid);
  494. uni.showToast({
  495. title: '提交成功',
  496. icon: 'success',
  497. duration: 1500,
  498. success: () => {
  499. this.userInfoFilled = false;
  500. // setTimeout(() => {
  501. // }, 1500);
  502. }
  503. });
  504. })
  505. .catch(err => {
  506. uni.hideLoading();
  507. console.error('提交表单失败:', err);
  508. uni.showToast({
  509. title: '网络错误,请稍后重试',
  510. icon: 'none'
  511. });
  512. });
  513. },
  514. updateLocalUserInfo(data) {
  515. getUserInfo(data)
  516. .then(res => {
  517. if (res.code === 200 && res.data) {
  518. let userInfo = {};
  519. try {
  520. userInfo = JSON.parse(uni.getStorageSync('userInfo') || '{}');
  521. } catch (e) {
  522. console.error('解析本地存储用户信息失败:', e);
  523. userInfo = {};
  524. }
  525. const updatedUserInfo = {
  526. ...userInfo,
  527. ...res.data
  528. };
  529. uni.setStorageSync('userInfo', JSON.stringify(updatedUserInfo));
  530. }
  531. })
  532. .catch(err => {
  533. console.error('更新本地用户信息失败:', err);
  534. });
  535. },
  536. validatePhone() {
  537. this.isPhoneValid = /^1\d{10}$/.test(this.formData.phone);
  538. },
  539. validateName() {
  540. this.isNameValid = this.formData.name.trim().length >= 2;
  541. },
  542. validateIdCard() {
  543. const idCardReg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
  544. this.isIdCardValid = idCardReg.test(this.formData.idCard);
  545. },
  546. genderChange(e) {
  547. this.genderIndex = e.detail.value;
  548. const displayGender = this.genderOptions[this.genderIndex];
  549. this.formData.gender = displayGender;
  550. },
  551. viewJobDetail(job) {
  552. // 保存所选职位信息到本地存储
  553. uni.setStorageSync('currentJobDetail', JSON.stringify(job));
  554. console.log(job);
  555. // 跳转到职位详情页面
  556. uni.navigateTo({
  557. url: '/pages/job-detail/job-detail?id=' + job.id,
  558. fail: (err) => {
  559. console.error('页面跳转失败:', err);
  560. uni.showToast({
  561. title: '页面跳转失败',
  562. icon: 'none'
  563. });
  564. }
  565. });
  566. }
  567. }
  568. }
  569. </script>
  570. <style>
  571. .interview-container {
  572. display: flex;
  573. flex-direction: column;
  574. min-height: 100vh;
  575. background-color: #f5f7fa;
  576. }
  577. .nav-bar {
  578. display: flex;
  579. justify-content: space-between;
  580. align-items: center;
  581. padding: 20rpx 30rpx;
  582. background-color: #0039b3;
  583. color: #fff;
  584. }
  585. .scan-btn {
  586. display: flex;
  587. flex-direction: column;
  588. align-items: center;
  589. background-color: #ff9f43;
  590. padding: 10rpx 30rpx;
  591. border-radius: 30rpx;
  592. font-size: 24rpx;
  593. }
  594. .interview-info {
  595. background-color: #0039b3;
  596. color: #fff;
  597. padding: 20rpx 30rpx 40rpx;
  598. }
  599. .info-item {
  600. margin: 10rpx 0;
  601. font-size: 28rpx;
  602. }
  603. .label {
  604. margin-right: 10rpx;
  605. }
  606. .form-container {
  607. flex: 1;
  608. background-color: #fff;
  609. padding: 40rpx 30rpx;
  610. }
  611. .form-title {
  612. font-size: 32rpx;
  613. font-weight: bold;
  614. margin-bottom: 40rpx;
  615. text-align: center;
  616. color: #333;
  617. }
  618. .form-item {
  619. margin-bottom: 30rpx;
  620. position: relative;
  621. }
  622. .validation-icon {
  623. position: absolute;
  624. right: 20rpx;
  625. top: 50%;
  626. transform: translateY(-50%);
  627. font-size: 36rpx;
  628. display: flex;
  629. align-items: center;
  630. justify-content: center;
  631. }
  632. .icon-success {
  633. color: #4cd964;
  634. }
  635. .icon-error {
  636. color: #ff3b30;
  637. }
  638. input {
  639. width: 100%;
  640. height: 80rpx;
  641. border: 1px solid #eee;
  642. border-radius: 8rpx;
  643. padding: 0 60rpx 0 20rpx;
  644. font-size: 28rpx;
  645. box-sizing: border-box;
  646. background-color: #f9f9f9;
  647. }
  648. .phone-item {
  649. display: flex;
  650. align-items: center;
  651. position: relative;
  652. }
  653. .phone-item .validation-icon {
  654. right: 20rpx;
  655. }
  656. .phone-item input {
  657. flex: 1;
  658. border-radius: 0 8rpx 8rpx 0;
  659. }
  660. .verify-btn {
  661. width: 100%;
  662. height: 90rpx;
  663. line-height: 90rpx;
  664. background-color: #0039b3;
  665. color: #fff;
  666. border-radius: 45rpx;
  667. font-size: 32rpx;
  668. margin-top: 60rpx;
  669. }
  670. .verify-btn[disabled] {
  671. background-color: #b2b2b2;
  672. color: #fff;
  673. opacity: 0.7;
  674. }
  675. .agreement {
  676. display: flex;
  677. align-items: center;
  678. margin-top: 30rpx;
  679. }
  680. .agreement-text {
  681. font-size: 24rpx;
  682. color: #666;
  683. line-height: 1.5;
  684. margin-left: 10rpx;
  685. }
  686. .agreement-link {
  687. color: #0039b3;
  688. }
  689. /* 职位列表样式 */
  690. .job-list-container {
  691. flex: 1;
  692. background-color: #fff;
  693. border-radius: 20rpx 20rpx 0 0;
  694. margin-top: -20rpx;
  695. padding: 40rpx 30rpx;
  696. }
  697. .job-list-title {
  698. font-size: 32rpx;
  699. font-weight: bold;
  700. margin-bottom: 30rpx;
  701. }
  702. .job-list {
  703. max-height: 1000rpx;
  704. overflow-y: auto;
  705. }
  706. .job-item {
  707. padding: 30rpx;
  708. border-radius: 12rpx;
  709. background-color: #f8f9fa;
  710. margin-bottom: 20rpx;
  711. border: 2rpx solid transparent;
  712. }
  713. .job-selected {
  714. border-color: #0039b3;
  715. background-color: rgba(108, 92, 231, 0.1);
  716. }
  717. .job-name {
  718. font-size: 30rpx;
  719. font-weight: bold;
  720. margin-bottom: 10rpx;
  721. }
  722. .job-details {
  723. display: flex;
  724. justify-content: space-between;
  725. font-size: 24rpx;
  726. color: #666;
  727. }
  728. .job-salary {
  729. color: #fb752f;
  730. }
  731. .apply-btn {
  732. width: 100%;
  733. height: 90rpx;
  734. line-height: 90rpx;
  735. background-color: #0039b3;
  736. color: #fff;
  737. border-radius: 45rpx;
  738. font-size: 32rpx;
  739. margin-top: 40rpx;
  740. }
  741. .apply-btn[disabled] {
  742. background-color: #b2b2b2;
  743. color: #fff;
  744. }
  745. /* 修复国家代码样式 */
  746. .country-code {
  747. display: flex;
  748. align-items: center;
  749. justify-content: space-between;
  750. width: 100rpx;
  751. padding: 0 20rpx;
  752. height: 80rpx;
  753. border: 1px solid #eee;
  754. border-radius: 8rpx 0 0 8rpx;
  755. border-right: none;
  756. font-size: 28rpx;
  757. background-color: #f9f9f9;
  758. }
  759. .dropdown-icon {
  760. font-size: 20rpx;
  761. color: #999;
  762. margin-left: 10rpx;
  763. }
  764. /* 修复手机号输入框样式 */
  765. .phone-item {
  766. display: flex;
  767. align-items: center;
  768. position: relative;
  769. }
  770. .phone-item input {
  771. flex: 1;
  772. border-radius: 0 8rpx 8rpx 0;
  773. }
  774. /* 修复验证图标位置 */
  775. .validation-icon {
  776. position: absolute;
  777. right: 20rpx;
  778. top: 50%;
  779. transform: translateY(-50%);
  780. font-size: 36rpx;
  781. display: flex;
  782. align-items: center;
  783. justify-content: center;
  784. z-index: 2;
  785. }
  786. .phone-item .validation-icon {
  787. right: 20rpx;
  788. }
  789. /* 修改图标样式与图片一致 */
  790. .icon-success {
  791. color: #4cd964;
  792. font-weight: bold;
  793. }
  794. .icon-error {
  795. color: #ff3b30;
  796. font-weight: bold;
  797. }
  798. /* 修改性别选择样式,使其看起来像输入框 */
  799. .picker-input {
  800. position: relative;
  801. width: 100%;
  802. }
  803. .picker-input input {
  804. width: 100%;
  805. height: 80rpx;
  806. border: 1px solid #eee;
  807. border-radius: 8rpx;
  808. padding: 0 60rpx 0 20rpx;
  809. font-size: 28rpx;
  810. box-sizing: border-box;
  811. background-color: #f9f9f9;
  812. }
  813. .picker-input .dropdown-icon {
  814. position: absolute;
  815. right: 20rpx;
  816. top: 50%;
  817. transform: translateY(-50%);
  818. font-size: 24rpx;
  819. color: #999;
  820. }
  821. .job-actions {
  822. display: flex;
  823. justify-content: flex-end;
  824. margin-top: 15rpx;
  825. margin-bottom: 15rpx;
  826. }
  827. .detail-btn {
  828. background-color: #0039b3;
  829. color: #fff;
  830. font-size: 24rpx;
  831. padding: 6rpx 20rpx;
  832. border-radius: 30rpx;
  833. line-height: 1.5;
  834. margin: 0;
  835. min-height: auto;
  836. }
  837. </style>