-
Notifications
You must be signed in to change notification settings - Fork 0
/
vip-notification.html
204 lines (202 loc) · 6.4 KB
/
vip-notification.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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title>系统通知-会员中心</title>
<link href="css/app.css" rel="stylesheet"/>
<script src="js/mui.min.js"></script>
<style type="text/css">
.ui-page,html,body,.vip-application{
height: 100%;
padding-top:0px;
}
body,.ui-page{
background:#eee;
}
.ui-page{
padding-top:44px;
}
.vip-application{
position:relative;
}
.vip-application .mui-table-view{
margin:10px 10px 10px
}
.mui-table-view{
background:none;
}
.mui-table-view .mui-table-view-cell{
margin-bottom:10px;
}
.mui-table-view .mui-table-view-cell a{
padding:10px 19px;
border-radius:4px;
position:relative;
-webkit-border-radius:4px;
display:block;
background:#fff;
}
.mui-table-view .mui-table-view-cell .info{
padding-right:100px;
}
.mui-table-view .mui-table-view-cell .info span{
display:block;
line-height:24px;
font-size:13px;
color:#333;
}
.mui-page-content{
height:100%;
position:relative;
}
.mui-page{
position: absolute;
left: 0;
right: 0;
top: 44px;
bottom: 0;
width: 100%;
height: 100%;
}
li.mui-table-view-cell .mui-active{
background:#e5e3e3;
}
.menuSlide{
top:44px;
}
.mui-slide.mui-slide-right{
width:100%;
}
#menuContent{padding:0 14px 10px;}
#menuContent .title{line-height:20px;margin-top:10px;text-align:center;font-size:15px;color:#333;}
#menuContent .title span{display:block;font-size:12px;line-height:22px;color:#999;margin-top:2px;}
#menuContent .content{line-height:25px;font-size:13px;color:#666;margin-top:5px;}
#menuContent .mui-loading{margin-top:15px;}
</style>
</head>
<body>
<div class="ui-page" id="ui-page">
<header class="ui-bar jy-bar" id="header">
<a href="javascript:;" class="icon-back icon" id="back"></a>
<div class="ui-title">系统通知</div>
<a href="javascript:;" class="icon-categorys icon" id="categorys"></a>
</header>
<section class="vip-application">
<div class="mui-scroll-wrapper" id="pullrefresh">
<div class="mui-scroll">
<ul class="mui-table-view">
</ul>
</div>
</div>
</section>
<!--菜单滑动公用区域-->
<div class="menuSlide" id="menuSlide" style="display:none;">
<div class="mui-backdrop"></div>
<div class="mui-slide mui-slide-right">
<div class="mui-scroll-wrapper">
<div class="mui-scroll" id="menuContent">
<div class="mui-loading">
<div class="mui-spinner">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="js/config.js"></script>
<script src="js/app.js"></script>
<script type="text/javascript">
(function($, doc) {
$.plusReady(function() {
var count = 1;
stateDate=app.getStateDate(),
userid=stateDate['id'];
var menuContent=doc.getElementById("menuContent");
var menuSlide=doc.getElementById("menuSlide");
var sildeMenu= new J.toggleSlideMenu(menuSlide);
var pullrefresh=doc.getElementById("pullrefresh");
var back=doc.getElementById("back")
var pullUpRefresh=function(){
var dataArr={
wait:true,
user_id:userid,
curPage:count
}
J.dataAjax(CONFING.Interface.userMessage,dataArr,function(data){
if(data.type==2 || !data){
$('#pullrefresh').pullRefresh().endPullupToRefresh(true);
}else{
var page=data.totalPage,
infoArr=data.data;
setTimeout(function() {
var isPage=infoArr?++count>(page+1):true;
$('#pullrefresh').pullRefresh().endPullupToRefresh((isPage));
var table = doc.body.querySelector('.mui-table-view');
for (var i = 0; i <infoArr.length; i++) {
var html='<a href="javascript:;" class="listShow" data-id="'+infoArr[i].id+'">'
+'<div class="info">'
+'<span>'+infoArr[i].title+'</span>'
+'<span>'+infoArr[i].createdate+'</span>'
+'</div>'
+ '</a>';
var li = doc.createElement('li');
li.className = 'mui-table-view-cell';
li.innerHTML =html;
table.appendChild(li);
}
pullrefresh.style.opacity=1;
}, 500);
}
})
}
$.ready(function() {
//初始化单页的区域滚动
var scroll=$('.mui-scroll-wrapper').scroll();
plus.navigator.setStatusBarStyle('UIStatusBarStyleBlackTranslucent');
if ($.os.plus) {
setTimeout(function() {
$('#pullrefresh').pullRefresh().pullupLoading();
}, 100);
} else {
$('#pullrefresh').pullRefresh().pullupLoading();
}
$.init({
statusBarBackground:'#393767',
pullRefresh: {
container: '#pullrefresh',
up: {
contentrefresh: '正在加载...',
callback: pullUpRefresh
}
}
});
$(".mui-table-view").on("tap",'.listShow',function(){
var id=this.getAttribute("data-id");
sildeMenu.open(function(){
J.dataAjax(CONFING.Interface.userMessageD,{wait:true,user_id:userid,message_id:id},function(data){
var arr=data.data;
var html='<div class="title">'+arr['title']+'<span>发布时间:'+arr['createdate']+'</span></div>'
+'<div class="content">'+arr['content']+'</div>';
menuContent.innerHTML=html;
});
back.classList.add("action-back");
back.classList.remove("icon-back");
});
})
$("#header").on("tap",'.action-back',function(){
var _this=this;
sildeMenu.close(function(){
var loading='<div class="mui-loading"><div class="mui-spinner"></div></div>';
menuContent.innerHTML=loading;
_this.classList.add("icon-back");
_this.classList.remove("action-back");
});
})
})
});
}(mui, document));
</script>
</body>
</html>