Prechádzať zdrojové kódy

门墩儿猎头不展示侧边快捷栏

Xiao_123 1 týždeň pred
rodič
commit
40b1c5eb5b
2 zmenil súbory, kde vykonal 38 pridanie a 14 odobranie
  1. 20 4
      src/layout/index.vue
  2. 18 10
      src/views/headhunting/components/nav.vue

+ 20 - 4
src/layout/index.vue

@@ -10,8 +10,14 @@
         <component :is="Component" :key="router.currentRoute.value.path" v-if="!router.currentRoute.value.meta?.keepAlive"/>
       </router-view>  -->
     </div>
-    <Footers v-if="footerWhiteList.indexOf(router.currentRoute.value.path) === -1" :class="{'mt-10': !router.currentRoute.value.path.includes('/mall')}"></Footers>
-    <Slider v-if="whiteList.indexOf(router.currentRoute.value.path) === -1" class="slider"></Slider>
+    <Footers 
+      v-if="footerWhiteList.indexOf(router.currentRoute.value.path) === -1" 
+      :class="{'mt-10': !router.currentRoute.value.path.includes('/mall')}"
+    ></Footers>
+    <Slider 
+      v-if="whiteList.indexOf(router.currentRoute.value.path) === -1" 
+      class="slider"
+    ></Slider>
 
     <BackTop />
   </div>
@@ -19,7 +25,7 @@
 
 <script setup>
 defineOptions({ name: 'personal-layout-index' })
-import { onMounted, watch } from 'vue'
+import { onMounted } from 'vue'
 import NavBar from './personal/navBar.vue'
 import Footers from './personal/footer.vue'
 import Slider from './personal/slider.vue'
@@ -29,7 +35,17 @@ import { useMallStore } from '@/store/mall'
 import BackTop from '@/components/BackTop'
 
 // 不展示侧边栏名单
-const whiteList = ['/login', '/privacyPolicy', '/userAgreement', '/register', '/recruit/personal/advertisement/introduce', '/contactService']
+const whiteList = [
+  '/login', 
+  '/privacyPolicy', 
+  '/userAgreement', 
+  '/register', 
+  '/recruit/personal/advertisement/introduce', 
+  '/contactService',
+  '/headhunting',
+  '/headhunting/service',
+  '/headhunting/service/details'
+]
 // 不展示页脚白名单
 const footerWhiteList = [
   '/recruit/personal/message',

+ 18 - 10
src/views/headhunting/components/nav.vue

@@ -19,6 +19,8 @@
   <CtDialog :visible="showDialog" titleClass="text-h6" :footer="true" :widthType="2" title="联系我们" @submit="handleSubmit" @close="handleClose">
     <CtForm ref="formPageRef" :items="formItems"></CtForm>
   </CtDialog>
+
+  <Loading :visible="loading" />
 </template>
 
 <script setup>
@@ -78,19 +80,25 @@ const handleClose = () => {
   formItems.value.options.forEach(e => e.value = '')
 }
 
+const loading = ref(false)
 const handleSubmit = async () => {
   const { valid } = await formPageRef.value.formRef.validate()
   if (!valid) return
-  const obj = {}
-  formItems.value.options.forEach(e => obj[e.key] = e.value)
-  await huntSubmit(obj)
-  handleClose()
-  Curtain('message', {
-    message: '提交成功,我们会尽快与您联系',
-    name: 'submit',
-    color: '#00B760',
-    iconFontSize: 300
-  })
+  loading.value = true
+  try {
+    const obj = {}
+    formItems.value.options.forEach(e => obj[e.key] = e.value)
+    await huntSubmit(obj)
+    handleClose()
+    Curtain('message', {
+      message: '提交成功,我们会尽快与您联系',
+      name: 'submit',
+      color: '#00B760',
+      iconFontSize: 300
+    })
+  } finally {
+    loading.value = false
+  }
 }
 </script>