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
d0f3484c
authored
2020-11-21 17:26:43 +0800
by
田浩浩
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
加载新闻列表数据
1 parent
d629ddf4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
staticJs/xwdt.js
staticViews/xwdt.html
staticJs/xwdt.js
View file @
d0f3484
...
...
@@ -37,13 +37,17 @@ $(function () {
function
LoadNewsData
()
{
$
.
ajax
({
type
:
"get"
,
//提交方式
url
:
portal
.
api_url
+
"/hlwj/Mh/getNewsHotArticleList"
,
//路径
url
:
portal
.
api_url
+
"/hlwj/Mh/getNewsArticleList"
,
//路径
data
:{
"currentPage"
:
1
,
"pageSize"
:
10
},
dataType
:
"json"
,
async
:
false
,
//数据,这里使用的是Json格式进行传输
success
:
function
(
result
)
{
//返回数据根据结果进行相应的处理
if
(
result
.
code
==
200
&&
result
.
data
!=
null
)
{
data
.
list
=
result
.
data
;
data
.
list
=
result
.
data
.
records
;
}
}
});
...
...
staticViews/xwdt.html
View file @
d0f3484
...
...
@@ -104,7 +104,9 @@
<
/div
>
<
div
class
=
"xw-right"
>
<
div
class
=
"left-body"
>
{{
item
.
headline
}}
{{
#
if
(
item
.
summary
!==
null
){
}}
{{
item
.
summary
}}
{{
#
}
}}
<
/div
>
<
div
class
=
"left-buttom"
>
<
div
>
...
...
@@ -120,7 +122,7 @@
<
span
>
{{
item
.
commentnum
}}
<
/span
>
<
/div
>
<
div
class
=
"left-buttom-date"
>
{{
item
.
publishTime
}}
{{
CutDate
(
item
.
publishTime
)
}}
<
/div
>
<
/div
>
<
/div
>
...
...
@@ -128,4 +130,5 @@
<
/li
>
{{
#
});
}}
</script>
</html>
\ No newline at end of file
...
...
Please
register
or
sign in
to post a comment