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
1087e21a
Commit
1087e21a
authored
Jan 25, 2025
by
罗林杰
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
62683b57
c619007e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
4 deletions
+20
-4
List.vue
pages/components/article/List.vue
+4
-0
article.vue
pages/tab/article.vue
+9
-3
publishArticle.vue
pagesArticle/publishArticle.vue
+7
-1
No files found.
pages/components/article/List.vue
View file @
1087e21a
...
...
@@ -64,6 +64,7 @@
firstLoaded
:
false
,
// 是否滚动到当前页
isCurrentPage
:
false
,
//动态类型 0:关注
articleType
:
''
,
}
},
...
...
@@ -96,6 +97,7 @@
if
(
newVal
===
2
){
//话题
this
.
getTopicList
()
this
.
reload
()
}
// 懒加载,当滑动到当前的item时,才去加载
if
(
!
this
.
firstLoaded
)
{
...
...
@@ -115,6 +117,7 @@
//tab标签点击
tabClick
({
id
})
{
this
.
topicId
=
id
this
.
$emit
(
'topicId'
,
this
.
topicId
)
this
.
reload
()
},
//查询话题列表
...
...
@@ -129,6 +132,7 @@
});
//初始化话题id 锁到第一个话题
this
.
topicId
=
this
.
topicList
[
0
].
id
this
.
$emit
(
'topicId'
,
this
.
topicId
)
})
},
// 接收父组件传过来的刷新列表要求
...
...
pages/tab/article.vue
View file @
1087e21a
...
...
@@ -35,7 +35,7 @@
<!-- swiper必须设置height:100%,因为swiper有默认的高度,只有设置高度100%才可以铺满页面 -->
<swiper
class=
"swiper"
:current=
"current"
@
animationfinish=
"swiperAnimationfinish"
>
<swiper-item
class=
"swiper-item"
v-for=
"(i,index) in list"
:key=
"index"
>
<ListVue
ref=
"listItem"
:tabIndex=
"index"
:currentIndex=
"current"
/>
<ListVue
ref=
"listItem"
:tabIndex=
"index"
:currentIndex=
"current"
@
topicId=
"handleTopicId"
/>
</swiper-item>
</swiper>
<login
@
change=
"getToLogin"
:isLoginPop=
"isLoginPop"
class=
"my-select"
></login>
...
...
@@ -92,7 +92,9 @@
current
:
1
,
num
:
0
,
//登录弹窗
isLoginPop
:
false
isLoginPop
:
false
,
//话题id
topicId
:
null
,
};
},
onShow
()
{
...
...
@@ -104,6 +106,10 @@
}
},
methods
:
{
//接收子组件传过来的话题id 为了进行发表动态使用
handleTopicId
(
value
){
this
.
topicId
=
value
},
// swiper滑动结束
swiperAnimationfinish
(
e
)
{
this
.
current
=
e
.
detail
.
current
;
...
...
@@ -133,7 +139,7 @@
&&
memInfo
.
memCareer
!=
''
&&
memInfo
.
memCareer
!=
null
&&
memInfo
.
memResidenceProvince
!=
null
&&
memInfo
.
memResidenceCity
!=
null
){
//已完善个人资料 可以发布动态
uni
.
navigateTo
({
url
:
'/pagesArticle/publishArticle
'
url
:
'/pagesArticle/publishArticle
?topicId='
+
this
.
topicId
})
}
else
{
//没完善个人资料 需要去完善
...
...
pagesArticle/publishArticle.vue
View file @
1087e21a
...
...
@@ -38,7 +38,9 @@
isConfirm
:
false
,
h
:
0
,
focus
:
false
,
isLoginPop
:
false
isLoginPop
:
false
,
//话题id
topicId
:
null
,
}
},
computed
:
{
...
...
@@ -46,6 +48,9 @@
return
`
${
this
.
h
}
px`
}
},
onLoad
(
value
){
this
.
topicId
=
value
.
topicId
},
methods
:
{
//发布
submit
()
{
...
...
@@ -59,6 +64,7 @@
const
params
=
{
content
:
this
.
content
,
pictureId
:
JSON
.
stringify
(
this
.
uploadImgJSON
),
topicId
:
this
.
topicId
}
//将params转成json
publishArticle
(
params
).
then
(
res
=>
{
...
...
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