index.vue 24 KB

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