TMRAppBle/html/index.html

166 lines
5.2 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;
}
.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;
}
.mui-btn-success:active {
animation: clickAnimation 0.2s ease forwards;
}
@keyframes clickAnimation {
0% { transform: scale(1); } /* 起始状态为原大小 */
100% { transform: scale(0.90); } /* 结束状态为稍微收缩的大小 */
}
</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-3 flex">
<button class="mui-btn-success " style="font-size: 100px;font-weight: 900;border-radius: 50px;color: black;" onclick="chanche()">铲车</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="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: true
});
}
});
}
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)
case "chanche":
setTimeout(function(){
chanche()
},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'
})
}
function chanche(){
api.openWin({
name: 'chanche',
reload:true,
url:'../pages/circle.stml'
})
}
</script>
</body>
</html>