jobPostingSecond.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821
  1. <template>
  2. <view class="switch-roles">
  3. <nav-bar title="岗位要求" color="#000"></nav-bar>
  4. <view class="roles-content">
  5. <view class="content">
  6. <view class="title">继续填写</view>
  7. <view class="step-progress flex align-center">
  8. <view class="circle-wrapper">
  9. <view class="check-icon check-active">
  10. <u-icon name="checkbox-mark" color="#fff" size="20"></u-icon>
  11. </view>
  12. <view class="step-progress-text">填写基本信息</view>
  13. </view>
  14. <view class="line blue"></view>
  15. <view class="line blue"></view>
  16. <view class="circle-wrapper">
  17. <view class="check-icon check-active">
  18. <u-icon name="checkbox-mark" color="#fff" size="20"></u-icon>
  19. </view>
  20. <view class="step-progress-text">填写岗位要求</view>
  21. </view>
  22. </view>
  23. <!-- 经验要求 -->
  24. <view class="check-title-big">经验要求</view>
  25. <view class="check-select" @click="showExper = true">
  26. <view class="select-txt">{{ selectedExper || "请选择经验要求" }}</view>
  27. <u-icon name="arrow-down" color="#D3D3D6" size="22"></u-icon>
  28. </view>
  29. <!-- 最低学历 -->
  30. <view class="check-title-big">最低学历</view>
  31. <view class="check-select" @click="showLevel = true">
  32. <view class="select-txt">{{ selectedLevel || "请选择学历" }}</view>
  33. <u-icon name="arrow-down" color="#D3D3D6" size="22"></u-icon>
  34. </view>
  35. <!-- 薪资范围 -->
  36. <view class="check-title-big">薪资范围</view>
  37. <view class="check-select" @click="showMoney = true">
  38. <view class="select-txt">
  39. <template v-if="selectedSalary">{{ selectedSalary + ' · ' + salaryTimes }}</template>
  40. <template v-else>请选择合理的薪资范围</template>
  41. </view>
  42. <u-icon name="arrow-down" color="#D3D3D6" size="22"></u-icon>
  43. </view>
  44. <!-- 跨境标签 -->
  45. <view class="check-title-big">跨境标签</view>
  46. <view class="check-select" @click="goJobSkill">
  47. <view class="select-txt">{{ positionTag && positionTag.length > 0 ? positionTag.join(',') :
  48. "被选中的关键词将突出展示给牛人" }}</view>
  49. <u-icon name="arrow-down" color="#D3D3D6" size="22"></u-icon>
  50. </view>
  51. <!-- 福利待遇 -->
  52. <view class="check-title-big">福利待遇(选填)</view>
  53. <view class="check-select" @click="goFund">
  54. <view class="select-txt">{{ welfareValue || "请填写奖金绩效" }}</view>
  55. <u-icon name="arrow-down" color="#D3D3D6" size="22"></u-icon>
  56. </view>
  57. <!-- 工作地址 -->
  58. <view class="check-title-big">工作地址</view>
  59. <view class="check-select" @click="goAddAddress">
  60. <view class="select-txt">{{ address || stationName.fullText || "请填写精确的工作地点" }}</view>
  61. <u-icon name="arrow-down" color="#D3D3D6" size="22"></u-icon>
  62. </view>
  63. <view class="txt-desc">
  64. 温馨提示:职位类型、职位名称和工作城市发布后不可修改,请您确保信息正确 <br /><br />
  65. 发布职位即表示同意遵守《招聘行为管理规范》,如违反规则将导致账号被锁定
  66. </view>
  67. </view>
  68. </view>
  69. <view class="button-section">
  70. <view class="link-btn" v-if="showNotPushBtn" @click="handleToIndex">稍后发布</view>
  71. <view class="submit-btn" @click="submitPost">发布</view>
  72. </view>
  73. <!-- 经验选择器 -->
  74. <u-select v-model="showExper" :list="listExper" title="请选择经验" @confirm="onExperConfirm"
  75. @cancel="showExper = false"></u-select>
  76. <!-- 学历选择器 -->
  77. <u-select v-model="showLevel" :list="listLevel" title="请选择学历" @confirm="onLevelConfirm"
  78. @cancel="showLevel = false"></u-select>
  79. <!-- 薪资选择器 -->
  80. <u-select v-model="showMoney" mode="mutil-column" :list="listMoney" title="请选择月薪范围" @confirm="onMoneyConfirm"
  81. @cancel="showMoney = false"></u-select>
  82. </view>
  83. </template>
  84. <script>
  85. import navBar from "@/components/nav-bar/index.vue";
  86. export default {
  87. data() {
  88. return {
  89. // 选中值(用于页面渲染)
  90. selectedExper: "", // 经验
  91. selectedLevel: "", // 学历
  92. selectedSalary: "", // 薪资范围
  93. welfareTag: "", // 福利待遇
  94. welfareText: '', // 福利待遇描述
  95. positionTag: "", // 职位关键词
  96. stationName: [],
  97. companyName: "",
  98. companyId: "",
  99. status: 1,
  100. pid: "",
  101. address: "",
  102. salaryTimes: "",
  103. jobTitle: '',
  104. // 选择器显示控制
  105. showExper: false,
  106. showLevel: false,
  107. showMoney: false,
  108. // isBack: false,
  109. // 经验选择数据源
  110. listExper: [{
  111. label: "不限",
  112. value: "不限"
  113. },
  114. {
  115. label: "1年以内",
  116. value: "1年以内"
  117. },
  118. {
  119. label: "1-3年",
  120. value: "1-3年"
  121. },
  122. {
  123. label: "3-5年",
  124. value: "3-5年"
  125. },
  126. {
  127. label: "5-8年",
  128. value: "5-8年"
  129. },
  130. {
  131. label: "8年以上",
  132. value: "8年以上"
  133. },
  134. ],
  135. // 学历选择数据源
  136. listLevel: [{
  137. label: "不限",
  138. value: "不限"
  139. },
  140. {
  141. label: "专科",
  142. value: "专科"
  143. },
  144. {
  145. label: "本科",
  146. value: "本科"
  147. },
  148. {
  149. label: "硕士",
  150. value: "硕士"
  151. },
  152. {
  153. label: "博士",
  154. value: "博士"
  155. },
  156. ],
  157. // 薪资选择数据源(修正格式)
  158. listMoney: [
  159. [
  160. { value: "3k", label: "3k" },
  161. { value: "4k", label: "4k" },
  162. { value: "5k", label: "5k" },
  163. { value: "6k", label: "6k" },
  164. { value: "7k", label: "7k" },
  165. { value: "8k", label: "8k" },
  166. { value: "10k", label: "10k" },
  167. { value: "12k", label: "12k" },
  168. { value: "15k", label: "15k" },
  169. { value: "18k", label: "18k" },
  170. { value: "20k", label: "20k" },
  171. { value: "25k", label: "25k" },
  172. { value: "30k", label: "30k" },
  173. { value: "35k", label: "35k" },
  174. { value: "40k", label: "40k" },
  175. { value: "45k", label: "45k" },
  176. { value: "50k", label: "50k" },
  177. { value: "55k", label: "55k" },
  178. { value: "60k", label: "60k" },
  179. { value: "65k", label: "65k" },
  180. { value: "70k", label: "70k" },
  181. { value: "75k", label: "75k" },
  182. { value: "80k", label: "80k" },
  183. { value: "85k", label: "85k" },
  184. { value: "90k", label: "90k" },
  185. { value: "95k", label: "95k" },
  186. { value: "100k", label: "100k" }
  187. ],
  188. [
  189. { value: "3k", label: "3k" },
  190. { value: "4k", label: "4k" },
  191. { value: "5k", label: "5k" },
  192. { value: "6k", label: "6k" },
  193. { value: "7k", label: "7k" },
  194. { value: "8k", label: "8k" },
  195. { value: "10k", label: "10k" },
  196. { value: "12k", label: "12k" },
  197. { value: "15k", label: "15k" },
  198. { value: "18k", label: "18k" },
  199. { value: "20k", label: "20k" },
  200. { value: "25k", label: "25k" },
  201. { value: "30k", label: "30k" },
  202. { value: "35k", label: "35k" },
  203. { value: "40k", label: "40k" },
  204. { value: "45k", label: "45k" },
  205. { value: "50k", label: "50k" },
  206. { value: "55k", label: "55k" },
  207. { value: "60k", label: "60k" },
  208. { value: "65k", label: "65k" },
  209. { value: "70k", label: "70k" },
  210. { value: "75k", label: "75k" },
  211. { value: "80k", label: "80k" },
  212. { value: "85k", label: "85k" },
  213. { value: "90k", label: "90k" },
  214. { value: "95k", label: "95k" },
  215. { value: "100k", label: "100k" }
  216. ],
  217. [
  218. { value: "12薪", label: "12薪" },
  219. { value: "13薪", label: "13薪" },
  220. { value: "14薪", label: "14薪" },
  221. { value: "15薪", label: "15薪" },
  222. { value: "16薪", label: "16薪" },
  223. { value: "17薪", label: "17薪" },
  224. { value: "18薪", label: "18薪" },
  225. { value: "19薪", label: "19薪" },
  226. { value: "20薪", label: "20薪" },
  227. { value: "21薪", label: "21薪" },
  228. { value: "22薪", label: "22薪" },
  229. { value: "23薪", label: "23薪" }
  230. ]
  231. ],
  232. numList: [{
  233. name: "填写基本信息"
  234. },
  235. {
  236. name: "选择职位要求"
  237. },
  238. ],
  239. type: '',
  240. ruleClassifyId:'',//岗位id
  241. dataInfo:{},
  242. companyAddressInfo:{},
  243. isAdmin: true,
  244. companyInfo: {},
  245. };
  246. },
  247. components: {
  248. navBar,
  249. },
  250. computed: {
  251. welfareValue() {
  252. return this.welfareTag + this.welfareText
  253. },
  254. // 显示稍后发布按钮
  255. showNotPushBtn() {
  256. // 显示条件
  257. // 1. 管理员,企业是待审核状态
  258. // 2. 员工申请加入是待审核状态
  259. let adminStatus = this.isAdmin && this.status != 2
  260. let employeeStatus = !this.isAdmin && this.companyInfo?.companyUser?.status == 1
  261. if (adminStatus || employeeStatus) {
  262. return true
  263. }
  264. return false
  265. }
  266. },
  267. onLoad(options) {
  268. console.log(options)
  269. if(options.dataInfo){
  270. this.dataInfo = JSON.parse(options.dataInfo)
  271. }
  272. if(options.ruleClassifyId){
  273. this.ruleClassifyId = options.ruleClassifyId;
  274. }
  275. // if (options.isBack == 'true') {
  276. // this.isBack = true;
  277. // }
  278. // 接收上个页面传递的公司名称参数
  279. // if (options.companyName) {
  280. // this.companyName = decodeURIComponent(options.companyName);
  281. // console.log('接收的公司名称:', this.companyName);
  282. // }
  283. this.getcompanystatus()
  284. // if (options.status) {
  285. // this.status = decodeURIComponent(options.status);
  286. // console.log('接收的公司状态:', this.status);
  287. // } else {
  288. // //this.status = uni.getStorageSync('companyStatus')
  289. // this.getcompanystatus()
  290. // }
  291. if(options.companyAddressInfo){
  292. this.companyAddressInfo = JSON.parse(decodeURIComponent(options.companyAddressInfo));
  293. }
  294. if (options.workData) {
  295. let workData = JSON.parse(decodeURIComponent(options.workData));
  296. this.selectedExper = workData.experience;
  297. this.selectedLevel = workData.education;
  298. this.selectedSalary = workData.salaryRange || '';
  299. this.salaryTimes = workData.salaryTimes || '';
  300. this.welfareTag = workData.welfareTag || '';
  301. this.welfareText = workData.welfareText || '';
  302. this.positionTag = workData.positionTag ? workData.positionTag.split (',') : [];
  303. this.address = workData.address || this.companyAddressInfo.address;
  304. this.stationName.fullText = workData.address || this.companyAddressInfo.fullText, //地址
  305. this.stationName.latitude = workData.lat || this.companyAddressInfo.latitude
  306. this.stationName.longitude = workData.lng || this.companyAddressInfo.longitude
  307. this.stationName.province = workData.province || this.companyAddressInfo.province
  308. this.stationName.city = workData.city || this.companyAddressInfo.city
  309. this.stationName.district = workData.county || this.companyAddressInfo.district
  310. this.jobTitle = workData.ruleClassifyName
  311. console.log(11111,this.$queue.getData('companyAddress'))
  312. console.log(this.address)
  313. }
  314. this.fundListener = uni.$on("fundData", (data) => {
  315. console.log("接收到的福利数据:", data);
  316. this.welfareText = data.text
  317. this.welfareTag = data.tagText; // 赋值给当前页面变量
  318. });
  319. this.fundListener = uni.$on("skillsUpdated", (data) => {
  320. console.log("接收到的职位技能数据:", data);
  321. this.positionTag = data.selectedTags; // 赋值给当前页面变量
  322. });
  323. this.fundListener = uni.$on("addressData", (data) => {
  324. this.address = data.fullText;
  325. this.stationName = data;
  326. this.stationName.fullText = data.fullText;
  327. });
  328. if (options.companyId) {
  329. this.companyId = options.companyId;
  330. console.log('接收的公司ID:', this.companyId);
  331. } else {
  332. this.companyId = uni.getStorageSync('companyId') || ""
  333. }
  334. if (options.pid) {
  335. this.pid = options.pid;
  336. this.type = options.type;
  337. if (options.type && options.type == 'updata') {
  338. this.getInfo()
  339. }
  340. console.log('接收PID:', this.pid);
  341. }
  342. this.getcompanystatus()
  343. },
  344. onUnload() {
  345. // 页面关闭时移除监听,避免内存泄漏
  346. if (this.fundListener) {
  347. uni.$off("fundData");
  348. }
  349. },
  350. methods: {
  351. // 处理经验选择(核心修复:直接接收选中的label)
  352. onExperConfirm(selectedItem) {
  353. // 不同版本u-select返回格式可能是对象或数组,这里兼容处理
  354. if (Array.isArray(selectedItem)) {
  355. this.selectedExper = selectedItem[0]?.label || "";
  356. } else {
  357. this.selectedExper = selectedItem?.label || "";
  358. }
  359. this.showExper = false; // 关闭选择器
  360. },
  361. // 处理学历选择(核心修复)
  362. onLevelConfirm(selectedItem) {
  363. if (Array.isArray(selectedItem)) {
  364. this.selectedLevel = selectedItem[0]?.label || "";
  365. } else {
  366. this.selectedLevel = selectedItem?.label || "";
  367. }
  368. this.showLevel = false;
  369. },
  370. /**
  371. * 获取岗位详情
  372. */
  373. getInfo() {
  374. this.$Request.getT("/app/postPush/selectPostPushDetails", {
  375. // userId:uni.getStorageSync('userId'),
  376. postPushId: this.pid
  377. }).then(res => {
  378. if (res.code == 0) {
  379. this.selectedExper = res.data.experience
  380. this.selectedLevel = res.data.education
  381. this.selectedSalary = res.data.salaryRange
  382. this.welfareTag = res.data.welfareTag
  383. this.welfareText = res.data.welfareText
  384. this.positionTag = res.data.positionTag
  385. this.address = res.data.address
  386. this.stationName.fullText = res.data.address
  387. this.stationName.latitude = res.data.lat
  388. this.stationName.longitude = res.data.lng
  389. this.stationName.province = res.data.province
  390. this.stationName.city = res.data.city
  391. this.stationName.district = res.data.county
  392. this.salaryTimes = res.data.salaryTimes
  393. } else {
  394. uni.showToast({
  395. title: '数据有误',
  396. icon: 'none', // 注意这里需要加引号
  397. duration: 2000, // 可选:设置提示框显示时长
  398. complete() { // 正确的回调函数写法
  399. uni.navigateBack();
  400. }
  401. });
  402. }
  403. })
  404. },
  405. // 查询用户企业状态
  406. getcompanystatus() {
  407. this.$Request.get("/app/company/selectCompanyByUserId", "")
  408. .then((res) => {
  409. if (res.code != 0) {
  410. uni.showToast({
  411. title: res.msg || "查询状态失败",
  412. icon: "none"
  413. });
  414. return;
  415. }
  416. if (res.data?.companyUser?.isAdmin != 1) {
  417. this.isAdmin = false
  418. }
  419. this.companyInfo = res.data
  420. this.status = res.data.status || "";
  421. this.companyName = res.data.companyAllName || '';
  422. this.$queue.setData('companyId', res.data.companyId);
  423. this.$queue.setData('companyStatus', res.data.companyStatus);
  424. console.log("查询用户企业状态", this.status)
  425. })
  426. .catch((err) => {
  427. console.error("查询失败:", err);
  428. uni.showToast({
  429. title: "网络异常",
  430. icon: "none"
  431. });
  432. });
  433. },
  434. // 处理薪资范围选择(核心修复)
  435. onMoneyConfirm(selectedItems) {
  436. let minSalary = selectedItems[0].value.replace('k', '')
  437. let maxSalary = selectedItems[1].value.replace('k', '')
  438. if (Number(minSalary) > Number(maxSalary)) {
  439. return this.$queue.showToast('最低薪资不能大于最高薪资')
  440. }
  441. // 多列选择器返回数组,取每列选中的label拼接
  442. console.log(selectedItems)
  443. if (Array.isArray(selectedItems) && selectedItems.length >= 2) {
  444. const min = selectedItems[0]?.label || "";
  445. const max = selectedItems[1]?.label || "";
  446. const xin = selectedItems[2]?.label || "";
  447. this.selectedSalary = `${min}-${max}`;
  448. this.salaryTimes = `${xin}`
  449. }
  450. this.showMoney = false;
  451. },
  452. // 跳转页面并接收参数(福利待遇)
  453. goFund() {
  454. let tag = ''
  455. let text = ''
  456. if (this.welfareTag) {
  457. tag = this.welfareTag;
  458. }
  459. if (this.welfareText) {
  460. text = this.welfareText
  461. }
  462. uni.navigateTo({
  463. url: `/package/jobIntention/fund?tag=${encodeURIComponent(tag)}&text=${encodeURIComponent(text)}`,
  464. events: {
  465. // 监听子页面发送的福利数据
  466. fundData: (data) => {
  467. this.welfareTag = data;
  468. },
  469. },
  470. });
  471. },
  472. // 跳转页面并接收参数(职位关键词)
  473. goJobSkill() {
  474. uni.navigateTo({
  475. url: "/package/jobIntention/jobSkills?tag=" + encodeURIComponent(this.positionTag) + '&jobTitle=' + this.jobTitle + '&ruleClassifyId=' + this.ruleClassifyId,
  476. events: {
  477. skillsUpdated: (data) => {
  478. this.positionTag = data.selectedTags;
  479. },
  480. },
  481. });
  482. },
  483. // 跳转页面并接收参数(工作地址)
  484. goAddAddress() {
  485. let address = {
  486. ...this.stationName
  487. }
  488. uni.navigateTo({
  489. url: "/package/jobIntention/addAddress?address=" + JSON.stringify(address),
  490. events: {
  491. addressData: (data) => {
  492. let value = {
  493. ...data
  494. }
  495. this.stationName = value;
  496. this.stationName.fullText = value.fullText;
  497. this.address = value.fullText;
  498. },
  499. },
  500. });
  501. },
  502. // 提交表单
  503. submitPost() {
  504. // 验证必填项
  505. if (!this.selectedExper) {
  506. return uni.showToast({
  507. title: "请选择经验要求",
  508. icon: "none"
  509. });
  510. }
  511. if (!this.selectedLevel) {
  512. return uni.showToast({
  513. title: "请选择最低学历",
  514. icon: "none"
  515. });
  516. }
  517. if (!this.selectedSalary) {
  518. return uni.showToast({
  519. title: "请选择薪资范围",
  520. icon: "none"
  521. });
  522. }
  523. if (!this.stationName.fullText && !this.address) {
  524. return uni.showToast({
  525. title: "请填写工作地址",
  526. icon: "none"
  527. });
  528. }
  529. if (this.type && this.type == 'updata' && !this.stationName.longitude) {
  530. return uni.showToast({
  531. title: "请选择位置",
  532. icon: "none"
  533. });
  534. }
  535. if (!this.positionTag) {
  536. return uni.showToast({
  537. title: "请选择职位标签",
  538. icon: "none"
  539. });
  540. }
  541. var positionTag = this.positionTag
  542. const str = positionTag.join(',');
  543. // 构造提交数据
  544. const data = {
  545. type: this.dataInfo.type,
  546. isDue: this.dataInfo.isDue,
  547. positionDetails: this.dataInfo.positionDetails,
  548. ruleClassifyId:this.dataInfo.ruleClassifyId,
  549. ruleClassifyName: this.dataInfo.ruleClassifyName,
  550. orderid: 1,
  551. postPushId: this.pid,
  552. experience: this.selectedExper, //工作经验
  553. education: this.selectedLevel, //学历
  554. salaryRange: this.selectedSalary, //薪资范围
  555. welfareTag: this.welfareTag, //福利相关标签
  556. welfareText: this.welfareText,
  557. positionTag: str, //职位技能
  558. address: this.stationName.fullText || this.address, //地址
  559. lat: this.stationName.latitude,
  560. lng: this.stationName.longitude,
  561. province: this.stationName.province,
  562. city: this.stationName.city,
  563. county: this.stationName.district,
  564. // companyId: (this.companyId === undefined || this.companyId === 'undefined') ? '' : this.companyId,
  565. salaryTimes: this.salaryTimes
  566. };
  567. // 调用接口提交
  568. uni.showLoading({
  569. title: "提交中..."
  570. });
  571. this.$Request.postJson("/app/postPush/savePostPush", data)
  572. .then((res) => {
  573. uni.hideLoading();
  574. if (res.code === 0) {
  575. uni.showToast({
  576. title: "提交成功",
  577. icon: "success"
  578. });
  579. //这里要选择跳转,第一次是要跳公司页,如果是二次就到职位管理页
  580. if (this.status == 1) { //审核中
  581. uni.navigateTo({
  582. url: "/package/jobIntention/companyImg?companyName=" + this.companyName +
  583. '&companyId=' + this.companyId
  584. });
  585. } else if (this.status == 2) {//审核通过
  586. // 判断是否是管理员
  587. if (this.companyInfo.companyUser.isAdmin != 1 && this.companyInfo.companyUser.status == 1) {
  588. // 非管理员,状态是待审核
  589. uni.navigateTo({
  590. url: '/package/jobIntention/completeMsg'
  591. });
  592. } else {
  593. uni.navigateTo({
  594. url: '/pages/jobManagement/jobManagement'
  595. })
  596. }
  597. } else {
  598. // uni.navigateTo({
  599. // url: '/my/renzheng/editCompany'
  600. // })
  601. uni.navigateTo({
  602. url: '/pages/jobManagement/jobManagement'
  603. })
  604. }
  605. } else {
  606. uni.showToast({
  607. title: res.msg || "提交失败",
  608. icon: "none"
  609. });
  610. }
  611. })
  612. .catch((err) => {
  613. uni.hideLoading();
  614. console.error("提交失败:", err);
  615. uni.showToast({
  616. title: "网络异常",
  617. icon: "none"
  618. });
  619. });
  620. },
  621. // 跳转至公司认证页面
  622. handleToIndex() {
  623. if (!this.isAdmin) {
  624. uni.reLaunch({
  625. url: '/pages/index/index'
  626. })
  627. } else {
  628. uni.navigateTo({
  629. url: `/package/jobIntention/companyImg?companyName=${this.companyName}&companyId=${this.companyId}`
  630. })
  631. }
  632. }
  633. },
  634. };
  635. </script>
  636. <style lang="scss" scoped>
  637. /* 原有样式保持不变 */
  638. .switch-roles {
  639. background-color: #fff;
  640. position: absolute;
  641. left: 0;
  642. right: 0;
  643. top: 0;
  644. bottom: 0;
  645. display: flex;
  646. flex-direction: column;
  647. .roles-content {
  648. width: 100%;
  649. flex: 1;
  650. overflow: auto;
  651. .content {
  652. padding: 32rpx 40rpx;
  653. .title {
  654. color: #333;
  655. font-size: 48rpx;
  656. font-weight: 700;
  657. margin-bottom: 40rpx;
  658. line-height: 60rpx;
  659. }
  660. .desc {
  661. color: #666;
  662. font-size: 28rpx;
  663. margin-bottom: 20rpx;
  664. }
  665. // 步骤条
  666. .step-progress {
  667. display: flex;
  668. justify-content: center;
  669. padding: 20rpx 0 60rpx;
  670. .circle-wrapper {
  671. position: relative;
  672. .check-icon {
  673. display: flex;
  674. align-items: center;
  675. justify-content: center;
  676. width: 40rpx;
  677. height: 40rpx;
  678. border: 1px solid rgba(198, 198, 198, 1);
  679. border-radius: 40rpx;
  680. }
  681. .check-active {
  682. background: #016bf6;
  683. border-color: #016bf6;
  684. }
  685. .step-progress-text {
  686. position: absolute;
  687. left: 50%;
  688. bottom: -36rpx;
  689. width: 150rpx;
  690. font-size: 20rpx;
  691. font-weight: 500;
  692. line-height: 32rpx;
  693. color: rgba(111, 111, 111, 1);
  694. transform: translateX(-50%);
  695. text-align: center;
  696. }
  697. }
  698. .line {
  699. width: 220rpx;
  700. height: 1px;
  701. background: rgba(198, 198, 198, 1);
  702. }
  703. .blue {
  704. background: rgba(1, 107, 246, 1);
  705. }
  706. }
  707. .check-title-big {
  708. color: #3a3943;
  709. font-size: 36rpx;
  710. font-weight: 500;
  711. padding: 20rpx 0;
  712. }
  713. .check-select {
  714. width: 100%;
  715. display: flex;
  716. justify-content: space-between;
  717. align-items: center;
  718. padding: 32rpx 47rpx;
  719. border-radius: 12rpx;
  720. box-shadow: 0 16rpx 300rpx rgba(0, 0, 0, 0.06);
  721. background: #fff;
  722. margin-bottom: 20rpx;
  723. .select-txt {
  724. color: #999;
  725. font-size: 28rpx;
  726. }
  727. }
  728. .txt-desc {
  729. color: #666;
  730. font-size: 26rpx;
  731. margin-top: 20rpx;
  732. line-height: 1.5;
  733. }
  734. }
  735. }
  736. .step {
  737. padding: 32rpx 0;
  738. }
  739. .button-section {
  740. padding: 28rpx 40rpx;
  741. box-shadow: 0px -4px 16px 0px rgba(0, 0, 0, 0.04);
  742. }
  743. .submit-btn {
  744. flex-shrink: 0;
  745. border-radius: 999px;
  746. box-shadow: 0px -4px 16px 0px rgba(0, 0, 0, 0.04);
  747. background: linear-gradient(90deg, rgba(13, 39, 247, 1), rgba(19, 193, 234, 1) 100%);
  748. color: rgba(255, 255, 255, 1);
  749. font-family: DM Sans;
  750. font-size: 32rpx;
  751. font-weight: 400;
  752. line-height: 48rpx;
  753. display: flex;
  754. justify-content: center;
  755. align-items: center;
  756. padding: 16rpx 32rpx;
  757. box-sizing: border-box;
  758. }
  759. .link-btn {
  760. text-align: center;
  761. color: rgba(1, 107, 246, 1);
  762. font-size: 16px;
  763. font-weight: 400;
  764. line-height: 16px;
  765. margin-bottom: 32rpx;
  766. }
  767. }
  768. </style>