jobPostingSecond.vue 23 KB

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