瀏覽代碼

获取参数

lifanagju_citu 4 月之前
父節點
當前提交
b71dc3149b
共有 1 個文件被更改,包括 9 次插入1 次删除
  1. 9 1
      pagesB/jobFair/enterprisesClassification.vue

+ 9 - 1
pagesB/jobFair/enterprisesClassification.vue

@@ -84,6 +84,7 @@ import { dealDictArrayData } from '@/utils/position'
 import { getJobFairEnterprisePage, getJobFair } from '@/api/jobFair'
 import SwiperAd from '@/components/SwiperAd'
 import { formatName } from '@/utils/getText'
+import { getShareQueryById } from '@/api/jobFair.js'
 
 const more = ref('more')
 const listData = ref([])
@@ -97,6 +98,14 @@ const query = reactive({
 const showShareBtn = ref(false)
 
 onLoad(async (options) => {
+  // 网站二维码分享
+	if (options.scene) {
+    const scene = decodeURIComponent(options.scene)
+    const key = scene.split('=')[1]
+    if (!key) return
+    const res = await getShareQueryById({key})
+    options.jobFairId = res?.data?.jobFairId
+  }
   if (options?.jobFairId) {
     query.jobFairId = options.jobFairId
     getJobFairDetail()
@@ -313,7 +322,6 @@ const handleShare = () => {
   width: 106px;
   height: 34px;
   line-height: 34px;
-  line-height: 36px;
   font-size: 16px;
   // margin: 4px 4px 4px 0;
   background-color: #00B760;