|
@@ -85,7 +85,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
-import { onLoad } from '@dcloudio/uni-app'
|
|
|
|
|
|
+import { onLoad, onShareAppMessage } from '@dcloudio/uni-app'
|
|
import { ref, reactive, computed } from 'vue'
|
|
import { ref, reactive, computed } from 'vue'
|
|
import { dealDictObjData } from '@/utils/position'
|
|
import { dealDictObjData } from '@/utils/position'
|
|
import { getJobFairEntJobPage, getJobFair } from '@/api/jobFair'
|
|
import { getJobFairEntJobPage, getJobFair } from '@/api/jobFair'
|
|
@@ -139,6 +139,7 @@ const tabIndex = ref(-1)
|
|
const tabList = ref([])
|
|
const tabList = ref([])
|
|
const swiperAdList = ref([])
|
|
const swiperAdList = ref([])
|
|
const backgroundColor = ref('#fff')
|
|
const backgroundColor = ref('#fff')
|
|
|
|
+const jobFairTitle = ref('')
|
|
const textColor = computed(() => {
|
|
const textColor = computed(() => {
|
|
return backgroundColor.value === '#fff' ? '#777' : '#fff'
|
|
return backgroundColor.value === '#fff' ? '#777' : '#fff'
|
|
})
|
|
})
|
|
@@ -160,6 +161,9 @@ const getJobFairDetail = async () => {
|
|
if (data?.backgroundColour) {
|
|
if (data?.backgroundColour) {
|
|
backgroundColor.value = data.backgroundColour || '#fff'
|
|
backgroundColor.value = data.backgroundColour || '#fff'
|
|
}
|
|
}
|
|
|
|
+ if (data?.title) {
|
|
|
|
+ jobFairTitle.value = data.title
|
|
|
|
+ }
|
|
showShareBtn.value = Boolean(data?.shareImg)
|
|
showShareBtn.value = Boolean(data?.shareImg)
|
|
}
|
|
}
|
|
|
|
|
|
@@ -250,6 +254,25 @@ const handleShare = () => {
|
|
uni.navigateTo({ url })
|
|
uni.navigateTo({ url })
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// 转发
|
|
|
|
+onShareAppMessage(async () => {
|
|
|
|
+ let title = '门墩儿-招聘会'
|
|
|
|
+ if (query.enterpriseId && entName.value) title = entName.value
|
|
|
|
+ else title = jobFairTitle.value
|
|
|
|
+
|
|
|
|
+ if (!title) {
|
|
|
|
+ await getJobFairDetail() // 如果 jobFairTitle.value 为空,尝试异步获取
|
|
|
|
+ title = jobFairTitle.value
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ let path = `/pagesB/jobFair/positionClassification?jobFairId=${query.jobFairId}`
|
|
|
|
+ if (query.enterpriseId) path = path + `&enterpriseId=${query.enterpriseId}`
|
|
|
|
+ return {
|
|
|
|
+ title: title || '门墩儿-招聘会',
|
|
|
|
+ path
|
|
|
|
+ }
|
|
|
|
+})
|
|
|
|
+
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|