| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- <!doctype html>
- <html>
- <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" />
- <link href="../../css/mui.min.css" rel="stylesheet" />
- <link href="../../css/OA-style.css" rel="stylesheet" />
- <style type="text/css">
- .mui-content {
- background-color: #FFFFFF;
- }
-
- #title {
- font-size: 20px;
- color: #000000;
- text-align: center;
- padding: 10px 5px 5px 5px;
- }
-
- #time {
- padding: 0px 5px;
- line-height: 16px;
- text-align: center;
- margin-bottom: 15px;
- }
-
- #noticeType {
- padding: 0px 5px;
- line-height: 16px;
- text-align: center;
- margin-bottom: 15px;
- }
-
- .line {
- margin: 0 auto;
- border-top: 1px solid #ddd
- }
-
- #content {
- padding: 10px 15px;
- overflow: hidden;
- width: 100%;
- line-height: 30px;
- }
-
- #affix {
- padding: 10px 15px;
- overflow: hidden;
- width: 100%;
- line-height: 30px;
- }
-
- video {
- max-width: 100%;
- }
-
- img { max-width: 100%;}
- </style>
- </head>
- <body>
- <header class="mui-bar mui-bar-nav">
- <a href="" class="mui-action-back back mui-pull-left"><img src="../../images/back.png"></a>
- <h1 class="mui-title">公告详情</h1>
- </header>
- <div class="mui-content">
- <div class="top">
- <p id="title"></p>
- <p id="noticeType"></p>
- <p id="time"></p>
- </div>
- <div class="line"></div>
- <div id="content"style="word-wrap:break-word;"></div>
- <div id="affix"></div>
- </div>
- <script src="../../js/mui.min.js"></script>
- <script src="../../js/app.js"></script>
- <script src="../../js/config.js"></script>
- <script type="text/javascript">
- mui.init();
- mui.plusReady(function() {
-
- var self = plus.webview.currentWebview();
- var id = self.notice_id;
- getData(id);
- })
- function getData(id) {
- var title1 = mui('#title');
- var content = mui('#content');
- var time = mui('#time');
- var noticeType = mui('#noticeType');
- var affix = mui('#affix');
-
- var url = API.API_URL();
- var serviceId = "eu_notice_2013V0010PHONE002";
- var state = app.getState(); //获取登陆信息
- var staffId = state.user.useId;
- var obj = {
- userId: staffId,
- noticeId: id,
- ifRead:1
- };
- app.ajax(serviceId,obj, function(data) {
- //服务器返回响应
- console.log(JSON.stringify(data))
- title1[0].innerHTML = data.title;
- content[0].innerHTML = data.noticeContent;
- time[0].innerHTML = data.sendTime;
- noticeType[0].innerHTML = data.noticeType;
- var affixHtml = "";
- var affixURL = data.affixUrl;
- for(var i = 0, len = affixURL.length; i < len; i++) {
- var url = API.API_IP_PORT+affixURL[i].path;
- affixHtml += "<a href='#' onclick=\"openFile('"+url+"')\">"+affixURL[i].fileName+"</a><br>";
- }
- affix[0].innerHTML = affixHtml;
- });
-
- };
- function openFile(path){
- mui.openWindow({
- createNew: true,
- url: path,
- });
-
- }
- </script>
- </body>
- </html>
|