浏览代码

企业登录-招聘会广告

lifanagju_citu 3 月之前
父节点
当前提交
9c43ac5b79
共有 3 个文件被更改,包括 59 次插入3 次删除
  1. 7 2
      src/permission.js
  2. 49 0
      src/plugins/dialogExtend/components/jobFairAd.vue
  3. 3 1
      src/plugins/dialogExtend/index.js

+ 7 - 2
src/permission.js

@@ -106,8 +106,13 @@ router.beforeEach(async (to, from, next) => {
     if (localStorage.getItem('entUpdatePassword') === 'needChange') fullScreen('entUpdatePassword')
     // 强制填写个人信息 fddeaddc47868b/ready
     else if (localStorage.getItem('necessaryInfoReady') === 'fddeaddc47868b' && tokenIndex === 2) dialogExtend('necessaryInfoDialog')
-    // 企业登录免费职位广告提示
-    else if (localStorage.getItem('positionAd')) {
+    // 企业登录-招聘会广告
+    else if (!localStorage.getItem('jobFairAd') && tokenIndex === 1) {
+      localStorage.setItem('jobFairAd', 'beenShow')
+      dialogExtend('jobFairAd')
+    }
+    // 企业登录-免费职位广告提示
+    else if (localStorage.getItem('positionAd') && tokenIndex === 1) {
       localStorage.setItem('positionAd', '')
       dialogExtend('positionAd')
     }

+ 49 - 0
src/plugins/dialogExtend/components/jobFairAd.vue

@@ -0,0 +1,49 @@
+<!-- 完善个人信息 -->
+<template>
+  <v-app>
+    <v-dialog
+      v-model="dialog"
+      max-width="900"
+      :persistent="false"
+      @update:modelValue="handleChange"
+    >
+      <div style="cursor: pointer; margin: 0 auto; position: relative;">
+        <v-img src="https://menduner.citupro.com:3443/dev/b263663417d6f0d8a5822ca4c1f607503d661c7e17269e7f60cf32f9eed91d77.jpg" :width="adImgWidth" style="height: auto;border-radius: 4px;" @click="adClick"></v-img>
+        <span style="color: #ddddddcc; font-size: 32px; position: absolute; right: 0px; top: 0px;" class="mdi mdi-close-circle-outline cursor-pointer px-3" @click="dialog = false"></span>
+      </div>
+    </v-dialog>
+  </v-app>
+</template>
+
+<script setup>
+defineOptions({name: 'dialogExtend-positionAd'})
+import { onMounted, ref } from 'vue'
+
+const props = defineProps({
+  cancel: Function
+})
+
+const adImgWidth = ref(document?.documentElement?.clientWidth ?
+  Math.floor(document.documentElement.clientWidth/2.2) > 500 ?
+  Math.floor(document.documentElement.clientWidth/2.2) : 500
+  : 900
+)
+
+
+const dialog = ref(false)
+onMounted(() => {
+  dialog.value = true
+})
+
+const adClick =  () => {
+  dialog.value = false
+  window.location.href = '/recruit/enterprise/jobFair/index'
+  props.cancel()
+}
+
+const handleChange = (val) => {
+  props.cancel()
+}
+</script>
+<style lang="scss" scoped>
+</style>

+ 3 - 1
src/plugins/dialogExtend/index.js

@@ -1,6 +1,7 @@
 import { createApp } from 'vue'
 import necessaryInfoDialog from './components/necessaryInfoDialog.vue'
 import positionAd from './components/positionAd.vue'
+import jobFairAd from './components/jobFairAd.vue'
 import vuetify from '@/plugins/vuetify'
 // import { showImprovePersonaInfo } from '@/utils/whiteList'
 // import router from '@/router'
@@ -11,7 +12,8 @@ const toastMessage = (type, option = {})  => {
   return new Promise((resolve, reject) => {
     const componentName = type === 'necessaryInfoDialog' ?
       necessaryInfoDialog : type === 'positionAd' ?
-      positionAd : null
+      positionAd : type === 'jobFairAd' ?
+      jobFairAd : null
     //
     const rootNode = document.createElement("div")
       document.querySelector('.v-application').appendChild(rootNode)