Browse Source

修改单点登录的bug

修改单点登录的bug
dangyunlong 4 days ago
parent
commit
16f89b49ca

File diff suppressed because it is too large
+ 979 - 0
.nuxt/dev/index.mjs


File diff suppressed because it is too large
+ 0 - 0
.nuxt/dev/index.mjs.map


+ 1 - 0
.nuxt/imports.d.ts

@@ -31,4 +31,5 @@ export { injectHead, useHead, useSeoMeta, useHeadSafe, useServerHead, useServerS
 export { requestData, requestDataPromise, requestDataWebUrl, requestHome } from '../composables/getData';
 export { getTime, getTitleLength, getLinkPath, getLinkPathDetail, getRoutePath } from '../composables/publicFunction';
 export { seoSetup } from '../composables/useSeo';
+export { useNuxtDevTools } from '../node_modules/@nuxt/devtools/dist/runtime/use-nuxt-devtools';
 export { definePageMeta } from '../node_modules/nuxt/dist/pages/runtime/composables';

+ 1 - 1
.nuxt/manifest/latest.json

@@ -1 +1 @@
-{"id":"c1093163-138e-40f4-bb35-37066dc273a5","timestamp":1745545825327}
+{"id":"dev","timestamp":1745565653437}

+ 1 - 0
.nuxt/manifest/meta/34a3a0ab-501f-437b-97d1-9ee2759bb696.json

@@ -0,0 +1 @@
+{"id":"34a3a0ab-501f-437b-97d1-9ee2759bb696","timestamp":1745565170638,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}

+ 0 - 1
.nuxt/manifest/meta/c1093163-138e-40f4-bb35-37066dc273a5.json

@@ -1 +0,0 @@
-{"id":"c1093163-138e-40f4-bb35-37066dc273a5","timestamp":1745545825327,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}

+ 1 - 0
.nuxt/manifest/meta/dev.json

@@ -0,0 +1 @@
+{"id":"dev","timestamp":1745565653437,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}

+ 17 - 0
.nuxt/nitro.json

@@ -0,0 +1,17 @@
+{
+  "date": "2025-04-25T07:20:57.090Z",
+  "preset": "nitro-dev",
+  "framework": {
+    "name": "nuxt",
+    "version": "3.15.2"
+  },
+  "versions": {
+    "nitro": "2.10.4"
+  },
+  "dev": {
+    "pid": 19756,
+    "workerAddress": {
+      "socketPath": "\\\\.\\pipe\\nitro\\worker-19756-1.sock"
+    }
+  }
+}

+ 9 - 0
.nuxt/nuxt.json

@@ -0,0 +1,9 @@
+{
+  "_hash": "KfTji8fXd8",
+  "project": {
+    "rootDir": "D:/MyProject/gogs/sannongshichangwang"
+  },
+  "versions": {
+    "nuxt": "3.15.2"
+  }
+}

+ 1 - 1
.nuxt/tsconfig.json

@@ -102,7 +102,7 @@
         "./imports"
       ],
       "#app-manifest": [
-        "./manifest/meta/c1093163-138e-40f4-bb35-37066dc273a5.json"
+        "./manifest/meta/dev.json"
       ],
       "#components": [
         "./components"

+ 1 - 0
.nuxt/types/build.d.ts

@@ -11,6 +11,7 @@ declare module "#build/paths.mjs";
 declare module "#build/root-component.mjs";
 declare module "#build/plugins.server.mjs";
 declare module "#build/test-component-wrapper.mjs";
+declare module "#build/devtools/settings.mjs";
 declare module "#build/routes.mjs";
 declare module "#build/pages.mjs";
 declare module "#build/router.options.mjs";

+ 2 - 0
.nuxt/types/imports.d.ts

@@ -122,6 +122,7 @@ declare global {
   const useModel: typeof import('vue')['useModel']
   const useNuxtApp: typeof import('../../node_modules/nuxt/dist/app/nuxt')['useNuxtApp']
   const useNuxtData: typeof import('../../node_modules/nuxt/dist/app/composables/asyncData')['useNuxtData']
+  const useNuxtDevTools: typeof import('../../node_modules/@nuxt/devtools/dist/runtime/use-nuxt-devtools')['useNuxtDevTools']
   const usePreviewMode: typeof import('../../node_modules/nuxt/dist/app/composables/preview')['usePreviewMode']
   const useRequestEvent: typeof import('../../node_modules/nuxt/dist/app/composables/ssr')['useRequestEvent']
   const useRequestFetch: typeof import('../../node_modules/nuxt/dist/app/composables/ssr')['useRequestFetch']
@@ -309,6 +310,7 @@ declare module 'vue' {
     readonly useModel: UnwrapRef<typeof import('vue')['useModel']>
     readonly useNuxtApp: UnwrapRef<typeof import('../../node_modules/nuxt/dist/app/nuxt')['useNuxtApp']>
     readonly useNuxtData: UnwrapRef<typeof import('../../node_modules/nuxt/dist/app/composables/asyncData')['useNuxtData']>
+    readonly useNuxtDevTools: UnwrapRef<typeof import('../../node_modules/@nuxt/devtools/dist/runtime/use-nuxt-devtools')['useNuxtDevTools']>
     readonly usePreviewMode: UnwrapRef<typeof import('../../node_modules/nuxt/dist/app/composables/preview')['usePreviewMode']>
     readonly useRequestEvent: UnwrapRef<typeof import('../../node_modules/nuxt/dist/app/composables/ssr')['useRequestEvent']>
     readonly useRequestFetch: UnwrapRef<typeof import('../../node_modules/nuxt/dist/app/composables/ssr')['useRequestFetch']>

+ 7 - 2
.nuxt/types/plugins.d.ts

@@ -9,12 +9,17 @@ type NuxtAppInjections =
   InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/revive-payload.client.js")> &
   InjectionType<typeof import("../../node_modules/nuxt/dist/head/runtime/plugins/unhead.js")> &
   InjectionType<typeof import("../../node_modules/nuxt/dist/pages/runtime/plugins/router.js")> &
-  InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/payload.client.js")> &
+  InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/browser-devtools-timing.client.js")> &
   InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/navigation-repaint.client.js")> &
   InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/check-outdated-build.client.js")> &
   InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/revive-payload.server.js")> &
   InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/chunk-reload.client.js")> &
   InjectionType<typeof import("../../node_modules/nuxt/dist/pages/runtime/plugins/prefetch.client.js")> &
+  InjectionType<typeof import("../../node_modules/nuxt/dist/pages/runtime/plugins/check-if-page-unused.js")> &
+  InjectionType<typeof import("../../node_modules/@nuxt/devtools/dist/runtime/plugins/devtools.server.js")> &
+  InjectionType<typeof import("../../node_modules/@nuxt/devtools/dist/runtime/plugins/devtools.client.js")> &
+  InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/dev-server-logs.js")> &
+  InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/check-if-layout-used.js")> &
   InjectionType<typeof import("../../plugins/element-plus")> &
   InjectionType<typeof import("../../plugins/request")> &
   InjectionType<typeof import("../../plugins/globals")> &
@@ -24,7 +29,7 @@ declare module '#app' {
   interface NuxtApp extends NuxtAppInjections { }
 
   interface NuxtAppLiterals {
-    pluginName: 'nuxt:revive-payload:client' | 'nuxt:head' | 'nuxt:router' | 'nuxt:payload' | 'nuxt:revive-payload:server' | 'nuxt:chunk-reload' | 'nuxt:global-components' | 'nuxt:prefetch'
+    pluginName: 'nuxt:revive-payload:client' | 'nuxt:head' | 'nuxt:router' | 'nuxt:browser-devtools-timing' | 'nuxt:revive-payload:server' | 'nuxt:chunk-reload' | 'nuxt:global-components' | 'nuxt:prefetch' | 'nuxt:checkIfPageUnused' | 'nuxt:checkIfLayoutUsed'
   }
 }
 

+ 8 - 3
components/home/pageHead.vue

@@ -71,7 +71,7 @@
 <script setup>
 //1.加载基本依赖 start ---------------------------------------->
 import { ref, watch, onMounted } from 'vue'
-import { ElDialog } from 'element-plus'
+import { ElDialog,ElMessage } from 'element-plus'
 import { getToken, setToken, removeToken } from '@/store/useCookieStore'
 import { setTicket, removeTicket } from '@/store/useticketStore'
 //网站地址
@@ -163,6 +163,7 @@ let userCenter = () => {
 //3.跳转菜单逻辑 start ---------------------------------------->
 let gotosystem = () => {
     let url = $BwebUrl + '/#/login?userurl=' + $CwebUrl;
+    isShow.value = false;
     //window.location.href = url; 
     window.open(url, '_blank');
 }
@@ -170,7 +171,7 @@ let gotosystem = () => {
 //点击退出按钮
 let exit = () => {
     window.location.href = $CwebUrl;
-
+    isShow.value = false;
     isDel.value = 1
     token1.value = getToken()
 
@@ -257,6 +258,7 @@ onMounted(async () => {
         if(token == undefined){
             //如果没有获取到token 不访问后端获取在线状态
             console.log("没有获取到token!无需查询登录状态!")
+            showToken.value = false;
 
         }else{
             //如果获取到了token 访问后端查询状态
@@ -288,6 +290,7 @@ onMounted(async () => {
                     isShow.value = false;
                     removeToken();
                     removeTicket();
+                    ElMessage.error('您已退出登录!')
                 }
             } else {
                 console.log("用户已退出登录!");
@@ -296,9 +299,11 @@ onMounted(async () => {
                 showToken.value = false;
                 removeToken();
                 removeTicket();
+                ElMessage.error('您没有权限登录该网站!')
+                //跳转到首页
+                //window.location.href = $CwebUrl;
             }
         }
-
     }
     getLoginStatus();
     setInterval(getLoginStatus, 3000);

Some files were not shown because too many files changed in this diff