forked from xiaoxxf/cometBlock
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdetail.html
More file actions
120 lines (111 loc) · 3.78 KB
/
detail.html
File metadata and controls
120 lines (111 loc) · 3.78 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">
<title>播报</title>
<link rel="stylesheet" media="all" href="./css/web-9cd48403b6d78c77ef9e.css">
<link rel="stylesheet" media="all" href="./css/entry-c3f65dacaf053f3ad67d.css">
<link rel="stylesheet" href="css/detail.css">
<link rel="stylesheet" href="css/common.css">
<!-- 导航栏 -->
</head>
<body lang="zh-CN" class="reader-black-font">
<div class="block-comet-main-wrap">
<!-- 全局顶部导航栏 -->
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<!--导航栏-->
<div class="nav nav_border">
<div class="nav_list clearfix">
<div class="navs">
<div class="navs_star">彗星</div>
<a target="_self" href="#" class="navs_item">播报 </a>
<!--<a target="_self" href="#" class="navs_item">链库 </a>
--> </div>
<div class="nav_search">
<input class="nav_input" type="text" placeholder="输入关键词搜索" value="" id="head_search" >
<!--'<a class="nav_search_icon">
<svg class="icon" aria-hidden="true">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-sousuo"></use>
</svg>
</a>'-->
</div>
<div class="nav_left">
<a href="">
<img src="img/temp1.jpg">
</a>
</div>
</div>
</div>
</nav>
<div class="container index detail-wrap">
<div class="row">
<div class="col-xs-16 main">
<div class="row_left">
<h1 class="title" id="detail_title"></h1>
<div class="article" style="width: 100%;height: 30px;"></div>
<div data-note-content="" class="show-content">
<div class="show-content-free">
<p id="context"></p>
</div>
</div>
</div>
</div>
<div class="col-xs-7 col-xs-offset-1 aside">
<div class="row_right">
<img src="img/miniPro.jpg" width="200px" height="200px"/>
<p class="code_share">扫描分享彗星播报</p>
</div>
</div>
</div>
</div>
<footer class="fixed-footer-wrap">
<div class="footer-detail">
<div class="col-md-16">
<div class="col-md-12">
<span class="footer-left"><a href="#"><i>2018</i>彗星科技有限公司</a></span>
</div>
<div class="col-md-12">
<span class="footer-right"><a href="#">加入我们</a></span>
<span class="footer-right"><a href="#">联系我们</a></span>
</div>
</div>
</div>
</footer>
</div>
<script src="js/jquery-2.1.1.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/common.js"></script>
<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;
window.location.href='http://127.0.0.1:8020/NewsPaperFront-zhuzi/index.html?keys='+keywords;
//http://127.0.0.1:8020/NewsPaperFront-zhuzi/index.html?__hbt=1521169457576
}
});
function pressHome(){
}
function detail() {
console.log("test");
var newsId = window.localStorage.getItem('detail')
//ajax獲取詳情數據
var uri = '/news/' + newsId;
doGet(uri, function(res) {
if(res != null && res.code == 0) {
$('#detail_title').html(res.data.title)
if(res.data.content != null && res.data.content != undefined) {
$('#context').html(res.data.content)
} else {
$('#context').html(res.data.shortContent)
}
}
}, "json");
}
detail();
</script>
</body>
</html>