Przeglądaj źródła

企业详情:分享时添加current字段

Xiao_123 1 miesiąc temu
rodzic
commit
0046c23e05
1 zmienionych plików z 6 dodań i 2 usunięć
  1. 6 2
      pagesB/companyDetail/index.vue

+ 6 - 2
pagesB/companyDetail/index.vue

@@ -240,6 +240,10 @@ const loadingMore = () => {
 onLoad(async (options) => {
   id.value = options?.id || ''
   if (id.value) await getData()
+  if (options?.index) {
+    current.value = Number(options?.index)
+    if (current.value === 1) getPositionList()
+  }
 })
 
 wx.showShareMenu({
@@ -252,7 +256,7 @@ onShareAppMessage(() => {
 	}
   return {
     title: title.value || '门墩儿 专注顶尖招聘',
-    path: '/pagesB/companyDetail/index?id=' + id.value
+    path: `/pagesB/companyDetail/index?id=${id.value}&index=${current.value}`
   }
 })
 onShareTimeline(() => {
@@ -261,7 +265,7 @@ onShareTimeline(() => {
 	}
   return {
     title: title.value || '门墩儿 专注顶尖招聘',
-    path: '/pagesB/companyDetail/index?id=' + id.value
+    path: `/pagesB/companyDetail/index?id=${id.value}&index=${current.value}`
   }
 })