删除:1、删除webroot下plugin1文件夹

This commit is contained in:
pengwang 2021-06-22 21:16:29 +08:00
parent 1ea72ed88c
commit bda0bdb93f
1 changed files with 0 additions and 115 deletions

View File

@ -1,115 +0,0 @@
<html>
<head>
<meta charset="UTF-8">
<title>我的设备</title>
<link rel="stylesheet" href="../../layui/css/layui.css">
</head>
<script src="../../layui/layui.js"></script>
<script>
//一般直接写在一个js文件中
layui.use(['layer', 'form'], function(){
var layer = layui.layer
,form = layui.form;
var $ = layui.$;
// 接收父页面数据
window.addEventListener('message', function(messageEvent) {
var data = messageEvent.data
switch (data.cmd) {
case 'getSerials':
layer.msg('收到数据1' + 'getSerials')
if (data.params) {
// console.log(data.params.interfaceList)
obj = document.getElementById("interfaceList");
for(i=obj.options.length-1 ; i>= 0 ; i--){
obj.options[i] = null;
}
$.each(data.params.interfaceList, function (index, item) {
document.getElementById("interfaceList").append(new Option(item.CollInterfaceName, item.CollInterfaceName));// 下拉菜单里添加元素
});
layui.form.render("select");
}
break
case 'receiveData':
if (data.params) {
document.getElementById("receiveContent").value += data.params.receiveData;
// layer.msg('收到数据:' + data.params.receiveData)
}
break
}
}, false);
// 发送数据
$("#sendDataBtn").click(function(){
var ServicePara = document.getElementById("ServicePara").value
var ServiceName = document.getElementById("serviceList").value
// layer.msg("获取发送区数据:"+ ServicePara);
// layer.msg("获取功能名称:"+ ServiceName);
if (!ServicePara || !ServiceName) {
layer.msg("发送参数或者功能未选择");
return;
}
// 向父页面传输数据
window.parent.postMessage({
cmd: 'sendDeviceCustomCmd',
params: {
ServicePara:ServicePara,
ServiceName:ServiceName
}
}, '*')
});
// 重置发送区
$("#clearSendDataBtn").click(function(){
document.getElementById("ServicePara").value = '';
layer.msg("重置发送区数据成功");
});
// 清空接收区
$("#clearReceiveDataBtn").click(function(){
document.getElementById("receiveContent").value = '';
layer.msg("清空接收区数据成功");
});
// layer.msg('进入外部写入工具');
});
</script>
<body>
<div class="layui-container">
<div class="layui-row layui-col-space10">
<div class="layui-col-xs2 layui-col-sm2 layui-col-md2">
</div>
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form layui-form-item">
<!-- <label class="layui-form-label">调试功能:</label> -->
<div class="layui-input-block" style="margin-left:0px;">
<select name="selectService" lay-verify="required" id="serviceList">
<option value="">请选择功能</option>
<option value="read"></option>
<option value="write"></option>
</select>
</div>
</div>
<div class="layui-input-block" style="margin-left:0px;">
<textarea name="ServicePara" placeholder="发送参数" class="layui-textarea" style="height:190px;border:1px solid #0990D2;border-radius:10px;padding:10px;" id="ServicePara"></textarea>
</div>
<div class="layui-form-item">
<button class="layui-btn layui-btn-radius layui-btn-normal" style="margin:5px 0px;" id="sendDataBtn">发送指令</button>
<button class="layui-btn layui-btn-radius layui-btn-warm" style="margin:5px 0px;" id="clearSendDataBtn">重置</button>
</div>
</div>
<div class="layui-col-xs1 layui-col-sm1 layui-col-md1">
</div>
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form layui-form-item">
<div class="layui-input-block" style="margin-left:0px;">
<textarea name="receive" placeholder="接收区" class="layui-textarea" style="height:230px;border:1px solid #0990D2;border-radius:10px;padding:10px;" id="receiveContent"></textarea>
</div>
</div>
<button class="layui-btn layui-btn-radius layui-btn-warm layui-btn-fluid" style="display:block;margin:5px 0px;" id="clearReceiveDataBtn">清空接收区</button>
</div>
</div>
</div>
</body>
</html>