This commit is contained in:
zogodo
2020-05-05 21:05:23 +08:00
parent 41466cba37
commit 989e92a0c6
4 changed files with 3 additions and 784 deletions

View File

@@ -407,7 +407,7 @@ const struct httpd_wsgi_call g_app_handlers[] = {
{ "/assets", HTTPD_HDR_ADD_SERVER|HTTPD_HDR_ADD_CONN_CLOSE, APP_HTTP_FLAGS_NO_EXACT_MATCH, HttpGetAssets, NULL, NULL, NULL },
{ "/socket", HTTPD_HDR_DEFORT, 0, NULL, HttpSetSocketStatus, NULL, NULL },
{ "/status", HTTPD_HDR_DEFORT, 0, HttpGetTc1Status, NULL, NULL, NULL },
{ "/power", HTTPD_HDR_DEFORT, 0, NULL, HttpGetPowerInfo, NULL, NULL },
{ "/power", HTTPD_HDR_DEFORT, 0, HttpGetPowerInfo, HttpGetPowerInfo, NULL, NULL },
{ "/wifi/config", HTTPD_HDR_DEFORT, 0, HttpGetWifiConfig, HttpSetWifiConfig, NULL, NULL },
{ "/wifi/scan", HTTPD_HDR_DEFORT, 0, HttpGetWifiScan, HttpSetWifiScan, NULL, NULL },
{ "/mqtt/config", HTTPD_HDR_DEFORT, 0, NULL, HttpSetMqttConfig, NULL, NULL },

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,4 @@
<!doctype html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
@@ -776,7 +776,7 @@ var chart_wth = 0;
var p = document.getElementById("p");
var w = document.getElementById("w");
function GetPowerRecord() {
HttpPost("/power", function (re) {
HttpGet("/power", function (re) {
re = re.replace(/'/g, '"');
var power = JSON.parse(re);
power_idx = power.idx + 1;