|
@@ -1,13 +1,13 @@
|
|
|
<template>
|
|
|
- <view class="ss-m-x-20 ss-p-b-100">
|
|
|
- <uni-section v-if="show" class="ss-m-y-20" title="职位基本信息">
|
|
|
+ <view v-if="show" class="ss-m-x-20 ss-p-b-100">
|
|
|
+ <uni-section class="ss-m-y-20" title="职位基本信息">
|
|
|
<template v-slot:decoration>
|
|
|
<view class="decoration decoration1">1</view>
|
|
|
</template>
|
|
|
<!-- 基本信息 -->
|
|
|
<baseInfo ref="baseInfoRef" :isFair="Boolean(fairId)" :data="itemData"></baseInfo>
|
|
|
</uni-section>
|
|
|
- <uni-section v-if="show" class="ss-m-y-20" title="岗位要求">
|
|
|
+ <uni-section class="ss-m-y-20" title="岗位要求">
|
|
|
<template v-slot:decoration>
|
|
|
<view class="decoration decoration2">2</view>
|
|
|
</template>
|
|
@@ -66,13 +66,18 @@ onLoad((options) => {
|
|
|
const show = ref(false)
|
|
|
const itemData = ref({})
|
|
|
const getPositionDetail = async (id) => {
|
|
|
- const res = await getJobDetails({ id })
|
|
|
- if (!res?.data && !Object.keys(res.data).length) return
|
|
|
- itemData.value = {...res.data, ...dealDictObjData({}, res.data)}
|
|
|
- show.value = true
|
|
|
- if (itemData.value?.type === '3') {
|
|
|
- isStudent.value = true
|
|
|
- getPositionExtendDetail(id)
|
|
|
+ try {
|
|
|
+ uni.showLoading({ title: '加载中...', mask: true })
|
|
|
+ const res = await getJobDetails({ id })
|
|
|
+ if (!res?.data && !Object.keys(res.data).length) return
|
|
|
+ itemData.value = {...res.data, ...dealDictObjData({}, res.data)}
|
|
|
+ if (itemData.value?.type === '3') {
|
|
|
+ isStudent.value = true
|
|
|
+ await getPositionExtendDetail(id)
|
|
|
+ }
|
|
|
+ show.value = true
|
|
|
+ } finally {
|
|
|
+ uni.hideLoading()
|
|
|
}
|
|
|
}
|
|
|
// getPositionDetail('1904154452278009858')
|
|
@@ -81,9 +86,12 @@ const getPositionDetail = async (id) => {
|
|
|
const showExtend = ref(false)
|
|
|
const extendData = ref({})
|
|
|
const getPositionExtendDetail = async (id) => {
|
|
|
- const res = await getJobAdvertisedExtend(id)
|
|
|
- extendData.value = res?.data || {}
|
|
|
- showExtend.value = true // 实习表单显示
|
|
|
+ try {
|
|
|
+ const res = await getJobAdvertisedExtend(id)
|
|
|
+ extendData.value = res?.data || {}
|
|
|
+ showExtend.value = true // 实习表单显示
|
|
|
+ } catch (error) {
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
const baseInfoRef = ref(null)
|