Browse Source

增加已退出状态

增加已退出状态
dangyunlong 4 days ago
parent
commit
cf89a7b342

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


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


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

@@ -33,5 +33,4 @@ export { getTime, getTitleLength } from '../composables/publicFunction';
 export { seoSetup } from '../composables/useSeo';
 export { default as proxy } from '../utils/proxy';
 export { apiUse, asyncFetchData, fGET, fPOST, fPUT, fDELETE, GET, POST, PUT, DELETE } from '../utils/request';
-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":"dev","timestamp":1745569565000}
+{"id":"a9f34ecf-c195-4452-930f-cff7bded4610","timestamp":1745722107681}

+ 1 - 0
.nuxt/manifest/meta/a9f34ecf-c195-4452-930f-cff7bded4610.json

@@ -0,0 +1 @@
+{"id":"a9f34ecf-c195-4452-930f-cff7bded4610","timestamp":1745722107681,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}

+ 0 - 1
.nuxt/manifest/meta/aae1fc11-925f-440a-acb1-c29dae8d2571.json

@@ -1 +0,0 @@
-{"id":"aae1fc11-925f-440a-acb1-c29dae8d2571","timestamp":1745566502605,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}

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

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

+ 0 - 17
.nuxt/nitro.json

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

+ 0 - 9
.nuxt/nuxt.json

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

+ 1 - 1
.nuxt/tsconfig.json

@@ -102,7 +102,7 @@
         "./imports"
       ],
       "#app-manifest": [
-        "./manifest/meta/dev.json"
+        "./manifest/meta/a9f34ecf-c195-4452-930f-cff7bded4610.json"
       ],
       "#components": [
         "./components"

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

@@ -11,7 +11,6 @@ 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";

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

@@ -130,7 +130,6 @@ 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']
@@ -326,7 +325,6 @@ 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']>

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

@@ -9,17 +9,12 @@ 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/browser-devtools-timing.client.js")> &
+  InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/payload.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.js")> &
   InjectionType<typeof import("../../plugins/request.js")> &
   InjectionType<typeof import("../../plugins/globals.js")> &
@@ -29,7 +24,7 @@ declare module '#app' {
   interface NuxtApp extends NuxtAppInjections { }
 
   interface NuxtAppLiterals {
-    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'
+    pluginName: 'nuxt:revive-payload:client' | 'nuxt:head' | 'nuxt:router' | 'nuxt:payload' | 'nuxt:revive-payload:server' | 'nuxt:chunk-reload' | 'nuxt:global-components' | 'nuxt:prefetch'
   }
 }
 

+ 12 - 18
components/home/pageHead.vue

@@ -296,30 +296,24 @@ onMounted(async () => {
             });
             const result = await responseStatus.json();
             console.log(result)
+            
             if (result.code == 200) {
-                if (result.data.isLogin == true) {
-                    console.log("用户已经登录!");
-                    showToken.value = true;
-
-                } else {
-                    console.log("用户已退出登录!");
-                    showToken.value = false;
-                    //退出登录
-                    isShow.value = false;
-                    removeToken();
-                    removeTicket();
-                    ElMessage.error('您已退出登录!')
-                }
-            } else {
-                console.log("用户已退出登录!");
-                //退出登录
+                console.log("用户已经登录!");
+                showToken.value = true;
+            }
+            if (result.code == -1) {
                 isShow.value = false;
                 showToken.value = false;
                 removeToken();
                 removeTicket();
                 ElMessage.error('您没有权限登录该网站!')
-                //跳转到首页
-                //window.location.href = $CwebUrl;
+            }
+            if (result.code == -2) {
+                isShow.value = false;
+                showToken.value = false;
+                removeToken();
+                removeTicket();
+                ElMessage.error('您已退出登录!')
             }
         }
     }

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