浏览代码

招聘会职位操作提示跳转

Xiao_123 4 天之前
父节点
当前提交
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 = {}
 let handleActionInfo = {}
 const apiList = [closeJobAdvertised, enableJobAdvertised, refreshJobAdvertised, topJobAdvertised, topJobAdvertisedCancel]
 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) {
   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
     return
   }
   }
   const ids = type ? [] : [id]
   const ids = type ? [] : [id]

+ 7 - 2
pagesB/positionDetail/index.vue

@@ -179,8 +179,13 @@ const handleEdit = async () => {
   // }
   // }
   // 发布中的招聘会职位需进入招聘会中进行编辑
   // 发布中的招聘会职位需进入招聘会中进行编辑
   if (fairNoEdit.value) {
   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: '加载中 . . . ' })
   uni.showLoading({ title: '加载中 . . . ' })
   try {
   try {