<!DOCTYPE html>
|
<html>
|
|
<head>
|
<meta charset="utf-8">
|
<title>消息通知</title>
|
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
<!--标准mui.css-->
|
<link rel="stylesheet" href="css/mui.min.css">
|
<!--App自定义的css-->
|
<link rel="stylesheet" type="text/css" href="css/app.css" />
|
<style>
|
.mui-card .mui-control-content {
|
padding: 10px;
|
}
|
|
.mui-control-content {
|
height: 800px;
|
}
|
.mui-bar{
|
background-color:#1A1A1A;
|
}
|
.mui-title{
|
color:#ffffff;
|
}
|
</style>
|
</head>
|
|
<body>
|
<header class="mui-bar mui-bar-nav">
|
<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" style="color:#FFFFFF"></a>
|
<h1 class="mui-title">消息通知</h1>
|
</header>
|
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
|
<script src="js/common.js" ></script>
|
<script src="js/mui.min.js"></script>
|
<script>
|
if(sessionCache.getSessionCashe("userToken")== null){
|
var code = getUrlParam("code");
|
mui.ajax({
|
type: "get",
|
url: serverUrl + 'login/getwxuserinfo.json',
|
data: {
|
CODE: code
|
},
|
async: false,
|
success: function(data) {
|
if(data.errcode == undefined) {
|
sessionCache.setSessionCashe("weixin_user", data, sessionCache.json_value);
|
} else {
|
WeixinJSBridge.call('closeWindow');
|
}
|
}
|
});
|
|
var openObj = sessionCache.getSessionCashe("weixin_user", sessionCache.json_value);
|
var openId;
|
if(openObj.UserId != undefined) {
|
openId = openObj.UserId;
|
} else if(openObj.OpenId != undefined) {
|
openId = openObj.OpenId;
|
}
|
mui.ajax({
|
type: "get",
|
url: serverUrl + 'login/loginWithOpenId.json',
|
data: {
|
openId: openId
|
},
|
async: false,
|
success: function(data) {
|
|
if(data.code == 000) {
|
sessionCache.setSessionCashe("userToken", data.data.token);
|
sessionCache.setSessionCashe("tiemTree", data.data.functionItemTree, sessionCache.json_value);
|
sessionCache.setSessionCashe("organizationTree", data.data.organizationTree, sessionCache.json_value);
|
sessionCache.setSessionCashe("userPosts", data.data.posts, sessionCache.json_value);
|
sessionCache.setSessionCashe("userInfo", data.data.sysUser, sessionCache.json_value);
|
} else {
|
location.href = "login.html?reuri=notice&co="+ new Date().getTime() ;/*tpa=http://www.wolishi.com/safety/login.html*/
|
}
|
}
|
});
|
|
}
|
mui.init({
|
subpages:[{
|
url:'noticeList.html'/*tpa=http://www.wolishi.com/safety/noticeList.html*/,//子页面HTML地址,支持本地地址和网络地址
|
id:'noticeList',//子页面标志
|
styles:{
|
top:'45px',//子页面顶部位置
|
bottom:'0'//子页面底部位置
|
},
|
extras:{}//额外扩展参数
|
}]
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|