-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdetail.html
More file actions
120 lines (106 loc) · 4.27 KB
/
detail.html
File metadata and controls
120 lines (106 loc) · 4.27 KB
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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=no">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
<meta name="description" content="彗星是一个用户自主评级的区块链投资社区,每个人都可以对项目进行评价并打分。同时彗星还是一个区块链的百科全书,帮助用户挖掘优质的好项目">
<meta name="keywords" content="彗星社区;区块链;数字货币;区块链评测;区块链投资">
<link rel="icon" href="img/huixing.png" type="image/x-icon"/>
<link rel="stylesheet" href="css/detail.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/common.css">
<link type="favicon" rel="shortcut icon" href="favicon.ico" />
<!-- 导航栏 -->
</head>
<body lang="zh-CN" class="reader-black-font">
<div class="block-comet-main-wrap">
<div class="navbar-fixed-container navbar-fixed-container-hook">
</div>
<div class="container index detail-wrap">
<div class="row detail-container">
<div class="col-md-7 main">
<div class="row_left">
<h1 class="title" id="detail_title"></h1>
<div class="article" style="width: 100%;height: 30px;"></div>
<div>
<span id="detail_from" class="detail_from"></span>
<span id="creat_time" class="detail_time"></span>
</div>
<div data-note-content="" class="show-content">
<div class="show-content-free">
<p id="context"></p>
</div>
<span id="detail_edit" class="detail_editor"></span>
</div>
</div>
</div>
<div class="col-md-5 aside">
<div class="row_right">
<img src="img/miniPro.jpg" width="200px" height="200px"/>
<p class="code_share">扫描分享彗星播报</p>
</div>
</div>
</div>
</div>
</div>
<script src="js/jquery-2.1.1.js"></script>
<script src="js/jquery.cookie.js"></script>
<script src="js/template.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/common.js"></script>
</body>
<script>
$("#head_search").keydown(function(e) {
if(e.keyCode == 13) {
var keywords = $('#head_search').val()
console.log(keywords)
window.location.href='http://www.blockcomet.com/?keys='+keywords;
}
});
//dispear
function pressHome() {
}
function refresh() {
window.location.href = "index.html"
}
function getQuary(){//读取详情 新闻id
var url = window.location.href;
if(url.split("?")[1]){
var quarys = url.split("?")[1].split("&")
for(var i = 0 ;i<quarys.length;i++){
if(quarys[i].split("=")[0]=="newsId"){
return decodeURI(quarys[i].split("=")[1])
}
}
}
}
function detail() {
//var newsId = window.localStorage.getItem('detail')
var newsId = getQuary()
//ajax獲取詳情數據
var uri = 'news/getinfo?newsId='+newsId
doJavaGet(uri, function(res) {
if(res != null && res.code == 0) {
var datas = res.datas
$('title').html(datas.title)
$('#detail_title').text(datas.title)
$('#detail_from').text("来源:"+datas.media)
if(datas.creator!=null){
$('#detail_edit').text("编辑:"+datas.creator)
}
$('#creat_time').text(datas.createTime.replace("T"," "))
if(datas.newsContent != null && datas.newsContent != undefined) {
$('#context').html(datas.newsContent)
} else {
$('#context').html(datas.newsContent)
}
}
}, "json");
}
detail();
</script>
</script>
</html>