index.vue 22 KB

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