144 lines
4.4 KiB
HTML
144 lines
4.4 KiB
HTML
<!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;
|
||
}
|
||
.btnc {
|
||
margin-left: 15px;
|
||
/* margin-right: 15px; */
|
||
font-size: x-large;
|
||
font-weight: 900;
|
||
border-radius: 20px;
|
||
}
|
||
.flex{
|
||
/*flex 布局*/
|
||
display: flex;
|
||
background-color: #007aff;
|
||
/*实现垂直居中*/
|
||
align-items: center;
|
||
/*实现水平居中*/
|
||
justify-content: center;
|
||
text-align: justify;
|
||
height: 90vh;
|
||
}
|
||
.flex1{
|
||
/*flex 布局*/
|
||
display: flex;
|
||
background-color: #007aff;
|
||
/*实现垂直居中*/
|
||
align-items: center;
|
||
/*实现水平居中*/
|
||
justify-content: flex-end;
|
||
text-align: justify;
|
||
height: 10vh;
|
||
}
|
||
</style>
|
||
<body>
|
||
<div class="mui-row content">
|
||
<div class="mui-col-sm-12 flex1">
|
||
<button class="btnc mui-btn-inline mui-btn-danger" onclick="closeApp()" type='button'>关闭系统</button>
|
||
</div>
|
||
<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>
|
||
function closeApp() {
|
||
mui.confirm('确认关闭TMR饲喂系统?', '提示', btnArray, function (e) {
|
||
if (e.index == 0) {} else {
|
||
api.closeWidget({
|
||
id: api.appId, //应用ID
|
||
retData: { name: 'closeWidget' },
|
||
silent: false
|
||
});
|
||
}
|
||
});
|
||
}
|
||
|
||
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>
|