Xiao_123 10 months ago
parent
commit
c297db8dda
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/views/recruit/personal/position/components/details.vue

+ 1 - 1
src/views/recruit/personal/position/components/details.vue

@@ -185,7 +185,7 @@ getCollectionStatus()
 // 分享有礼
 const shareDialog = ref(false)
 const shareUrl = ref('')
-const userInfo = JSON.parse(localStorage.getItem('userInfo') || {})
+const userInfo = localStorage.getItem('userInfo') ? JSON.parse(localStorage.getItem('userInfo')) : {}
 const handleShare = async () => {
   // 分享链接携带参数: 用户id、职位id
   if (!id || !userInfo.id) return