Browse Source

Merge branch 'dev' of https://git.citupro.com/zhengnaiwen_citu/menduner into dev

Xiao_123 1 year ago
parent
commit
73afe2dd96
2 changed files with 7 additions and 4 deletions
  1. 1 1
      components.d.ts
  2. 6 3
      src/layout/personal/navBar.vue

+ 1 - 1
components.d.ts

@@ -20,7 +20,7 @@ declare module 'vue' {
     CtPagination: typeof import('./src/components/CtPagination/index.vue')['default']
     CtSearch: typeof import('./src/components/CtSearch/index.vue')['default']
     CtTextField: typeof import('./src/components/CtVuetify/CtTextField/index.vue')['default']
-    DatePicker: typeof import('./src/components/FormUI/datePicker/index.vue')['default']
+    DatePicker: typeof import('./src/components/DatePicker/index.vue')['default']
     Details: typeof import('./src/components/Enterprise/details.vue')['default']
     Empty: typeof import('./src/components/Empty/index.vue')['default']
     HeadSearch: typeof import('./src/components/headSearch/index.vue')['default']

+ 6 - 3
src/layout/personal/navBar.vue

@@ -129,7 +129,8 @@ const handleLogoClick = () => { router.push({ path: '/home'}) }
 const changeLoginType = async () => {
   // const data = await getUserBindEnterpriseList()
   const data = await getUserBindEnterpriseList() // 申请通过才会数据,否则空数组
-  if (data?.length) router.push({ path: '/enterprise' })
+  // if (data?.length) router.push({ path: '/enterprise' })
+  if (data?.length) handleLogout(330)
   else getApplyInfo()
 }
 
@@ -147,10 +148,12 @@ const handleToPersonalCenter = () => {
 }
 
 // 退出登录
-const handleLogout = async () => {
+const handleLogout = async (index) => {
   // try {
     await userStore.userLogout()
-    router.push({ path: '/login' })
+    // if (index) router.push({ name: '/login', query: { loginType: index } })
+    if (index) router.push({ path: `/login?loginType=${index}` })
+    else router.push({ path: '/login' })
   // } catch (error) {
   //   console.log(error, 'error')
   // }