From d76dd8be0306989ad32cdb8dca8d093822995c91 Mon Sep 17 00:00:00 2001 From: yxw <17074267@qq.com> Date: Tue, 5 Dec 2023 18:31:22 +0800 Subject: [PATCH] fix --- control.html | 6 ++++++ ducking.html | 6 ++++++ eq.html | 6 ++++++ filter.html | 6 ++++++ fs.html | 6 ++++++ home.html | 6 ++++++ js/main.js | 19 +++++++++++++++++-- login.html | 28 +++++++++++++++++++++++----- network.html | 6 ++++++ security.html | 6 ++++++ system.html | 9 +++++++++ 11 files changed, 97 insertions(+), 7 deletions(-) diff --git a/control.html b/control.html index a640fa1..eccaa09 100644 --- a/control.html +++ b/control.html @@ -44,6 +44,12 @@ class="selected"> + diff --git a/ducking.html b/ducking.html index 8fb340f..27365b9 100644 --- a/ducking.html +++ b/ducking.html @@ -45,6 +45,12 @@ class="selected"> + diff --git a/eq.html b/eq.html index bf3a004..ec0bab1 100644 --- a/eq.html +++ b/eq.html @@ -43,6 +43,12 @@ class="selected"> + diff --git a/filter.html b/filter.html index 1461398..d777472 100644 --- a/filter.html +++ b/filter.html @@ -45,6 +45,12 @@ class="selected"> + diff --git a/fs.html b/fs.html index 38d5cbe..494c968 100644 --- a/fs.html +++ b/fs.html @@ -45,6 +45,12 @@ class="selected"> + diff --git a/home.html b/home.html index 592410f..45c90db 100644 --- a/home.html +++ b/home.html @@ -48,6 +48,12 @@ class="selected"> + diff --git a/js/main.js b/js/main.js index 0dcf200..1a947bd 100644 --- a/js/main.js +++ b/js/main.js @@ -1,6 +1,6 @@ $(document).ready(function () { $("#blink").on('click', function () { - console.log('click','#blink') + console.log('click', '#blink') let url = 'http://192.168.0.116/cgi-bin/test.cgi'; let postData = { action: 'blink' @@ -20,11 +20,26 @@ $(document).ready(function () { } }, error: function (res) { + } }) }) + + $("#logout").on('click', function () { + sessionStorage.clear(); + window.location.href='login.html' + }) }) $(function () { - + var data = sessionStorage.getItem('state'); + if (data != 'logined') { + if (window.location.href.indexOf('login') != -1) { + //login page + console.log('bbbb') + } + else { + window.location.href = 'login.html' + } + } }) \ No newline at end of file diff --git a/login.html b/login.html index 54cfb88..8035222 100644 --- a/login.html +++ b/login.html @@ -37,7 +37,7 @@