Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
任超
/
js.portalStaticPage
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
5712e8b4
authored
2020-11-30 17:05:12 +0800
by
任超
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:相应政策页面的完成
1 parent
ae46a10e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
80 additions
and
5 deletions
staticJs/pageHome.js
staticJs/xyzc.js
staticJs/xyzcxq.js
staticViews/xyzcxq.html
staticJs/pageHome.js
View file @
5712e8b
...
...
@@ -133,7 +133,7 @@ function LawsData() {
if
(
result
.
code
==
200
&&
result
.
data
!=
null
)
{
for
(
var
i
=
0
;
i
<
result
.
data
.
length
;
i
++
)
{
if
(
i
==
6
)
return
;
li
=
'<li><a href="
#" title="'
+
result
.
data
[
i
].
headline
+
'
">'
+
result
.
data
[
i
].
headline
;
li
=
'<li><a href="
./staticViews/flfgxq.html?id='
+
result
.
data
[
i
].
id
+
'" title="'
+
result
.
data
[
i
].
headline
+
'" target="_blank
">'
+
result
.
data
[
i
].
headline
;
li
+=
'</a></li>'
;
ulTag
.
append
(
li
);
}
...
...
@@ -155,7 +155,7 @@ function policiesData() {
if
(
result
.
code
==
200
&&
result
.
data
!=
null
)
{
for
(
var
i
=
0
;
i
<
result
.
data
.
length
;
i
++
)
{
if
(
i
==
6
)
return
;
li
=
'<li><a href="
#" title="'
+
result
.
data
[
i
].
headline
+
'
">'
+
result
.
data
[
i
].
headline
;
li
=
'<li><a href="
./staticViews/xyzcxq.html?id='
+
result
.
data
[
i
].
id
+
'" title="'
+
result
.
data
[
i
].
headline
+
'" target="_blank
">'
+
result
.
data
[
i
].
headline
;
li
+=
'</a></li>'
;
policies
.
append
(
li
);
}
...
...
staticJs/xyzc.js
View file @
5712e8b
...
...
@@ -8,14 +8,14 @@ $(function () {
HotArticle
()
})
// 获取
法律法规列
表数据
// 获取
相应政策
表数据
function
getLawsArticleList
()
{
var
flfgList
=
$
(
"#flfgList"
);
flfgList
.
empty
();
var
li
=
''
;
$
.
ajax
({
type
:
"get"
,
//提交方式
url
:
portal
.
api_url
+
"/hlwj/Mh
Laws/getLaws
ArticleList"
,
//路径
url
:
portal
.
api_url
+
"/hlwj/Mh
Policy/getPolicy
ArticleList"
,
//路径
dataType
:
"json"
,
async
:
false
,
data
:
{
...
...
@@ -28,7 +28,7 @@ function getLawsArticleList() {
data
.
total
=
result
.
data
.
total
for
(
var
i
=
0
;
i
<
result
.
data
.
records
.
length
;
i
++
)
{
li
=
'<li>'
;
li
+=
'<a href="./
flfg
xq.html?id='
+
result
.
data
.
records
[
i
].
id
+
'" title="'
+
result
.
data
.
records
[
i
].
headline
+
'" target="_blank">'
li
+=
'<a href="./
xyzc
xq.html?id='
+
result
.
data
.
records
[
i
].
id
+
'" title="'
+
result
.
data
.
records
[
i
].
headline
+
'" target="_blank">'
li
+=
'<p>'
+
result
.
data
.
records
[
i
].
headline
+
'</p>'
;
li
+=
'<span>'
+
result
.
data
.
records
[
i
].
deadtime
+
'</span>'
;
li
+=
'</a>'
;
...
...
staticJs/xyzcxq.js
0 → 100644
View file @
5712e8b
$
(
function
()
{
newsDetail
()
})
layui
.
use
(
'element'
,
function
()
{
var
element
=
layui
.
element
;
//导航的hover效果、二级菜单等功能,需要依赖element模块
//监听导航点击
element
.
on
(
'nav(demo)'
,
function
(
elem
)
{
});
});
// 新闻详情数据
function
newsDetail
()
{
var
newsDetail
=
$
(
"#newsDetail"
);
newsDetail
.
empty
();
$
.
ajax
({
type
:
"get"
,
//提交方式
url
:
portal
.
api_url
+
"/hlwj/MhNews/getDetailById"
,
//路径
data
:
{
"id"
:
GetQueryString
(
'id'
),
},
dataType
:
"json"
,
//数据,这里使用的是Json格式进行传输
success
:
function
(
result
)
{
//返回数据根据结果进行相应的处理
if
(
result
.
code
==
200
&&
result
.
data
!=
null
)
{
$
(
'.newsTitle'
).
html
(
result
.
data
.
title
)
$
(
'.releaseTime'
).
html
(
result
.
data
.
addtime
)
$
(
'.source'
).
html
(
result
.
data
.
source
)
newsDetail
.
append
(
result
.
data
.
content
)
}
}
});
}
function
GetQueryString
(
name
)
{
var
reg
=
new
RegExp
(
"(^|&)"
+
name
+
"=([^&]*)(&|$)"
);
var
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
);
if
(
r
!=
null
)
return
decodeURIComponent
(
r
[
2
]);
return
null
;
}
\ No newline at end of file
staticViews/xyzcxq.html
0 → 100644
View file @
5712e8b
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
>
<head>
<style>
</style>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<title>
相应政策详情
</title>
<script
type=
"text/javascript"
src=
"../staticJs/head.js"
></script>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../staticCss/ggxq.css"
>
</head>
<body>
<div
class=
"navigation_crumbs"
>
<div
class=
"contentBox"
>
<span
class=
"layui-breadcrumb"
>
<a
href=
"../index.html"
>
首页
</a>
<a
href=
""
>
法律法规
</a>
<a><cite>
相应政策详情
</cite></a>
</span>
</div>
</div>
<div
class=
"mainbody"
>
<div
class=
"title newsTitle"
></div>
<div
class=
"release"
>
<div
class=
"source"
></div>
<div>
发布日期:
<p
class=
"releaseTime"
></p></div>
</div>
<div
class=
"DividingLine"
></div>
<div
class=
"notice_content"
id=
"newsDetail"
>
</div>
</div>
</body>
<script
type=
"text/javascript"
src=
"../staticJs/common.js"
></script>
<script
type=
"text/javascript"
src=
"../staticJs/down.js"
></script>
<script
type=
"text/javascript"
src=
"../staticJs/xyzcxq.js"
></script>
</html>
\ No newline at end of file
Please
register
or
sign in
to post a comment