-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.html
49 lines (48 loc) · 1.32 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="http://app.miwifi.com/js/router_request.js"></script>
<title>WOL网络唤醒</title>
</head>
<body>
<h1>WOL网络唤醒</h1>
<table>
<tr>
<td>操作</td>
<td>
<input type="button" value="授权" id="authorizeButton">
<input type="button" value="启动" id="runButton">
</td>
</table>
</body>
<script type="text/javascript">
var appId = "2882111111111111111";
$(document).ready(function() {
$("#authorizeButton").click(function(){
if (!routerRequest.hasAccessToken()) {
routerRequest.authorize(window.location.href, appId);
}
});
$("#runButton").click(function() {
routerRequest.request({
path: "/api-third-party/service/datacenter/plugin_control",
type: "GET",
data: {
// deviceId: deviceId, // 这个参数只是调试时添加,上线后要去掉。
info: "00:11:22:33:44:55:192.168.31.150",
appId: appId,
},
success: function(data) {
alert("启动成功:" + data);
},
error: function(data) {
console.log("error:", data);
alert("启动失败");
}
});
});
});
</script>
</html>