-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
120 lines (108 loc) · 2.88 KB
/
index.html
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
<!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"/>
<title>侧边导航</title>
<style>
html {
height: 100%;
background-color: #fff;
}
body {
background-color: #fff;
padding: 0;
margin: 0;
display: -webkit-box;
display: -webkit-flex;
display: flex;
height: 100%;
-webkit-box-orient: vertical;
-webkit-flex-flow: column;
flex-flow: column;
}
</style>
</head>
<body>
<script type="text/javascript" src="./script/api.js"></script>
<script>
function openGuide(){//显示引导页
api.openFrame({
name: 'guide_frm',
url: 'html/guide_frm.html',
// url:'html/backup/test.html',
rect: {
x:0,
y:0,
w:'auto',
h:'auto'
}
});
// api.openWin({
// name: 'guide_frm',
// url: 'html/guide_frm.html'
// });
}
function openLogin(){//打开登录页
api.openFrame({
name: 'login_win',
url: 'html/login_win.html',
rect: {
x:0,
y:0,
w:'auto',
h:'auto'
}
});
}
apiready = function () {
/** 测试账号 **/
$api.setStorage('userNum','20160301004');
$api.setStorage('userId', '5856465283');
$api.setStorage('headImg', 'http://q.qlogo.cn/qqapp/1104800787/014695028CFC4A5672F2A6A11AB513B7/100');
/** 测试账号 **/
var showGuide = $api.getStorage('showGuide');
// $api.setStorage('showGuide',false);
var userId = $api.getStorage('userId');
if(!showGuide){
openGuide();
}else if ( !userId){
openLogin();
}else {
$api.setStorage('skipLoginWin',true);
api.openSlidLayout({
type: 'left',
fixedPane:{
name:'fixed',
url: 'html/fixed.html'
},
slidPane:{
name: 'slide',
url: 'html/slide.html'
}
},function(ret,err){
//coding...
});
}
// api.openSlidLayout({
// type: 'left',
// leftEdge: 60,
// fixedPane: {
// name: 'fixed',
// url: 'html/fixed.html'
// },
// slidPane: {
// name: 'slide',
// url: 'html/slide.html'
// }
// }, function (ret) {
//
// });
// api.openWin({
// name: 'aui_demo',
// url: 'html/aui_demo.html'
// });
}
</script>
</body>
</html>