-
Notifications
You must be signed in to change notification settings - Fork 0
/
layer.html
154 lines (150 loc) · 5.9 KB
/
layer.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<!DOCTYPE html>
<!--[if IE 6]><html class="ie6"><![endif]-->
<!--[if IE 7]><html class="ie7"><![endif]-->
<!--[if IE 8]><html class="ie8"><![endif]-->
<!--[if IE 9]><html class="ie9"><![endif]-->
<!--[if(gt IE 9)|!(IE)]><!-->
<html lang="en">
<!--<![endif]-->
<head>
<meta charset="utf-8" />
<title>弹窗</title>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable-style" content="blank" />
<meta name="format-detection" content="telephone=no,email=no" />
<link rel="shortcut icon" href="favicon.ico" />
<link rel="stylesheet" type="text/css" href="dist/css/base.css" />
<!--[if lt IE 9]>
<script type="text/javscript" src="dist/js/lib/html5shiv.min.js"></script>
<script type="text/javscript" src="dist/js/lib/respond.min.js"></script>
<![endif]-->
<script type="text/javascript" src="dist/js/lib/jquery.js"></script>
<script type="text/javascript" src="dist/js/base.js"></script>
<script>
var str='你好,欢迎来到stan',
i=0;
function pageLayer(){
stanLayer.page({
hash:true,
animation: 'fadeR',
title: '弹窗',
back: '返回',
ok: '确定',
content: '<div class="layer-wrap">'+str+'</div>'
});
}
function msgLayer(){
stanLayer.msg(str+i,2);
i++;
}
function alertLayer(){
stanLayer.alert(str);
}
function confirmLayer() {
stanLayer.confirm(str,['取消','确定'],function($layer){
stanLayer.close($layer.attr('data-index'));
},function(){
stanLayer.msg('确定成功');
stanLayer.closeAll();
});
}
function iframeLayer() {
stanLayer.page({
hash:true,
url:'moiblecode.html',
time:0
});
}
function openLayer() {
stanLayer.open('',{
clickClose:true,
content:str
});
}
function openTopLayer() {
stanLayer.open('top',{
clickClose:true,
content:str
});
}
function openBottomLayer() {
stanLayer.open('bottom',{
clickClose:true,
content:str
});
}
function openRightLayer() {
stanLayer.open('right',{
clickClose:true,
content:str
});
}
function openLeftLayer() {
stanLayer.open('left',{
clickClose:true,
content:str
});
}
function openWHLayer() {
stanLayer.open('',{
clickClose:true,
width:300,
height:300,
content:str
});
}
function pwdLayer() {
stanLayer.payPwd({
success: function ($con) {
},
submitCallback: function (pwd) {
stanLayer.alert(pwd);
}
});
}
</script>
<style type="text/css">
.panel-title {
padding: 6px 12px;
line-height: 18px;
font-size: 18px;
background-color: #e5e5e5;
}
</style>
</head>
<body>
<div class="page moiblecode-page">
<div class="header">
<div class="pos-left" onclick="stanUI.goBack()">
<a class="icon i-carat-left"></a>
</div>
<div class="title">弹窗</div>
<div class="pos-right">
<a class="icon i-search"></a>
</div>
</div>
<div class="content full-bottom-content">
<div class="wrap">
<div class="panel layer-panel">
<div class="listview">
<a class="item current" onclick="pageLayer()"><span>页面弹窗</span></a>
<a class="item" onclick="openLayer()"><span>open弹窗</span></a>
<a class="item" onclick="openWHLayer()"><span>open高宽弹窗</span></a>
<a class="item" onclick="openTopLayer()"><span>openTop弹窗</span></a>
<a class="item" onclick="openBottomLayer()"><span>openBottom弹窗</span></a>
<a class="item" onclick="openLeftLayer()"><span>openLeft弹窗</span></a>
<a class="item" onclick="openRightLayer()"><span>openRight弹窗</span></a>
<a class="item" onclick="stanLayer.loading('努力加载中...')"><span>加载弹窗</span></a>
<a class="item" onclick="iframeLayer()"><span>iframe弹窗</span></a>
<a class="item" onclick="msgLayer()"><span>msg弹窗</span></a>
<a class="item" onclick="alertLayer()"><span>提示弹窗</span></a>
<a class="item" onclick="confirmLayer()"><span>确认弹窗</span></a>
<a class="item" onclick="pwdLayer()"><span>密码弹窗</span></a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>