coverPage_frm.html
4.11 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<title>设备列表窗口</title>
<link rel="stylesheet" type="text/css" href="../../css/api.css"/>
<link rel="stylesheet" type="text/css" href="../../css/aui.css"/>
<link rel="stylesheet" type="text/css" href="../../css/home.css"/>
<link rel="stylesheet" type="text/css" href="../../css/element.css"/>
<link rel="stylesheet" type="text/css" href="../../css/style.css"/>
<style>
html,
body{
background: rgba(0, 0, 0, 0);
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div id="app" style="height:100%;z-index:10;" tapmode @click="closeCover">
</div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="../../script/vue.min.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script type="text/javascript" src="../../script/element.js"></script>
<script type="text/javascript" src="../../script/ctrl.js"></script>
<script type="text/javascript">
var vm,
htmlStr;
apiready = function(){
api.parseTapmode();
api.addEventListener({
name: 'operate_and_alert_page'
}, function(ret, err){
htmlStr = ret.value.url
});
//---------初始化vue
vm = new Vue({
el: '#app',
data: {
},
mounted() {
//window.chooseProduct = this.chooseProduct;
},
created() {
this.initPage()
},
methods: {
async initPage() {
this.setOrUnsetcover(true)
let urlTemp = '';
if (api.pageParam.value.storeType === '01001' || api.pageParam.value.storeType === '02001' || api.pageParam.value.storeType === '03001' || api.pageParam.value.storeType === '03002') {
urlTemp = 'http://iot.uccc.cc:9090/app_html/store' + api.pageParam.value.storeType +'/alertPage.html'
}else {
urlTemp = '../utils/detailAlert_frm.html'
}
api.openFrame({
name: 'detailAlertFrm',
url: urlTemp,
// url: '../utils/detailAlert_frm.html',
// data: res.data,
bounces: false,
rect: {
x:api.frameWidth/11,
y:api.frameHeight/8,
w:api.frameWidth- (api.frameWidth/11) *2,
h:api.frameHeight/1.5
},
animation: {
type:"movein",
subType:"from_bottom",
duration:300
},
pageParam: { value: api.pageParam.value},
bgColor: 'rgba(0, 0, 0, 0)',
});
// }else {
// this.closeCover()
// api.toast({msg: res.message ,duration: 2000,location: 'bottom'})
// }
},
setOrUnsetcover(bool) {
if (bool) {
document.body.style.backgroundColor="rgba(0,0,0,0.5)";
}else {
document.body.style.backgroundColor="rgba(0, 0, 0, 0);";
}
},
closeCover() {
this.setOrUnsetcover(false)
api.closeFrame({
name: 'detailAlertFrm'
});
api.closeFrame({
name: htmlStr
});
api.sendEvent({
name: 'close_cover_page',
});
api.closeFrame();
api.hideProgress();
}
}
})
};
</script>
</html>