From 0fcc66aa618d239fea859a2fb43b20fdc3948e09 Mon Sep 17 00:00:00 2001 From: yxw <17074267@qq.com> Date: Thu, 23 Nov 2023 10:23:31 +0800 Subject: [PATCH] fix --- control.html | 2 +- css/app.css | 3 ++- ducking.html | 12 ++++++------ eq.html | 9 +++++---- filter.html | 10 +++++----- fs.html | 6 +++--- home.html | 28 +++++++++++++++------------- js/main.js | 2 +- login.html | 2 +- network.html | 4 +++- security.html | 5 +++-- system.html | 8 ++++---- 12 files changed, 49 insertions(+), 42 deletions(-) diff --git a/control.html b/control.html index 9f7e6a7..9d2e5e8 100644 --- a/control.html +++ b/control.html @@ -178,7 +178,7 @@ url: url, data: postData, dataType: "json", - contentType: "application/json; charset=utf-8", + //contentType: "application/json; charset=utf-8", success: function (res) { console.log('返回数据', typeof (res), res) if (res.success) { diff --git a/css/app.css b/css/app.css index 61d178d..e55bbfb 100644 --- a/css/app.css +++ b/css/app.css @@ -167,7 +167,8 @@ input[type="number"]{ } input:disabled { - background-color: #000; + background-color: #333 !important; + color: #000 !important; } .form-control:disabled { diff --git a/ducking.html b/ducking.html index 02da30d..2e646a3 100644 --- a/ducking.html +++ b/ducking.html @@ -377,8 +377,8 @@ let url = 'http://192.168.0.116/cgi-bin/test.cgi'; let postData = { - state: $value, action: "ducker_set", + state: $value, } $.ajax({ @@ -386,7 +386,7 @@ url: url, data: postData, dataType: "json", - contentType: "application/json; charset=utf-8", + //contentType: "application/json; charset=utf-8", success: function (res) { console.log('返回数据', typeof (res), res) if (res.success) { @@ -421,9 +421,9 @@ function micChange(mic1, mic2) { let url = 'http://192.168.0.116/cgi-bin/test.cgi'; let postData = { + action: "ducker_set", mic1: mic1 ? "open" : "close", mic2: mic2 ? "open" : "close", - action: "ducker_set", } $.ajax({ @@ -431,7 +431,7 @@ url: url, data: postData, dataType: "json", - contentType: "application/json; charset=utf-8", + //contentType: "application/json; charset=utf-8", success: function (res) { console.log('返回数据', typeof (res), res) if (res.success) { @@ -466,7 +466,7 @@ threshold: -30, attack: 200, ducklevel: -3, - release: 1001, + release: 1000, state: "enable" }, mic1: "close", @@ -654,7 +654,7 @@ url: url, data: postData, dataType: "json", - contentType: "application/json; charset=utf-8", + //contentType: "application/json; charset=utf-8", success: function (res) { if (res.success) { data = res.content diff --git a/eq.html b/eq.html index 68e29aa..5ae63c1 100644 --- a/eq.html +++ b/eq.html @@ -978,14 +978,14 @@ let element = $('#mic110KHz') let input = $("#mic110KHz .volume-slider input") input.attr('value', (parseInt(number) + 10) / (20 / 100)) - updatemic110KHzSlider(element); + updatemic110KHzSlider(element,false); input.on('input', function () { - updatemic110KHzSlider(element); + updatemic110KHzSlider(element,true); }) input.on('change', function () { - updatemic110KHzSlider(element); + updatemic110KHzSlider(element,false); }) } @@ -1005,6 +1005,7 @@ let number = ((input.val() * (20 / 100)) - 10).toFixed(1) $value.val(`${number}`); //调用接口提交数据 + console.log(number,mic110kValue) if (number != mic110kValue && isInput == false) { changeInputValue('mic110k', number) } @@ -1210,7 +1211,7 @@ url: url, data: postData, dataType: "json", - contentType: "application/json; charset=utf-8", + //contentType: "application/json; charset=utf-8", success: function (res) { console.log('返回数据', typeof (res), res) if (res.success) { diff --git a/filter.html b/filter.html index 91e8495..1f69704 100644 --- a/filter.html +++ b/filter.html @@ -193,7 +193,7 @@ url: url, data: postData, dataType: "json", - contentType: "application/json; charset=utf-8", + //contentType: "application/json; charset=utf-8", success: function (res) { let resData = res if (resData.success) { @@ -225,7 +225,7 @@ url: url, data: postData, dataType: "json", - contentType: "application/json; charset=utf-8", + //contentType: "application/json; charset=utf-8", success: function (res) { let resData = res if (resData.success) { @@ -255,7 +255,7 @@ url: url, data: postData, dataType: "json", - contentType: "application/json; charset=utf-8", + //contentType: "application/json; charset=utf-8", success: function (res) { let resData = res if (resData.success) { @@ -285,7 +285,7 @@ url: url, data: postData, dataType: "json", - contentType: "application/json; charset=utf-8", + //contentType: "application/json; charset=utf-8", success: function (res) { let resData = res if (resData.success) { @@ -316,7 +316,7 @@ url: url, data: postData, dataType: "json", - contentType: "application/json; charset=utf-8", + //contentType: "application/json; charset=utf-8", success: function (res) { let resData = res if (resData.success) { diff --git a/fs.html b/fs.html index 5176bfa..ed329c8 100644 --- a/fs.html +++ b/fs.html @@ -174,7 +174,7 @@ url: url, data: postData, dataType: "json", - contentType: "application/json; charset=utf-8", + //contentType: "application/json; charset=utf-8", success: function (res) { console.log('返回数据', typeof (res), res) if (res.success) { @@ -206,7 +206,7 @@ url: url, data: postData, dataType: "json", - contentType: "application/json; charset=utf-8", + //contentType: "application/json; charset=utf-8", success: function (res) { console.log('返回数据', typeof (res), res) if (res.success) { @@ -236,7 +236,7 @@ url: url, data: postData, dataType: "json", - contentType: "application/json; charset=utf-8", + //contentType: "application/json; charset=utf-8", success: function (res) { console.log('返回数据', typeof (res), res) if (res.success) { diff --git a/home.html b/home.html index f1c21d3..c8e8fb0 100644 --- a/home.html +++ b/home.html @@ -303,7 +303,7 @@
- +
@@ -509,7 +509,7 @@
- +
@@ -982,7 +982,7 @@ url: url, data: postData, dataType: "json", - contentType: "application/json; charset=utf-8", + //contentType: "application/json; charset=utf-8", success: function (res) { console.log('返回数据', typeof (res), res) let resData = JSON.parse(res) @@ -1025,7 +1025,7 @@ url: url, data: postData, dataType: "json", - contentType: "application/json; charset=utf-8", + //contentType: "application/json; charset=utf-8", success: function (res) { console.log('返回数据', typeof (res), res) let resData = JSON.parse(res) @@ -1070,7 +1070,7 @@ url: url, data: postData, dataType: "json", - contentType: "application/json; charset=utf-8", + //contentType: "application/json; charset=utf-8", success: function (res) { console.log('返回数据', typeof (res), res) let resData = JSON.parse(res) @@ -1085,7 +1085,7 @@ error: function (res) { } }) - alert(state ? "close" : "open") + // alert(state ? "close" : "open") }) @@ -1116,7 +1116,7 @@ url: url, data: postData, dataType: "json", - contentType: "application/json; charset=utf-8", + //contentType: "application/json; charset=utf-8", success: function (res) { console.log('返回数据', typeof (res), res) let resData = JSON.parse(res) @@ -1131,7 +1131,7 @@ error: function (res) { } }) - alert(state ? "close" : "open") + // alert(state ? "close" : "open") }) $('#outputvolume-voice-add').on('click', function () { @@ -1160,7 +1160,7 @@ url: url, data: postData, dataType: "json", - contentType: "application/json; charset=utf-8", + //contentType: "application/json; charset=utf-8", success: function (res) { console.log('返回数据', typeof (res), res) let resData = JSON.parse(res) @@ -1175,7 +1175,7 @@ error: function (res) { } }) - alert(state ? "close" : "open") + // alert(state ? "close" : "open") }) }) @@ -1194,7 +1194,7 @@ url: url, data: postData, dataType: "json", - contentType: "application/json; charset=utf-8", + //contentType: "application/json; charset=utf-8", success: function (res) { console.log('返回数据', typeof (res), res) let resData = JSON.parse(res) @@ -1290,8 +1290,10 @@ function bindData() { $("input[name='lineinput']").val([`${data.lineinput.signal}`]) - $("input[name='mic1']").attr('checked', data.mic1.signal == 'open') - $("input[name='mic2']").attr('checked', data.mic2.signal == 'open') + $("input[name='mic1']").attr('checked', 'open') + $("input[name='mic2']").attr('checked', 'open') + // $("input[name='mic1']").attr('checked', data.mic1.signal == 'open') + // $("input[name='mic2']").attr('checked', data.mic2.signal == 'open') $("input[name='outputvolume-voice-close']").attr('checked', data.output.state == 'close') $("input[name='microphone2-voice-close']").attr('checked', data.mic2.state == 'close') $("input[name='microphone1-voice-close']").attr('checked', data.mic1.state == 'close') diff --git a/js/main.js b/js/main.js index b865242..598961e 100644 --- a/js/main.js +++ b/js/main.js @@ -10,7 +10,7 @@ $(document).ready(function () { url: url, data: postData, dataType: "json", - contentType: "application/json; charset=utf-8", + //contentType: "application/json; charset=utf-8", success: function (res) { if (res.success) { data = res.content diff --git a/login.html b/login.html index 536f506..3887ec0 100644 --- a/login.html +++ b/login.html @@ -88,7 +88,7 @@ url: url, data: postData, dataType: "json", - contentType: "application/json; charset=utf-8", + //contentType: "application/json; charset=utf-8", success: function (res) { if (res.success) { alert('登录成功') diff --git a/network.html b/network.html index a401555..60f0129 100644 --- a/network.html +++ b/network.html @@ -159,7 +159,7 @@ url: url, data: postData, dataType: "json", - contentType: "application/json; charset=utf-8", + //contentType: "application/json; charset=utf-8", success: function (res) { if (res.success) { data = res.content @@ -179,6 +179,7 @@ function checkDisable() { var type = $("input[name='type']:checked").val() + console.log(type) if (type == 'dhcp') { $("#ipaddress").attr('disabled', "disabled"); $('#subnet').attr('disabled', "disabled"); @@ -217,6 +218,7 @@ function bindData() { console.log(data) + $("input[name='type']").val([`${data.config}`]) $('#mac').text(`${data.mac}`) $("#ipaddress").val(`${data.address}`) $('#subnet').val(`${data.subnet}`) diff --git a/security.html b/security.html index 257e516..9350e33 100644 --- a/security.html +++ b/security.html @@ -144,17 +144,18 @@ url: url, data: postData, dataType: "json", - contentType: "application/json; charset=utf-8", + //contentType: "application/json; charset=utf-8", success: function (res) { console.log('返回数据', typeof (res), res) if (res.success) { - alert('success') + window.location.href='login.html' } else { alert(res.message) } }, error: function (res) { + alert('comm error') } }) }) diff --git a/system.html b/system.html index 33e033e..86cecf7 100644 --- a/system.html +++ b/system.html @@ -98,7 +98,7 @@
- + @@ -135,7 +135,7 @@ url: url, data: postData, dataType: "json", - contentType: "application/json; charset=utf-8", + //contentType: "application/json; charset=utf-8", success: function (res) { console.log('返回数据', typeof (res), res) if (res.success) { @@ -170,7 +170,7 @@ url: url, data: formData, dataType: "json", - contentType: "application/json; charset=utf-8", + //contentType: "application/json; charset=utf-8", success: function (res) { if (res.success) { data = res.content @@ -196,7 +196,7 @@ $.ajax({ type: "GET", url: url, - contentType: "application/json; charset=utf-8", + //contentType: "application/json; charset=utf-8", success: function (res) { data = res.content bindData()