|
@@ -144,7 +144,30 @@
|
|
|
|
|
|
<!-- 职位分享 -->
|
|
<!-- 职位分享 -->
|
|
<uni-popup ref="sharePopup" type="share">
|
|
<uni-popup ref="sharePopup" type="share">
|
|
- <uni-popup-share title="分享到" @select="handleSelect"></uni-popup-share>
|
|
|
|
|
|
+ <uni-popup-share title="分享到">
|
|
|
|
+ <view class="share-pop">
|
|
|
|
+ <button class="f-straight" open-type="share">
|
|
|
|
+ <view class="share-round share-round-1" >
|
|
|
|
+ <uni-icons
|
|
|
|
+ type="weixin"
|
|
|
|
+ color="#FFF"
|
|
|
|
+ size="30"
|
|
|
|
+ />
|
|
|
|
+ </view>
|
|
|
|
+ <view style="font-size:12px;">微信好友</view>
|
|
|
|
+ </button>
|
|
|
|
+ <button class="f-straight" @click="createPoster">
|
|
|
|
+ <view class="share-round share-round-2" >
|
|
|
|
+ <uni-icons
|
|
|
|
+ type="download-filled"
|
|
|
|
+ color="#FFF"
|
|
|
|
+ size="30"
|
|
|
|
+ />
|
|
|
|
+ </view>
|
|
|
|
+ <view style="font-size:12px;">生成海报</view>
|
|
|
|
+ </button>
|
|
|
|
+ </view>
|
|
|
|
+ </uni-popup-share>
|
|
</uni-popup>
|
|
</uni-popup>
|
|
</layout-page>
|
|
</layout-page>
|
|
</template>
|
|
</template>
|
|
@@ -162,12 +185,13 @@ import {
|
|
jobCvRelCheckSend,
|
|
jobCvRelCheckSend,
|
|
getPersonJobUnfavorite, // 取消收藏
|
|
getPersonJobUnfavorite, // 取消收藏
|
|
getPersonJobFavorite, // 收藏
|
|
getPersonJobFavorite, // 收藏
|
|
- getJobFavoriteCheck
|
|
|
|
|
|
+ getJobFavoriteCheck,
|
|
|
|
+ jobCvRelHireSend
|
|
} from '@/api/position'
|
|
} from '@/api/position'
|
|
import { getPersonResumeCv, saveResume } from '@/api/user'
|
|
import { getPersonResumeCv, saveResume } from '@/api/user'
|
|
import { dealDictObjData } from '@/utils/position'
|
|
import { dealDictObjData } from '@/utils/position'
|
|
import { getAccessToken } from '@/utils/request'
|
|
import { getAccessToken } from '@/utils/request'
|
|
-import { onLoad } from '@dcloudio/uni-app';
|
|
|
|
|
|
+import { onLoad,onShareAppMessage,onShareTimeline } from '@dcloudio/uni-app'
|
|
|
|
|
|
const sharePopup = ref()
|
|
const sharePopup = ref()
|
|
const loading = ref(false)
|
|
const loading = ref(false)
|
|
@@ -176,6 +200,9 @@ const loadingText = ref('加载中 . . . ')
|
|
// 职位详情
|
|
// 职位详情
|
|
const info = ref({})
|
|
const info = ref({})
|
|
const positionInfo = ref({})
|
|
const positionInfo = ref({})
|
|
|
|
+
|
|
|
|
+const isEmployment = ref(null)
|
|
|
|
+
|
|
const getPositionDetail = async () => {
|
|
const getPositionDetail = async () => {
|
|
try {
|
|
try {
|
|
loading.value = true
|
|
loading.value = true
|
|
@@ -189,7 +216,11 @@ const getPositionDetail = async () => {
|
|
}
|
|
}
|
|
|
|
|
|
let jobId = ''
|
|
let jobId = ''
|
|
-onLoad((options) => {
|
|
|
|
|
|
+onLoad((options) => {
|
|
|
|
+ // 是否是众聘
|
|
|
|
+ if (options.userId) {
|
|
|
|
+ isEmployment.value = options.userId
|
|
|
|
+ }
|
|
jobId = options?.id || ''
|
|
jobId = options?.id || ''
|
|
if (jobId) {
|
|
if (jobId) {
|
|
loading.value = true
|
|
loading.value = true
|
|
@@ -233,10 +264,13 @@ const handleDelivery = async () => {
|
|
uni.showToast({ title: '您已投递过该职位!', icon: 'none', duration: 2000, })
|
|
uni.showToast({ title: '您已投递过该职位!', icon: 'none', duration: 2000, })
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+
|
|
const { data } = await getPersonResumeCv()
|
|
const { data } = await getPersonResumeCv()
|
|
resumeList.value = data
|
|
resumeList.value = data
|
|
// 未上传简历
|
|
// 未上传简历
|
|
- if (!resumeList.value?.length) return uploadPopup.value.open()
|
|
|
|
|
|
+ if (!resumeList.value?.length) {
|
|
|
|
+ return uploadPopup.value.open()
|
|
|
|
+ }
|
|
popup.value.open()
|
|
popup.value.open()
|
|
}
|
|
}
|
|
const deliverySubmit = async (uploadFile) => {
|
|
const deliverySubmit = async (uploadFile) => {
|
|
@@ -246,7 +280,22 @@ const deliverySubmit = async (uploadFile) => {
|
|
uni.showToast({ title: '请选择简历', icon: 'none', duration: 2000, })
|
|
uni.showToast({ title: '请选择简历', icon: 'none', duration: 2000, })
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- await jobCvRelSend({ jobId, title: resume.title, url: resume.url, type: info.value.hire ? 1 : 0 })
|
|
|
|
|
|
+
|
|
|
|
+ if (isEmployment.value) {
|
|
|
|
+ await jobCvRelHireSend({
|
|
|
|
+ jobId,
|
|
|
|
+ url: resume.url,
|
|
|
|
+ recommendUserId: isEmployment.value
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ await jobCvRelSend({
|
|
|
|
+ jobId,
|
|
|
|
+ title: resume.title,
|
|
|
|
+ url: resume.url,
|
|
|
|
+ type: info.value.hire ? 1 : 0
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
uni.showToast({ title: '投递成功', icon: 'none', duration: 2000, })
|
|
uni.showToast({ title: '投递成功', icon: 'none', duration: 2000, })
|
|
deliveryCheck()
|
|
deliveryCheck()
|
|
popup.value.close()
|
|
popup.value.close()
|
|
@@ -314,14 +363,48 @@ const handleUpload = () => {
|
|
const handleClickShare = () => {
|
|
const handleClickShare = () => {
|
|
sharePopup.value.open()
|
|
sharePopup.value.open()
|
|
}
|
|
}
|
|
|
|
+//在点击open-type="share"按钮后会触发以下函数,可以在函数中写需要的逻辑,当然函数的返回值必须是一个对象,用于设置分享卡片的展示形式
|
|
|
|
+//发送给微信好友
|
|
|
|
+onShareAppMessage((res) => {
|
|
|
|
+ let path = `/pagesB/positionDetail/index?id=${info.value.id}`
|
|
|
|
+ if (info.value.hire) {
|
|
|
|
+ path += `&userId=${info.value.userId}`
|
|
|
|
+ }
|
|
|
|
+ return {
|
|
|
|
+ title: '我发现了一个好职位,快来看看吧', //分享的名称
|
|
|
|
+ path
|
|
|
|
+ }
|
|
|
|
+})
|
|
|
|
|
|
-const handleSelect = (e) => {
|
|
|
|
- console.log(e, 'share')
|
|
|
|
- uni.showToast({ title: '正在努力建设中 . . .', icon: 'none', duration: 2000, })
|
|
|
|
-}
|
|
|
|
|
|
|
|
</script>
|
|
</script>
|
|
-
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
@import '../../static/style/position/index.scss';
|
|
@import '../../static/style/position/index.scss';
|
|
|
|
+.share-pop {
|
|
|
|
+ width: 100%;
|
|
|
|
+ // height:300rpx;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ .f-straight {
|
|
|
|
+ margin: 40rpx;
|
|
|
|
+ background: unset;
|
|
|
|
+ &::after{
|
|
|
|
+ border:none !important;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .share-round {
|
|
|
|
+ border-radius:50%;
|
|
|
|
+ height:100rpx;
|
|
|
|
+ width:100rpx;
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ }
|
|
|
|
+ .share-round-1 {
|
|
|
|
+ background-color:#22a039;
|
|
|
|
+ }
|
|
|
|
+ .share-round-2 {
|
|
|
|
+ background-color:#3693cd;
|
|
|
|
+ }
|
|
|
|
+}
|
|
</style>
|
|
</style>
|