index_win.html
4.98 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
116
117
118
119
120
121
122
123
124
125
<!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">
<meta name="referrer" content="no-referrer">
<title>01001首页_win</title>
<link rel="stylesheet" type="text/css" href="http://iot.uccc.cc:9090/app/css/api.css"/>
<link rel="stylesheet" type="text/css" href="http://iot.uccc.cc:9090/app/css/aui.css"/>
<link rel="stylesheet" type="text/css" href="http://iot.uccc.cc:9090/app/css/home.css"/>
<link rel="stylesheet" type="text/css" href="http://iot.uccc.cc:9090/app/css/element.css"/>
<link rel="stylesheet" type="text/css" href="http://iot.uccc.cc:9090/app/css/style.css"/>
<style>
html,
body{
background: #F4F6F9;
}
</style>
</head>
<body>
<div id="app">
<div id="status"></div>
<header class="aui-header-bar title-home" style="width:'auto';height:44px;">
<div class="aui-header-left">
<i class="aui-iconfont aui-icon-left" style="color:#FFFFFF;font-size:16px;margin-top: 0.1rem;" @click="closeWin"></i>
<span style="margin-left:15px;font-size:16px;">TY-500 智能短路灭弧器</span>
</div>
<div class="aui-header-right">
<i class="aui-iconfont aui-icon-location" style="margin-top: 0.1rem;font-size: 0.6rem;"></i>
<span style="font-size: 12px;">{{ province }} {{ city }}</span>
</div>
</header>
<div style="background:linear-gradient(90deg,rgba(91,127,248,1) 0%,rgba(75,175,239,1) 100%);height:50%;width:auto;"></div>
<footer></footer>
</div>
</body>
<script type="text/javascript" src="http://iot.uccc.cc:9090/app/js/api.js"></script>
<script type="text/javascript" src="http://iot.uccc.cc:9090/app/js/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="http://iot.uccc.cc:9090/app/js/vue.min.js"></script>
<script type="text/javascript" src="http://iot.uccc.cc:9090/app/js/common.js"></script>
<script type="text/javascript" src="http://iot.uccc.cc:9090/app/js/element.js"></script>
<script type="text/javascript" src="http://iot.uccc.cc:9090/app/js/ctrl.js"></script>
<script type="text/javascript" src="http://iot.uccc.cc:9090/app/js/fastclick.js"></script>
<script type="text/javascript">
var vm;
apiready = function(){
api.parseTapmode();
$(function() {
FastClick.attach(document.body);
});
//---------初始化vue
vm = new Vue({
el: '#app',
data: {
imei: api.pageParam.imei,
productId: api.pageParam.productId,
statusH: api.getPrefs({sync: true,key: 'SAFEAREATOP'}),
userId: api.getPrefs({sync: true,key: 'userID'}),
token: api.getPrefs({sync: true,key: 'userToken'}),
province: '',
city: '',
},
mounted() {
//window.chooseProduct = this.chooseProduct;
},
created() {
this.initPage()
},
methods: {
initPage() {
this.initStatusH()
this.initImeiInfos()
},
initStatusH() {
//------设置状态栏
document.getElementById("status").style.cssText = "height:"+ this.statusH +"px;width:'auto';background:linear-gradient(90deg,rgba(91,127,248,1) 0%,rgba(75,175,239,1) 100%);"
api.setStatusBarStyle({
style: 'light'
});
//------
},
async initImeiInfos() {
let params = {
imei: this.imei,
userId: this.userId,
token: this.token,
}
let deviceInfoRes = await get_device_info_by_user(params)
let deviceInfo = deviceInfoRes.data.device
if (deviceInfo.bind.province != '') {
this.province = deviceInfo.bind.province
}
if (deviceInfo.bind.city != '') {
this.city = deviceInfo.bind.city
}
//这里以后全部是配置对应的http地址...
api.openFrame({
name: 'store_' + this.productId + '_indexFrm',
url: 'http://iot.uccc.cc:9090/app_html/store01001/index_frm.html',
bounces: true,
rect: {
x: 0,
y: 44+Number(this.statusH),
w: api.winWidth,
h: api.winHeight-40-Number(this.statusH)
},
pageParam: {deviceInfo: deviceInfo,
productId: this.productId,
imei: this.imei},
});
},
closeWin() {
api.closeWin();
}
}
})
};
</script>
</html>