index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952
  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">{{formatLocation(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. formatLocation(location) {
  568. if (!location) return '';
  569. // 处理字符串形式的数组
  570. if (typeof location === 'string' && location.startsWith('[')) {
  571. try {
  572. const locationArray = JSON.parse(location.replace(/'/g, '"'));
  573. return locationArray.join(' ');
  574. } catch (e) {
  575. console.error('解析location失败:', e);
  576. return location;
  577. }
  578. }
  579. // 处理数组格式
  580. if (Array.isArray(location)) {
  581. return location.join(' ');
  582. }
  583. // 处理对象格式
  584. if (typeof location === 'object' && location !== null) {
  585. const { province, city, district } = location;
  586. if (province && city) {
  587. return province + ' ' + city + (district ? ' ' + district : '');
  588. }
  589. }
  590. // 处理普通字符串格式
  591. return location;
  592. }
  593. }
  594. }
  595. </script>
  596. <style>
  597. .interview-container {
  598. display: flex;
  599. flex-direction: column;
  600. min-height: 100vh;
  601. background-color: #f5f7fa;
  602. }
  603. .nav-bar {
  604. display: flex;
  605. justify-content: space-between;
  606. align-items: center;
  607. padding: 20rpx 30rpx;
  608. background-color: #0039b3;
  609. color: #fff;
  610. }
  611. .scan-btn {
  612. display: flex;
  613. flex-direction: column;
  614. align-items: center;
  615. background-color: #ff9f43;
  616. padding: 10rpx 30rpx;
  617. border-radius: 30rpx;
  618. font-size: 24rpx;
  619. }
  620. .interview-info {
  621. background-color: #0039b3;
  622. color: #fff;
  623. padding: 20rpx 30rpx 40rpx;
  624. }
  625. .info-item {
  626. margin: 10rpx 0;
  627. font-size: 28rpx;
  628. }
  629. .label {
  630. margin-right: 10rpx;
  631. }
  632. .form-container {
  633. flex: 1;
  634. background-color: #fff;
  635. padding: 40rpx 30rpx;
  636. }
  637. .form-title {
  638. font-size: 32rpx;
  639. font-weight: bold;
  640. margin-bottom: 40rpx;
  641. text-align: center;
  642. color: #333;
  643. }
  644. .form-item {
  645. margin-bottom: 30rpx;
  646. position: relative;
  647. }
  648. .validation-icon {
  649. position: absolute;
  650. right: 20rpx;
  651. top: 50%;
  652. transform: translateY(-50%);
  653. font-size: 36rpx;
  654. display: flex;
  655. align-items: center;
  656. justify-content: center;
  657. }
  658. .icon-success {
  659. color: #4cd964;
  660. }
  661. .icon-error {
  662. color: #ff3b30;
  663. }
  664. input {
  665. width: 100%;
  666. height: 80rpx;
  667. border: 1px solid #eee;
  668. border-radius: 8rpx;
  669. padding: 0 60rpx 0 20rpx;
  670. font-size: 28rpx;
  671. box-sizing: border-box;
  672. background-color: #f9f9f9;
  673. }
  674. .phone-item {
  675. display: flex;
  676. align-items: center;
  677. position: relative;
  678. }
  679. .phone-item .validation-icon {
  680. right: 20rpx;
  681. }
  682. .phone-item input {
  683. flex: 1;
  684. border-radius: 0 8rpx 8rpx 0;
  685. }
  686. .verify-btn {
  687. width: 100%;
  688. height: 90rpx;
  689. line-height: 90rpx;
  690. background-color: #0039b3;
  691. color: #fff;
  692. border-radius: 45rpx;
  693. font-size: 32rpx;
  694. margin-top: 60rpx;
  695. }
  696. .verify-btn[disabled] {
  697. background-color: #b2b2b2;
  698. color: #fff;
  699. opacity: 0.7;
  700. }
  701. .agreement {
  702. display: flex;
  703. align-items: center;
  704. margin-top: 30rpx;
  705. }
  706. .agreement-text {
  707. font-size: 24rpx;
  708. color: #666;
  709. line-height: 1.5;
  710. margin-left: 10rpx;
  711. }
  712. .agreement-link {
  713. color: #0039b3;
  714. }
  715. /* 职位列表样式 */
  716. .job-list-container {
  717. flex: 1;
  718. background-color: #fff;
  719. border-radius: 20rpx 20rpx 0 0;
  720. margin-top: -20rpx;
  721. padding: 40rpx 30rpx;
  722. }
  723. .job-list-title {
  724. font-size: 32rpx;
  725. font-weight: bold;
  726. margin-bottom: 30rpx;
  727. }
  728. .job-list {
  729. max-height: 1000rpx;
  730. overflow-y: auto;
  731. }
  732. .job-item {
  733. padding: 30rpx;
  734. border-radius: 12rpx;
  735. background-color: #f8f9fa;
  736. margin-bottom: 20rpx;
  737. border: 2rpx solid transparent;
  738. }
  739. .job-selected {
  740. border-color: #0039b3;
  741. background-color: rgba(108, 92, 231, 0.1);
  742. }
  743. .job-name {
  744. font-size: 30rpx;
  745. font-weight: bold;
  746. margin-bottom: 10rpx;
  747. }
  748. .job-details {
  749. display: flex;
  750. justify-content: space-between;
  751. font-size: 24rpx;
  752. color: #666;
  753. }
  754. .job-salary {
  755. color: #fb752f;
  756. }
  757. .apply-btn {
  758. width: 100%;
  759. height: 90rpx;
  760. line-height: 90rpx;
  761. background-color: #0039b3;
  762. color: #fff;
  763. border-radius: 45rpx;
  764. font-size: 32rpx;
  765. margin-top: 40rpx;
  766. }
  767. .apply-btn[disabled] {
  768. background-color: #b2b2b2;
  769. color: #fff;
  770. }
  771. /* 修复国家代码样式 */
  772. .country-code {
  773. display: flex;
  774. align-items: center;
  775. justify-content: space-between;
  776. width: 100rpx;
  777. padding: 0 20rpx;
  778. height: 80rpx;
  779. border: 1px solid #eee;
  780. border-radius: 8rpx 0 0 8rpx;
  781. border-right: none;
  782. font-size: 28rpx;
  783. background-color: #f9f9f9;
  784. }
  785. .dropdown-icon {
  786. font-size: 20rpx;
  787. color: #999;
  788. margin-left: 10rpx;
  789. }
  790. /* 修复手机号输入框样式 */
  791. .phone-item {
  792. display: flex;
  793. align-items: center;
  794. position: relative;
  795. }
  796. .phone-item input {
  797. flex: 1;
  798. border-radius: 0 8rpx 8rpx 0;
  799. }
  800. /* 修复验证图标位置 */
  801. .validation-icon {
  802. position: absolute;
  803. right: 20rpx;
  804. top: 50%;
  805. transform: translateY(-50%);
  806. font-size: 36rpx;
  807. display: flex;
  808. align-items: center;
  809. justify-content: center;
  810. z-index: 2;
  811. }
  812. .phone-item .validation-icon {
  813. right: 20rpx;
  814. }
  815. /* 修改图标样式与图片一致 */
  816. .icon-success {
  817. color: #4cd964;
  818. font-weight: bold;
  819. }
  820. .icon-error {
  821. color: #ff3b30;
  822. font-weight: bold;
  823. }
  824. /* 修改性别选择样式,使其看起来像输入框 */
  825. .picker-input {
  826. position: relative;
  827. width: 100%;
  828. }
  829. .picker-input input {
  830. width: 100%;
  831. height: 80rpx;
  832. border: 1px solid #eee;
  833. border-radius: 8rpx;
  834. padding: 0 60rpx 0 20rpx;
  835. font-size: 28rpx;
  836. box-sizing: border-box;
  837. background-color: #f9f9f9;
  838. }
  839. .picker-input .dropdown-icon {
  840. position: absolute;
  841. right: 20rpx;
  842. top: 50%;
  843. transform: translateY(-50%);
  844. font-size: 24rpx;
  845. color: #999;
  846. }
  847. .job-actions {
  848. display: flex;
  849. justify-content: flex-end;
  850. margin-top: 15rpx;
  851. margin-bottom: 15rpx;
  852. }
  853. .detail-btn {
  854. background-color: #0039b3;
  855. color: #fff;
  856. font-size: 24rpx;
  857. padding: 6rpx 20rpx;
  858. border-radius: 30rpx;
  859. line-height: 1.5;
  860. margin: 0;
  861. min-height: auto;
  862. }
  863. </style>