فهرست منبع

招聘会职位操作提示跳转

Xiao_123 3 روز پیش
والد
کامیت
3a34a59258
2فایلهای تغییر یافته به همراه16 افزوده شده و 4 حذف شده
  1. 9 2
      components/PositionList/index.vue
  2. 7 2
      pagesB/positionDetail/index.vue

+ 9 - 2
components/PositionList/index.vue

@@ -154,9 +154,16 @@ const dialogContent = ref('')
 let handleActionInfo = {}
 const apiList = [closeJobAdvertised, enableJobAdvertised, refreshJobAdvertised, topJobAdvertised, topJobAdvertisedCancel]
 // 职位关闭、激活、刷新、置顶
-const handleAction = async (index, type, { id, jobFairName }, item) => {
+const handleAction = async (index, type, { id, jobFairName, jobFairId }, item) => {
+	// 招聘会职位激活、关闭跳转去招聘会进行操作
   if (jobFairName) {
-    uni.showToast({ title: '该职位属于招聘会,请前往招聘会内进行操作', icon: 'none', duration: 2000 })
+	  if ([3,4].includes(index)) return // 招聘会职位置顶、取消置顶不可操作
+    uni.showToast({ title: '该职位属于招聘会,即将前往招聘会', icon: 'none', duration: 2000 })
+    setTimeout(() => {
+      uni.navigateTo({
+        url: `/pagesB/jobFair/details?id=${jobFairId}`
+      })
+    }, 1000)
     return
   }
   const ids = type ? [] : [id]

+ 7 - 2
pagesB/positionDetail/index.vue

@@ -179,8 +179,13 @@ const handleEdit = async () => {
   // }
   // 发布中的招聘会职位需进入招聘会中进行编辑
   if (fairNoEdit.value) {
-	uni.showToast({ title: '该职位属于招聘会职位,请前往招聘会中进行编辑', icon: 'none', duration: 2000 })
-	return
+    uni.showToast({ title: '该职位属于招聘会职位,即将前往招聘会', icon: 'none', duration: 2000 })
+    setTimeout(() => {
+      uni.navigateTo({
+        url: `/pagesB/jobFair/details?id=${info.value.jobFairId}`
+      })
+    }, 1000)
+	  return
   }
   uni.showLoading({ title: '加载中 . . . ' })
   try {