Kaynağa Gözat

兼职详情页改造

xinfeng 6 yıl önce
ebeveyn
işleme
b64605a748
1 değiştirilmiş dosya ile 62 ekleme ve 1 silme
  1. 62 1
      pages/job/_post/_id.vue

+ 62 - 1
pages/job/_post/_id.vue

@@ -121,6 +121,8 @@
   //   '停止招聘', //4
   //   '已删除', //5
   //   '审核失败', //6
+  import { MessageBox } from 'mint-ui';
+  import "mint-ui/lib/style.css";
   const COMPANY = 1;
   const PERSONAL = 2;
   export default {
@@ -159,6 +161,21 @@
         let res = await this.$axios.$post("/api/recruit/getRecruit", params)
         if (res.status === 1) {
           this.recruitData = res.data
+          let {role, longTimeTip} = this.recruitData
+          //拥有者&企业方&需要提示
+          if (role==='owner' && Number(longTimeTip) === 1) {
+            MessageBox({
+              title: '温馨提示',
+              message: '如果您长时间未招聘到优质程序员,可以试试发布【整包/云端项目】,有专属客服帮您人工对接开发者。',
+              cancelButtonText: "我知道了",
+              confirmButtonText: "前往发布",
+              closeOnClickModal: true,
+              showCancelButton: true,
+              showConfirmButton: true,
+            }).then(action => {
+              location.href = "proginn://project_publish"
+            });
+          }
         }
       },
       /** 刷新 **/
@@ -219,6 +236,10 @@
           location.href = 'proginn://login'
           return
         }
+        let checkAns = await this.dealTips()
+        if (!checkAns) {
+          return
+        }
         const recruitId = this.recruitId
         const params = {
           recruitId
@@ -231,7 +252,7 @@
       },
       /** 投递 **/
       async handleSendClick() {
-        const { applicationState, id } = this.recruitData
+        const { applicationState, id} = this.recruitData
         if (!(Number(applicationState) === 0)) {
           return
         }
@@ -239,6 +260,10 @@
         if (!await this.checkLogin(true)) {
           return
         }
+        let checkAns = await this.dealTips()
+        if (!checkAns) {
+          return
+        }
         let { realname_re } = this.$store.state.userinfo
         realname_re = Number(realname_re)
         if (realname_re !== 2) {
@@ -298,6 +323,42 @@
         } else {
           return {}
         }
+      },
+      async dealTips() {
+        let { directionNotMatch, workTypeNotMatch} = this.recruitData
+        //职位类型
+        directionNotMatch = 1
+        workTypeNotMatch = 1
+        if (Number(directionNotMatch) === 1) {
+         let ans1 = await MessageBox({
+            title: '温馨提示',
+            message: '该兼职岗位与您的【职位方向不符】,请您确认是否继续投递/沟通。',
+            cancelButtonText: "再考虑下",
+            confirmButtonText: "继续操作",
+            closeOnClickModal: true,
+            showCancelButton: true,
+            showConfirmButton: true,
+          })
+          if (ans1 === "cancle") {
+            return false
+          }
+        }
+        //工作方式
+        if (Number(workTypeNotMatch) === 1) {
+          let ans2 = await MessageBox({
+            title: '温馨提示',
+            message: '该兼职岗位与您选择的【工作方式不符】,请您确认是否继续投递/沟通。',
+            cancelButtonText: "再考虑下",
+            confirmButtonText: "继续操作",
+            closeOnClickModal: true,
+            showCancelButton: true,
+            showConfirmButton: true,
+          })
+          if (ans2 === "cancle") {
+            return false
+          }
+        }
+        return true
       }
     }
   }