mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-15 06:28:14 +08:00
增加https关键字
This commit is contained in:
@@ -563,7 +563,7 @@ const struct httpd_wsgi_call g_app_handlers[] = {
|
||||
{"/mqtt/report/freq", HTTPD_HDR_DEFORT, 0, HttpGetMqttReportFreq, HttpSetMqttReportFreq, NULL, NULL},
|
||||
{"/log", HTTPD_HDR_DEFORT, 0, HttpGetLog, NULL, NULL, NULL},
|
||||
{"/task", HTTPD_HDR_DEFORT, APP_HTTP_FLAGS_NO_EXACT_MATCH, HttpGetTasks, HttpAddTask, NULL, HttpDelTask},
|
||||
{"/ota", HTTPD_HDR_DEFORT, 0, Otastatus, OtaStart, NULL, NULL},
|
||||
{"https://ota", HTTPD_HDR_DEFORT, 0, Otastatus, OtaStart, NULL, NULL},
|
||||
{"/led", HTTPD_HDR_DEFORT, 0, LedStatus, LedSetEnabled, NULL, NULL},
|
||||
{"/socketAll", HTTPD_HDR_DEFORT, 0, NULL, TotalSocketSetEnabled, NULL, NULL},
|
||||
{"/socketNames", HTTPD_HDR_DEFORT, 0, NULL, HttpSetSocketName, NULL, NULL},
|
||||
|
||||
@@ -1200,7 +1200,10 @@
|
||||
//OTA-start
|
||||
function OtaStart() {
|
||||
var ota_url = document.getElementById("ota_url").value;
|
||||
HttpPost("/ota", function (re) {
|
||||
var protocol = window.location.protocol;
|
||||
var baseUrl = protocol+"//"+window.location.host;
|
||||
|
||||
HttpPost("https://ota", function (re) {
|
||||
OtaStatus();
|
||||
}, ota_url);
|
||||
}
|
||||
@@ -1209,7 +1212,10 @@
|
||||
this.MaterialProgress.setProgress(0);
|
||||
});
|
||||
function OtaStatus() {
|
||||
HttpGet("/ota", function (re) {
|
||||
var protocol = window.location.protocol;
|
||||
var baseUrl = protocol+"//"+window.location.host;
|
||||
|
||||
HttpGet("https://ota", function (re) {
|
||||
var percent = parseInt(re);
|
||||
//console.log(re + " " + parseInt(re));
|
||||
ota_status.MaterialProgress.setProgress(percent);
|
||||
|
||||
Reference in New Issue
Block a user