TMRAppBle/html/index.html

115 lines
3.6 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<title>Document</title>
<link rel="stylesheet" href="../css/mui_min.css">
<link href="../css/mui_picker_min.css" rel="stylesheet"/>
<link href="../css/mui_poppicker_css" rel="stylesheet"/>
<script src="../script/api.js"></script>
<script src="../script/mui.min.js"></script>
<script src="../script/mui.picker.min.js"></script>
<script src="../script/mui.poppicker.js"></script>
</head>
<style>
.content {
width: 100%;
height: 100vh;
box-sizing: border-box;
border: 1px solid #a3caef;
}
.flex{
/*flex 布局*/
display: flex;
background-color: #007aff;
/*实现垂直居中*/
align-items: center;
/*实现水平居中*/
justify-content: center;
text-align: justify;
/* width:33%; */
height: 100vh;
/*
margin: 5px 5px;
padding: 5px 5px; */
}
</style>
<body>
<div class="mui-row content">
<div class="mui-col-sm-3 flex">
<button class="mui-btn-success " style="font-size: 100px;font-weight: 900;border-radius: 50px;color: black;" onclick="startLoad()">装料</button>
</div>
<div class="mui-col-sm-6 flex">
<button class="mui-btn-success " style="font-size: 100px;font-weight: 900;border-radius: 50px;color: black;" onclick="startRemain()">剩料收集</button>
</div>
<div class="mui-col-sm-3 flex">
<button id="config" class="mui-btn-success " style="font-size: 100px;font-weight: 900;border-radius: 50px;color: black;" onclick="config()">设置</button>
</div>
</div>
<script>
var btnArray = ['取消', '<b style="font-weight:900">确认</b>'];
var apiready = function apiready() {
var initpage = api.getPrefs({sync: true,key: 'initpage'})
if(initpage){
switch (initpage){
case "index":
break;
case "index1":
setTimeout(function(){
startLoad()
},1000)
break;
case "collection":
setTimeout(function(){
startRemain()
},1000)
break;
case "config":
setTimeout(function(){
config()
},1000)
break;
}
}
api.addEventListener({
name: 'keyback'
}, function (ret, err) {
mui.confirm('确认关闭TMR饲喂系统', '提示', btnArray, function (e) {
if (e.index == 0) {} else {
api.closeWidget({
id: api.appId, //应用ID
retData: { name: 'closeWidget' },
silent: true
});
}
});
});
}
function startLoad(){
api.openWin({
name: 'index1',
reload:true,
url:'../html/index1.html'
})
}
function startRemain(){
api.openWin({
name: 'collection',
reload:true,
url:'../html/collection.html'
})
}
function config(){
api.openWin({
name: 'config',
reload:true,
url:'../html/config.html'
})
}
</script>
</body>
</html>