1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- <!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">
- <link rel="stylesheet" type="text/css" href="../../css/common/mui.min.css" />
- <link rel="stylesheet" type="text/css" href="../../css/common/common.css" />
- <link rel="stylesheet" type="text/css" href="../../css/information/information-detail.css" />
- </head>
- <body>
- <header id="header" class="mui-bar mui-bar-nav">
- <a class="mui-action-back mui-icon mui-icon-arrowleft">
- <span class="back">返回</span>
- </a>
- <h1 class="mui-title">资讯详情</h1>
- </header>
- <div class="mui-content">
- </div>
- <script src="../../libs/mui.min.js"></script>
- <script type="text/javascript">
- mui.plusReady(function() {
- var str = plus.storage.getItem('user');
- var user = JSON.parse(str);
- var token = user.Data.Token;
- var self = plus.webview.currentWebview();
- var exist = self.exist;
- GetInfo();
- function GetInfo() {
- var postData = {
- "": exist, //类型
- }
- mui.ajax("http://www.bosshand.cn/api/Plat/GetChannelsModelById", {
- dataType: 'json',
- data: postData,
- type: "post",
- contentType: 'application/x-www-form-urlencoded',
- headers: {
- authorization: token
- },
- success: function(resp) {
- if(resp.Code == 200) {
- var html = '';
- html += '<div class="content">';
- html += ' <div class="boss-info-centent" id="boss-info-centent">';
- html += '<div class="boss-info-title"><h2>' + resp.Data.Name + '</h3></div>';
- html += '<div class="datetime">发布时间:' + getLocalDate(resp.Data.CreateTime) + '</div>';
- html += '<div class="boss-info-img-list">';
- if(resp.Data.ChannelsImg != "") {
- var imglist = resp.Data.ChannelsImg;
- if(imglist.indexOf(",") > 0) {
- imglist = imglist.split(',');
- if(imglist != null) {
- for(var i = 0; i < imglist.length; i++) {
- html += '<img src="http://www.bosshand.cn/' + imglist[i] + '" />';
- }
- }
- } else {
- html += '<img style="width:100%" src="http://www.bosshand.cn/' + imglist + '" />';
- }
- }
- html += ' </div>';
- html += '<div class="boss-info-detail">' + resp.Data.Content + '</div>';
- html += ' </div>';
- html += '</div>';
- mui(".mui-content")[0].innerHTML = html;
- //清除所有的style样式表
- var tags = document.body.getElementsByTagName('*');
- for(var i = 0; i < tags.length; i++) {
- tags[i].removeAttribute('style');
- }
- }
- }
- });
- }
- //时间转换
- function getLocalDate(now) {
- var date = now.replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '');
- var arr = date.split(' ');
- //日期
- var arrDate = arr[0].split('-');
- //时间
- var arrTime = arr[1].split(':');
- return arrDate[0] + '年' + arrDate[1] + '月' + arrDate[2] + '日' + ' ' + arrTime[0] + ':' + arrTime[1];
- }
- })
- </script>
- </body>
- </html>
|