|
@@ -89,13 +89,13 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
- <view class="bottom-sticky" v-if="showBtn">
|
|
|
+ <view class="bottom-sticky" v-if="!loading && jobId">
|
|
|
<view style="display: flex;justify-content: space-evenly;align-items: center;width: 100%;margin: 20rpx 0;">
|
|
|
<view @click="null" style="display: flex;justify-content: center;flex-direction: column;align-items: center;">
|
|
|
<uni-icons type="redo-filled" size="24" color="#00897B"/>
|
|
|
<span style="color:#00897B;font-weight:bold;">分享</span>
|
|
|
</view>
|
|
|
- <button v-if="delivery" :disabled="true" class="buttons">我已投递</button>
|
|
|
+ <button v-if="delivery" :disabled="true" class="buttons disable">我已投递</button>
|
|
|
<button v-else class="buttons" @click="handleDelivery">我要投递</button>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -114,6 +114,7 @@ import {
|
|
|
getPersonJobFavorite, // 收藏
|
|
|
getJobFavoriteCheck
|
|
|
} from '@/api/position'
|
|
|
+import { getPersonResumeCv, saveResume } from '@/api/user'
|
|
|
import { dealDictObjData } from '@/utils/position'
|
|
|
// import Snackbar from '@/plugins/snackbar'
|
|
|
import { getAccessToken } from '@/utils/request'
|
|
@@ -127,11 +128,15 @@ const loadingText = ref('加载中 . . . ')
|
|
|
const info = ref({})
|
|
|
const positionInfo = ref({})
|
|
|
const getPositionDetail = async () => {
|
|
|
- const { data } = await getPositionDetails({ id: jobId })
|
|
|
- info.value = data
|
|
|
- positionInfo.value = { ...dealDictObjData({}, info.value), ...info.value }
|
|
|
- loading.value = false
|
|
|
- console.log('positionInfo', positionInfo.value)
|
|
|
+ try {
|
|
|
+ loading.value = true
|
|
|
+ const { data } = await getPositionDetails({ id: jobId })
|
|
|
+ info.value = data
|
|
|
+ positionInfo.value = { ...dealDictObjData({}, info.value), ...info.value }
|
|
|
+ loading.value = false
|
|
|
+ console.log('positionInfo', positionInfo.value)
|
|
|
+ } finally {
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
let jobId = ''
|
|
@@ -149,35 +154,36 @@ onLoad((options) => {
|
|
|
})
|
|
|
|
|
|
|
|
|
-// const resumeList = ref([])
|
|
|
-// const selectResume = ref()
|
|
|
-const handleDelivery = async () => {
|
|
|
- // if (delivery.value) return Snackbar.warning(t('resume.alreadyResume'))
|
|
|
- // const result = await getPersonResumeCv()
|
|
|
- // resumeList.value = result
|
|
|
- // // 没有上传过简历的先去上传
|
|
|
- // if (!result.length) {
|
|
|
- // Snackbar.warning('您还未上传过简历,请先上传简历')
|
|
|
- // uploadFile.value.trigger()
|
|
|
- // return
|
|
|
- // }
|
|
|
- // showResume.value = true
|
|
|
-}
|
|
|
|
|
|
|
|
|
// 效验是否有投递过简历
|
|
|
const delivery = ref(true) // 是否已投递简历
|
|
|
-const showBtn = ref(false)
|
|
|
const deliveryCheck = async () => {
|
|
|
try {
|
|
|
if (!getAccessToken()) return delivery.value = false
|
|
|
const { data } = await jobCvRelCheckSend({ jobId })
|
|
|
delivery.value = Boolean(data)
|
|
|
} finally {
|
|
|
- showBtn.value = true
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+const resumeList = ref([])
|
|
|
+// const selectResume = ref()
|
|
|
+const handleDelivery = async () => {
|
|
|
+ // delivery.value = true
|
|
|
+ if (delivery.value) {
|
|
|
+ uni.showToast({ title: '您已投递过该职位!', icon: 'none', duration: 2000, })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const { data } = await getPersonResumeCv()
|
|
|
+ resumeList.value = data
|
|
|
+ if (!resumeList.value?.length) {
|
|
|
+ uni.showToast({ title: '您还未上传过简历,请先上传简历', icon: 'none', duration: 2000, })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // showResume.value = true
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
// 效验求职者是否有收藏该职位
|
|
|
const isCollection = ref(true)
|
|
@@ -274,9 +280,10 @@ const handleCollection = async () => {
|
|
|
height: 44px;
|
|
|
border-radius: 25px;
|
|
|
margin: 0;
|
|
|
- color: #fff;
|
|
|
+ color: #fff !important;
|
|
|
background-color: #00897b !important;
|
|
|
}
|
|
|
+.disable { background-color: #00897bbe !important; color: #ffffffec !important;}
|
|
|
|
|
|
.noMore{
|
|
|
margin: 20px 0;
|