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
c1245dec
authored
2020-11-25 14:46:33 +0800
by
任超
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:index 接口修改
1 parent
03a7c870
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
3 deletions
index.html
staticJs/pageHome.js
index.html
View file @
c1245de
This diff is collapsed.
Click to expand it.
staticJs/pageHome.js
View file @
c1245de
...
...
@@ -55,6 +55,7 @@ $(function () {
NewsData
();
NoticeData
();
LawsData
();
policiesData
();
});
//加载新闻数据
...
...
@@ -64,7 +65,7 @@ function NewsData() {
var
li
,
publishTime
;
$
.
ajax
({
type
:
"get"
,
//提交方式
url
:
portal
.
api_url
+
"/hlwj/Mh
/getNewsHotArticle
List"
,
//路径
url
:
portal
.
api_url
+
"/hlwj/Mh
News/getNews
List"
,
//路径
dataType
:
"json"
,
//数据,这里使用的是Json格式进行传输
success
:
function
(
result
)
{
//返回数据根据结果进行相应的处理
...
...
@@ -94,7 +95,7 @@ function NoticeData() {
var
li
;
$
.
ajax
({
type
:
"get"
,
//提交方式
url
:
portal
.
api_url
+
"/hlwj/Mh/getMHNotice"
,
//路径
url
:
portal
.
api_url
+
"/hlwj/Mh
Notice
/getMHNotice"
,
//路径
dataType
:
"json"
,
//数据,这里使用的是Json格式进行传输
success
:
function
(
result
)
{
//返回数据根据结果进行相应的处理
...
...
@@ -125,7 +126,7 @@ function LawsData() {
var
li
;
$
.
ajax
({
type
:
"get"
,
//提交方式
url
:
portal
.
api_url
+
"/hlwj/Mh/getLawsList"
,
//路径
url
:
portal
.
api_url
+
"/hlwj/Mh
Laws
/getLawsList"
,
//路径
dataType
:
"json"
,
//数据,这里使用的是Json格式进行传输
success
:
function
(
result
)
{
//返回数据根据结果进行相应的处理
...
...
@@ -140,3 +141,25 @@ function LawsData() {
}
});
}
//加载相应政策数据
function
policiesData
()
{
var
policies
=
$
(
"#policies"
);
policies
.
empty
();
var
li
;
$
.
ajax
({
type
:
"get"
,
//提交方式
url
:
portal
.
api_url
+
"/hlwj/MhPolicy/getPolicyList"
,
//路径
dataType
:
"json"
,
//数据,这里使用的是Json格式进行传输
success
:
function
(
result
)
{
//返回数据根据结果进行相应的处理
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
+=
'</a></li>'
;
policies
.
append
(
li
);
}
}
}
});
}
\ No newline at end of file
...
...
Please
register
or
sign in
to post a comment