Explorar el Código

增加登录状态区分

增加登录状态区分
dangyunlong hace 1 día
padre
commit
71d67a1632

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

@@ -1 +1 @@
-{"id":"b667e484-8fbe-4037-99bd-14e02f112990","timestamp":1745569079984}
+{"id":"fd18f12e-a2c0-451b-96b0-1f3ffe3da0ae","timestamp":1745723121111}

+ 0 - 1
.nuxt/manifest/meta/b667e484-8fbe-4037-99bd-14e02f112990.json

@@ -1 +0,0 @@
-{"id":"b667e484-8fbe-4037-99bd-14e02f112990","timestamp":1745569079984,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}

+ 1 - 0
.nuxt/manifest/meta/fd18f12e-a2c0-451b-96b0-1f3ffe3da0ae.json

@@ -0,0 +1 @@
+{"id":"fd18f12e-a2c0-451b-96b0-1f3ffe3da0ae","timestamp":1745723121111,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}

+ 1 - 1
.nuxt/tsconfig.json

@@ -102,7 +102,7 @@
         "./imports"
       ],
       "#app-manifest": [
-        "./manifest/meta/b667e484-8fbe-4037-99bd-14e02f112990.json"
+        "./manifest/meta/fd18f12e-a2c0-451b-96b0-1f3ffe3da0ae.json"
       ],
       "#components": [
         "./components"

+ 27 - 24
components/home/ListSecondaryHeading.vue

@@ -1,9 +1,9 @@
 <template>
-    <nav class="channel_nav back100">
+    <nav class="channel_nav_box">
         <a class="channel_nav_a" href="javascript:(void)" title="name">{{ name }}</a>
-        <span v-for="(item,index) in nav">
-            <NuxtLink :to="{ path: `/${targetRoute}/${item.aLIas_pinyin}/list-1.html`}" class="channel_nav_a" v-if="index<=7">{{ item.alias }}</NuxtLink>
-        </span>
+        <div class="channel_nav_a_box clearfix">
+            <NuxtLink :to="{ path: `/${targetRoute}/${item.aLIas_pinyin}/list-1.html`}" class="channel_nav_a" v-for="item in nav">{{ item.alias }}</NuxtLink>
+        </div>
     </nav>
 </template>
 
@@ -26,34 +26,37 @@ const targetRoute = segments[1];
 </script>
 
 <style lang="less" scoped>
-.channel_nav {
-    height: 60px;
+.channel_nav_box {
+    display:flex; 
     width: 1200px;
     margin: 0 auto;
-    background-image: url(http://img.bjzxtw.org.cn/master/www/snscw/5.png);
+    background: url(http://img.bjzxtw.org.cn/master/www/snscw/5.png) no-repeat bottom;
+    background-size:100% auto;   
     margin-top: 40px;
-
+    .channel_nav_head {
+        width: 100px;
+        height: 60px;
+        line-height: 60px; 
+        color: #fff;
+        margin: 0px 70px 0px 31px;
+        box-sizing:border-box;
+        margin-top:auto;
+        font-size:20px;
+        font-weight:bold;
+    }
+    .channel_nav_a_box{
+        flex:1;
+        padding:12px 0px;
+    }
+      
     .channel_nav_a {
         float: left;
-        height: 60px;
-        line-height: 60px;
+        height: 26px;
+        line-height: 26px;
         color: #255590;
         font-size: 20px;
-        margin: 0px 19px;
+        margin: 5px 19px;
         font-weight: bold;
     }
-
-    >.channel_nav_a:nth-of-type(1) {
-        color: #fff;
-        width: 230px;
-        padding-left: 50px;
-        box-sizing: border-box;
-        margin-left:0;
-        margin-right: 0;
-    }
-}
-.back100 {
-    background-size: 100% 100%;
-    background-repeat: no-repeat;
 }
 </style>

+ 28 - 25
components/home/SecondaryHeading.vue

@@ -1,9 +1,9 @@
 <template>
-    <nav class="channel_nav back100">
-        <a class="channel_nav_a" href="javascript:(void)" title="title">{{ title }}</a>
-        <span v-for="(item,index) in titleData">
-            <NuxtLink :to="{ path: `/${item.aLIas_pinyin}/list-1.html`}" class="channel_nav_a" v-if="index<=7">{{ item.alias }}</NuxtLink>
-        </span>
+    <nav class="channel_nav_box">
+        <a class="channel_nav_head" href="javascript:(void)" title="title">{{ title }}</a>
+        <div class="channel_nav_a_box clearfix">
+            <NuxtLink :to="{ path: `/${item.aLIas_pinyin}/list-1.html`}" class="channel_nav_a" v-for="item in titleData">{{ item.alias }}</NuxtLink>
+        </div>
     </nav>
 </template>
 
@@ -46,34 +46,37 @@ getPageData();
 </script>
 
 <style lang="less" scoped>
-.channel_nav {
-    height: 60px;
+.channel_nav_box {
+    display:flex; 
     width: 1200px;
     margin: 0 auto;
-    background-image: url(http://img.bjzxtw.org.cn/master/www/snscw/5.png);
+    background: url(http://img.bjzxtw.org.cn/master/www/snscw/5.png) no-repeat bottom;
+    background-size:100% auto;   
     margin-top: 40px;
-
+    .channel_nav_head {
+        width: 100px;
+        height: 60px;
+        line-height: 60px; 
+        color: #fff;
+        margin: 0px 70px 0px 31px;
+        box-sizing:border-box;
+        margin-top:auto;
+        font-size:20px;
+        font-weight:bold;
+    }
+    .channel_nav_a_box{
+        flex:1;
+        padding:12px 0px;
+    }
+      
     .channel_nav_a {
         float: left;
-        height: 60px;
-        line-height: 60px;
+        height: 26px;
+        line-height: 26px;
         color: #255590;
         font-size: 20px;
-        margin: 0px 19px;
+        margin: 5px 19px;
         font-weight: bold;
     }
-
-    >.channel_nav_a:nth-of-type(1) {
-        color: #fff;
-        width: 230px;
-        padding-left: 50px;
-        box-sizing: border-box;
-        margin-left:0;
-        margin-right: 0;
-    }
-}
-.back100 {
-    background-size: 100% 100%;
-    background-repeat: no-repeat;
 }
 </style>

+ 12 - 18
components/home/pageHead.vue

@@ -278,30 +278,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('您已退出登录!')
             }
         }
     }

+ 1 - 1
components/home/pageNavigation.vue

@@ -84,7 +84,7 @@ async function getNavigation2() {
         method: 'GET',
         query: {
             'pid': 0,
-            'num': 3,
+            'num': 4,
             'placeid': 21
         },
     });