Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cust-app
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
李伟
cust-app
Commits
6d59b9e3
Commit
6d59b9e3
authored
Jan 18, 2025
by
罗林杰
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
fd0d3992
57b7cf25
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
102 additions
and
138 deletions
+102
-138
index.js
api/article/index.js
+2
-2
List.vue
pages/components/article/List.vue
+4
-10
index.vue
pages/tab/index.vue
+2
-2
articleDetail.vue
pagesArticle/articleDetail.vue
+94
-124
No files found.
api/article/index.js
View file @
6d59b9e3
...
...
@@ -13,7 +13,7 @@ export function articleList(query) {
// 发表动态
export
function
publishArticle
(
data
)
{
return
request
({
url
:
'/
opma
rticle/add'
,
url
:
'/
app/opmA
rticle/add'
,
data
:
data
,
method
:
'POST'
,
})
...
...
@@ -47,7 +47,7 @@ export function articleDetail(articleId){
//动态评论
export
function
comment
(
data
)
{
return
request
({
url
:
'/
opma
rticle/comment'
,
url
:
'/
app/opmA
rticle/comment'
,
data
:
data
,
method
:
'POST'
,
})
...
...
pages/components/article/List.vue
View file @
6d59b9e3
...
...
@@ -12,7 +12,7 @@
'top': '210rpx',
'width': '447rpx',
'height': '375rpx'
}" v-model="dataList" @query="queryList" :fixed="false"
@onRefresh="onRefresh"
auto-show-back-to-top="true">
}" v-model="dataList" @query="queryList" :fixed="false" auto-show-back-to-top="true">
<view
v-if=
"currentIndex == '2'"
>
<u-tabs
ref=
"tabs"
:list=
"topicList"
font-size=
"30"
:current=
"current"
@
click=
"tabClick"
:activeStyle=
"
{
...
...
@@ -106,14 +106,6 @@
},
},
methods
:
{
// 下拉刷新被触发
onRefresh
()
{
// 告知z-paging下拉刷新结束,这样才可以开始下一次的下拉刷新
setTimeout
(()
=>
{
// 1.5秒之后停止刷新动画
this
.
reload
()
},
1500
)
},
//tab标签点击
tabClick
({
id
})
{
this
.
topicId
=
id
...
...
@@ -129,6 +121,8 @@
name
:
item
.
topicName
};
});
//初始化话题id 锁到第一个话题
this
.
topicId
=
this
.
topicList
[
0
].
id
})
},
// 接收父组件传过来的刷新列表要求
...
...
@@ -138,7 +132,7 @@
this
.
$refs
.
paging
&&
this
.
$refs
.
paging
.
reload
();
})
},
//分页查询方法
//分页查询方法
下拉刷新或滚动到底部
queryList
(
pageNo
,
pageSize
)
{
const
params
=
{
page
:
pageNo
,
...
...
pages/tab/index.vue
View file @
6d59b9e3
...
...
@@ -5,8 +5,8 @@
<!-- 左上角搜索-->
<u-navbar
bgColor=
"white"
:placeholder=
"true"
>
<view
class=
"u-nav-slot"
slot=
"left"
@
click=
"screen"
>
<image
:src=
"baseUrl+'/index/screen.png'"
class=
"img"
mode=
"aspectFill"
></image
>
<view
class=
"text"
>
搜索
</view
>
<!--
<image
:src=
"baseUrl+'/index/screen.png'"
class=
"img"
mode=
"aspectFill"
></image>
--
>
<!--
<view
class=
"text"
>
搜索
</view>
--
>
</view>
</u-navbar>
...
...
pagesArticle/articleDetail.vue
View file @
6d59b9e3
This diff is collapsed.
Click to expand it.
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