mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-12 13:08:13 +08:00
将扫描结果显示到页面
This commit is contained in:
@@ -125,9 +125,6 @@
|
|||||||
<td>
|
<td>
|
||||||
<select id="wifi" onchange="SelectWifi()">
|
<select id="wifi" onchange="SelectWifi()">
|
||||||
<option value="0">Manual</option>
|
<option value="0">Manual</option>
|
||||||
<option value="1">CMCC</option>
|
|
||||||
<option value="2">China-Net</option>
|
|
||||||
<option value="3">CMCT</option>
|
|
||||||
</select>
|
</select>
|
||||||
<button id="rescan" onclick="Rescan()">Rescan</button>
|
<button id="rescan" onclick="Rescan()">Rescan</button>
|
||||||
</td>
|
</td>
|
||||||
@@ -335,6 +332,12 @@ function GetScanResult() {
|
|||||||
HttpGet("/wifi/scan", function (re) {
|
HttpGet("/wifi/scan", function (re) {
|
||||||
if (re != "NO") {
|
if (re != "NO") {
|
||||||
var ret = JSON.parse(re);
|
var ret = JSON.parse(re);
|
||||||
|
var html = "<option value='0'>Manual</option>";
|
||||||
|
for (var i = 0; i < ret.ssids.length; i++) {
|
||||||
|
html += "<option value='"+i+"'>"+ret.ssids[i]+"</option>";
|
||||||
|
}
|
||||||
|
ssid_slt.innerHTML = html;
|
||||||
|
|
||||||
rescan_btn.innerHTML = "Rescan";
|
rescan_btn.innerHTML = "Rescan";
|
||||||
rescan_btn.disabled = false;
|
rescan_btn.disabled = false;
|
||||||
return;
|
return;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -14,11 +14,10 @@ enum
|
|||||||
};
|
};
|
||||||
|
|
||||||
#define WIFI_SCAN_RESULT_JSON "{'success':%d,'ssids':[%s],'secs':[%s]}"
|
#define WIFI_SCAN_RESULT_JSON "{'success':%d,'ssids':[%s],'secs':[%s]}"
|
||||||
|
extern bool scaned;
|
||||||
extern char* wifi_ret;
|
extern char* wifi_ret;
|
||||||
|
|
||||||
extern char wifi_status;
|
extern char wifi_status;
|
||||||
extern bool scaned;
|
|
||||||
|
|
||||||
extern void wifi_init(void);
|
extern void wifi_init(void);
|
||||||
extern void ap_init(void);
|
extern void ap_init(void);
|
||||||
|
|||||||
Reference in New Issue
Block a user