|
@@ -266,7 +266,7 @@ import { prologue, defaultText } from '@/hooks/useIM'
|
|
|
import { userStore } from '@/store/user'
|
|
|
import { formatName } from '@/utils/getText'
|
|
|
import studentDeliveryForm from '@/components/studentDeliveryForm'
|
|
|
-// import { getShareQueryById } from '@/api/jobFair.js'
|
|
|
+import { getShareQueryById } from '@/api/jobFair.js'
|
|
|
|
|
|
const navbarHeight = ref(0)
|
|
|
|
|
@@ -320,9 +320,17 @@ onLoad(async (options) => {
|
|
|
// 网站二维码分享
|
|
|
if (options.scene) {
|
|
|
const scene = decodeURIComponent(options.scene)
|
|
|
- const str = scene.split('=')
|
|
|
- const res = await getShareDetail({ id: str[1] })
|
|
|
- obj = res.data
|
|
|
+ const key = scene.split('=')[1]
|
|
|
+ const res = await getShareQueryById({ key })
|
|
|
+ // 获取不到参数则跳转首页
|
|
|
+ if (!res || !res?.data) {
|
|
|
+ uni.showToast({ title: '服务器错误,请联系管理员', icon: 'none', duration: 2000 })
|
|
|
+ setTimeout(() => {
|
|
|
+ uni.reLaunch({ url: '/pages/index/position' })
|
|
|
+ }, 2000)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ obj = res.data || {}
|
|
|
}
|
|
|
|
|
|
// 是否众聘
|