Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
viitto
mallapp
Commits
6189c33f
Commit
6189c33f
authored
Mar 01, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
a8d3c091
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
155 additions
and
0 deletions
+155
-0
typeList.vue
pages/kotra/typeList.vue
+155
-0
No files found.
pages/kotra/typeList.vue
0 → 100644
View file @
6189c33f
<
style
>
.koraNewsList
{
display
:
flex
;
width
:
100%
;
padding
:
10px
;
border-bottom
:
1px
solid
#F4F4F4
;
flex
:
1
;
}
.newsLeft
{
width
:
153px
;
height
:
115px
;
flex-shrink
:
0
;
border-radius
:
3px
;
overflow
:
hidden
;
}
.newsLeft
img
{
width
:
100%
;
height
:
100%
;
}
.koranewRight
{
position
:
relative
;
width
:
100%
;
margin-left
:
12px
;
}
.koraDate
{
position
:
absolute
;
color
:
#B9B9B9
;
bottom
:
0
;
font-size
:
12px
;
}
.koraRName
{
color
:
#404040
;
font-size
:
14px
;
display
:
-webkit-box
;
-webkit-box-orient
:
vertical
;
-webkit-line-clamp
:
3
;
overflow
:
hidden
;
}
.koraNewsSearch
{
display
:
flex
;
margin
:
10px
10px
0
10px
;
width
:
100%
;
justify-content
:
space-between
;
}
.koraNews_Btn
{
width
:
60px
;
height
:
34px
;
background-color
:
#000450
;
color
:
#fff
;
text-align
:
center
;
line-height
:
34px
;
border-radius
:
3px
;
margin-top
:
0.5px
;
margin-right
:
20px
;
display
:
inline-block
;
}
</
style
>
<
template
>
<view
class=
"koraNews"
>
<view
class=
"koraNewsSearch"
>
<u-search
placeholder=
"输入关键字搜索"
style=
"width:81%;"
:show-action=
"false"
v-model=
"msg.Title"
></u-search>
<view
class=
"koraNews_Btn"
@
click=
"getList(1)"
>
搜索
</view>
</view>
<u-empty
v-if=
"dataList.length==0"
text=
"暂无数据"
mode=
"data"
></u-empty>
<scroll-view
v-else
:scroll-y=
"true"
:enable-back-to-top=
"true"
:enable-flex=
"true"
@
scrolltolower=
"lower"
:style=
"
{ 'height': `calc(100%)`}">
<view>
<view
class=
"koraNewsList"
v-for=
"(item,index) in dataList"
:key=
"index"
@
click=
"goNewsDetail(item)"
>
<view
class=
"newsLeft"
>
<img
:src=
"item.CoverImg"
alt=
""
/>
</view>
<view
class=
"koranewRight"
>
<view
class=
"koraRName"
>
{{
item
.
Title
}}
</view>
<view
class=
"koraDate"
>
{{
item
.
PublishTimeStr
}}
</view>
</view>
</view>
</view>
<view
style=
"padding:10px 0;"
>
<u-loadmore
:status=
"status"
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"0"
:margin-bottom=
"0"
/>
</view>
</scroll-view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
pageTitle
:
"类型"
,
msg
:{
pageIndex
:
1
,
pageSize
:
10
,
Title
:
''
,
Type
:
2
},
pageCount
:
1
,
dataList
:[],
loadText
:
{
loadmore
:
"轻轻上拉,加载更多"
,
loading
:
"努力加载中"
,
nomore
:
"没有更多了"
,
},
status
:
''
,
}
},
mounted
(){
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
,
});
this
.
getList
(
1
);
},
methods
:
{
//获取数据
getList
(
num
)
{
if
(
num
==
1
)
{
this
.
dataList
=
[];
}
uni
.
showLoading
({
title
:
'加载中'
});
this
.
request2
({
url
:
"/api/AppletTrade/GetNewsPage"
,
data
:
this
.
msg
,
},
(
res
)
=>
{
uni
.
hideLoading
();
if
(
res
.
resultCode
==
1
)
{
console
.
log
(
res
,
'数据类了'
);
this
.
dataList
=
this
.
dataList
.
concat
(
res
.
data
.
pageData
);
this
.
pageCount
=
res
.
data
.
pageCount
;
}
}
);
},
//滚动加载
lower
(
e
)
{
if
(
this
.
msg
.
pageIndex
<
this
.
pageCount
)
{
this
.
msg
.
pageIndex
++
;
this
.
status
=
"loading"
;
this
.
getList
();
}
else
{
this
.
status
=
"nomore"
;
}
},
//跳转至新闻详情
goNewsDetail
(
item
){
uni
.
navigateTo
({
url
:
'/pages/kotra/newsInDetail?Id='
+
item
.
Id
});
}
}
}
</
script
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment