-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtab-message.html
237 lines (231 loc) · 9.32 KB
/
tab-message.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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
<!-- tab-*.html 举例-->
<!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>
<script src="js/mui.min.js"></script>
<link href="css/mui.min.css" rel="stylesheet"/>
<link href="css/tab-message.css" rel="stylesheet" />
<script type="text/javascript" charset="UTF-8">
mui.init();
</script>
<script type="text/javascript" src="js/jquery-2.1.0.js"></script>
<script type="text/javascript" src="js/tab-message.js"></script>
<script type="text/javascript">
/*var a = location.href;
var getUrlParam = function(a){
var reg = new RegExp("(^|&)"+ a +"=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r!=null)
return unescape(r[2]);
return null;
};
var id = {"data":getUrlParam('data')};*/
$(document).ready(function(){
$.ajax({
type:"get",
url:"http://192.168.1.102:8080/beijiao/app/confirm_session",
async:true,
data:{},
dataType:"json",
xhrFields: {
withCredentials: true
},
success:function(data){
if(data.user=="confirm_session_fail"){
var id ={"userId":data.user}
window.location.href="login.html";
}else{
$.ajax({
type:"get",
url:"http://192.168.1.102:8080/beijiao/app/app_userPolicy",
data:id,
dataType : 'json', // 数据类型配置成json
async:true,
xhrFields: {
withCredentials: true
},
//contentType:"application/json;charset=utf-8",
success : function(data,status){
//alert("完成");
for (var i = 0; i < data.length; i++) {
var policy = "<li class='mui-table-view-cell mui-media'>" +
"<a class='policy' href='policy.html?policyId="+data[i].policyId+"'>"+
"<div class='mui-media-body'>"+
data[i].polSource +
"<p class='mui-ellipsis'>"+data[i].polTitle+"</p>"+
"<span class='time'>"+data[i].polTime+
"</span></div></a></li>"
$("#my_policy").append(policy);
}
}
});
$.ajax({
type:"get",
url:"http://192.168.1.102:8080/beijiao/app/userdiscuss_app",
data:{},
dataType : 'json', // 数据类型配置成json
async:true,
//contentType:"application/json;charset=utf-8",
success : function(data,status){
//alert("完成");
for (var i = 0; i < data.length; i++) {
var consult = "<li id='test' class='mui-table-view-cell mui-media'>"+
"<a href=javascript:;>"+
'<div class="mui-media-body">'+
"<p class='mui-ellipsis'>"+data[i].disTitle+"</p>"+
'<span class="time">'+data[i].disTime+'</span>'+
'<button type="button" class="mui-btn mui-btn-primary mui-btn-outlined answer">查看回复</button>'+
'<div style="border:1px dashed #ebebeb; border-style:dotted; display: none;"></div>'+
"<p class='mui-ellipsis answer_detail'>"+data[i].reply+"</p></div></a></li>"
$("#consult").append(consult);
}
},
error : function(data,status,e){
alert("失败");
}
});
}
},
error:function(data,status,e){
alert(e)
}
});
})
</script>
</head>
<body>
<script type="text/javascript">
mui('body').on('tap','a',function(){
window.top.location.href=this.href;
});
</script>
<!--带侧滑菜单的框架-->
<div class="mui-off-canvas-wrap mui-draggable">
<!-- 菜单容器 -->
<aside id="offCanvasSide" class="mui-off-canvas-left">
<div class="mui-scroll-wrapper">
<div id="sideBar" class="mui-scroll">
<!-- 菜单具体展示内容 -->
<span id="sideBar_title">行业选择</span>
<ul id="sideBar_list" class="mui-table-view">
<li class="mui-table-view-cell">
<a class="mui-navigate-right">热点关注</a>
</li>
<li class="mui-table-view-cell">
<a class="mui-navigate-right">机械化工</a>
</li>
<li class="mui-table-view-cell">
<a class="mui-navigate-right">交通汽车</a>
</li>
<li class="mui-table-view-cell">
<a class="mui-navigate-right">房产建材</a>
</li>
<li class="mui-table-view-cell">
<a class="mui-navigate-right">服装纺织</a>
</li>
<li class="mui-table-view-cell">
<a class="mui-navigate-right">IT互联网</a>
</li>
<li class="mui-table-view-cell">
<a class="mui-navigate-right">文化传媒</a>
</li>
<li class="mui-table-view-cell">
<a class="mui-navigate-right">医疗保健</a>
</li>
<li class="mui-table-view-cell">
<a class="mui-navigate-right">食品酒水</a>
</li>
</ul>
</div>
</div>
</aside>
<!-- 主页面容器 -->
<div class="mui-inner-wrap">
<!-- 头部(从左到右:侧滑按钮、标题、搜索框)-->
<header id="head" class="mui-bar mui-bar-nav">
<a href="#offCanvasSide" class="mui-icon mui-action-menu mui-icon-bars mui-pull-left"></a>
<h1 id="head_title" class="mui-title">我的消息</h1>
</header>
<!--正文部分-->
<div class="mui-content mui-scroll-wrapper">
<div class="mui-scroll">
<!--选项卡结构-->
<div id="tab_wrap">
<!--选项卡选择按钮-->
<div id="tab_options">
<ul>
<li>
<button id="first_tab_option" type="button" class="mui-btn mui-btn-primary mui-btn-outlined">
为您推荐
</button>
<button id="second_tab_option" type="button" class="mui-btn mui-btn-primary mui-btn-outlined">
咨询回复
</button>
</li>
</ul>
</div>
<!--选项卡内容-->
<div id="tab_content">
<!--第一页选项卡-->
<div id="first_tab">
<ul class="mui-table-view" id="my_policy">
<!--<li id="test" class="mui-table-view-cell mui-media">
<a href="javascript:;">
<div class="mui-media-body">
中国工商报
<p class='mui-ellipsis'>总局反垄断与反不正当竞争执法局局长就新《反不正当竞争法》接受记者专访</p>
<span class="time">2017-11-15</span>
</div>
</a>
</li>
<li id="test" class="mui-table-view-cell mui-media">
<a href="javascript:;">
<div class="mui-media-body">
中国工商报
<p class='mui-ellipsis'>总局反垄断与反不正当竞争执法局局长就新《反不正当竞争法》接受记者专访</p>
<span class="time">2017-11-15</span>
</div>
</a>
</li>-->
</ul>
</div>
<!--第二页选项卡-->
<div id="second_tab">
<ul class="mui-table-view" id="consult">
<!--<li id="test" class="mui-table-view-cell mui-media">
<a href="javascript:;">
<div class="mui-media-body">
五证合一
<p class='mui-ellipsis'>五证合一是哪五证</p>
<span class="time">2017-11-15</span>
<button type="button" class="mui-btn mui-btn-primary mui-btn-outlined answer">查看回复</button>
<div style="border:1px dashed #ebebeb; border-style:dotted; display: none;"></div>
<p class='mui-ellipsis answer_detail'>您好,“五证”指工商营业执照、统计登记证、组织机构代码证、税务登记证、社会保险登记证。</p>
</div>
</a>
</li>
<li id="test" class="mui-table-view-cell mui-media">
<a href="javascript:;">
<div class="mui-media-body">
五证合一
<p class='mui-ellipsis'>五证合一是哪五证</p>
<span class="time">2017-11-15</span>
<button type="button" class="mui-btn mui-btn-primary mui-btn-outlined answer">查看回复</button>
<div style="border:1px dashed #ebebeb; border-style:dotted; display: none;"></div>
<p class='mui-ellipsis answer_detail'>您好,“五证”指工商营业执照、统计登记证、组织机构代码证、税务登记证、社会保险登记证。</p>
</div>
</a>
</li>-->
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>