yxw 2023-11-23 10:23:31 +08:00
parent 584ab46a22
commit 0fcc66aa61
12 changed files with 49 additions and 42 deletions

View File

@ -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) {

View File

@ -167,7 +167,8 @@ input[type="number"]{
}
input:disabled {
background-color: #000;
background-color: #333 !important;
color: #000 !important;
}
.form-control:disabled {

View File

@ -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

View File

@ -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) {

View File

@ -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) {

View File

@ -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) {

View File

@ -303,7 +303,7 @@
<div style="width: 200px;">
<div class="d-flex justify-content-center align-items-center" style="height: 30px;">
<div class="d-flex redio-switche">
<input type="checkbox" class="btn-check" name="mic1" id="mic1-on">
<input type="checkbox" disabled checked="checked" class="btn-check" name="mic1" id="mic1-on">
<label class="btn btn-sm redio-btn on-btn" for="mic1-on">PHANTOM (48V)</label>
</div>
</div>
@ -509,7 +509,7 @@
<div style="width: 200px;">
<div class="d-flex justify-content-center align-items-center" style="height: 30px;">
<div class="d-flex redio-switche">
<input type="checkbox" class="btn-check" name="mic2" id="mic2-on">
<input type="checkbox" disabled checked="checked" class="btn-check" name="mic2" id="mic2-on">
<label class="btn btn-sm redio-btn on-btn" for="mic2-on">PHANTOM (48V)</label>
</div>
</div>
@ -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')

View File

@ -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

View File

@ -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('登录成功')

View File

@ -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}`)

View File

@ -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')
}
})
})

View File

@ -98,7 +98,7 @@
<div class="col-sm-8 d-flex">
<input type="text" id="fileName" class="form-control" />
<input type="file" id="uploadFile" style="display: none;">
<input type="file" id="uploadFile" style="display: none;" accept=".bin">
<button id="selectFile" class="btn button btn-dark border border-black">Browser</button>
<button type="button" id="upgrade"
class="btn button btn-dark border border-black ms-4">Load</button>
@ -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()