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
38d0db46
Commit
38d0db46
authored
Jan 24, 2025
by
罗林杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改关注
parent
919c50e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
11 deletions
+53
-11
likeList.vue
pagesme/me/likeList.vue
+53
-11
No files found.
pagesme/me/likeList.vue
View file @
38d0db46
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
</view>
</view>
<view
class=
"bottom-address"
>
{{
item
.
city
}}
</view>
<view
class=
"bottom-address"
>
{{
item
.
city
}}
</view>
</view>
</view>
<image
v-if=
"type == '1' || type == '3'"
class=
"cnacleLike"
:src=
"baseUrl+'/user/cancelLike.png'"
@
click=
"gotoDetail(item.userId)"
/>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -33,7 +34,7 @@
...
@@ -33,7 +34,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
userList
}
from
"../../api/user"
;
import
{
deleteFollow
,
userList
}
from
"../../api/user"
;
import
{
getOssUrl
}
from
"../../api/article"
;
import
{
getOssUrl
}
from
"../../api/article"
;
import
{
getCity
,
getValue
}
from
"../../common/options"
;
import
{
getCity
,
getValue
}
from
"../../common/options"
;
import
{
calculateAge
,
parseDate
}
from
"../../common"
;
import
{
calculateAge
,
parseDate
}
from
"../../common"
;
...
@@ -68,16 +69,6 @@ export default {
...
@@ -68,16 +69,6 @@ export default {
//设置页头
//设置页头
this
.
type
=
options
.
type
;
this
.
type
=
options
.
type
;
this
.
num
=
options
.
num
;
this
.
num
=
options
.
num
;
if
(
this
.
type
==
'1'
){
//我喜欢的
this
.
title
=
'我喜欢的'
+
'('
+
this
.
num
+
')'
;
}
else
if
(
this
.
type
==
'2'
){
//喜欢我的
this
.
title
=
'喜欢我的'
+
'('
+
this
.
num
+
')'
;
}
else
if
(
this
.
type
==
'3'
){
//互相喜欢
this
.
title
=
'互相喜欢'
+
'('
+
this
.
num
+
')'
;
}
//获取当前页面的页头高度
//获取当前页面的页头高度
this
.
menuButtonInfo
=
uni
.
getMenuButtonBoundingClientRect
()
this
.
menuButtonInfo
=
uni
.
getMenuButtonBoundingClientRect
()
...
@@ -103,6 +94,8 @@ export default {
...
@@ -103,6 +94,8 @@ export default {
//我喜欢的
//我喜欢的
userList
(
params
).
then
(
res
=>
{
userList
(
params
).
then
(
res
=>
{
this
.
userList
=
res
.
data
.
data
this
.
userList
=
res
.
data
.
data
this
.
num
=
this
.
userList
.
length
this
.
getTitle
()
//遍历this.userList
//遍历this.userList
this
.
userList
.
forEach
(
item
=>
{
this
.
userList
.
forEach
(
item
=>
{
//处理头像
//处理头像
...
@@ -129,6 +122,19 @@ export default {
...
@@ -129,6 +122,19 @@ export default {
console
.
log
(
e
)
console
.
log
(
e
)
})
})
},
},
//获取表头
getTitle
(){
if
(
this
.
type
==
'1'
){
//我喜欢的
this
.
title
=
'我喜欢的'
+
'('
+
this
.
num
+
')'
;
}
else
if
(
this
.
type
==
'2'
){
//喜欢我的
this
.
title
=
'喜欢我的'
+
'('
+
this
.
num
+
')'
;
}
else
if
(
this
.
type
==
'3'
){
//互相喜欢
this
.
title
=
'互相喜欢'
+
'('
+
this
.
num
+
')'
;
}
},
//获取用户列表数据
//获取用户列表数据
getUserList
(){
getUserList
(){
if
(
this
.
type
==
'1'
){
if
(
this
.
type
==
'1'
){
...
@@ -157,6 +163,34 @@ export default {
...
@@ -157,6 +163,34 @@ export default {
this
.
getList
(
params
)
this
.
getList
(
params
)
}
}
},
},
deleteLike
(
id
){
//是否确认
uni
.
showModal
({
title
:
'提示'
,
content
:
'是否取消关注'
,
success
:
(
res
)
=>
{
if
(
res
.
confirm
)
{
const
form
=
{
userId
:
uni
.
getStorageSync
(
'userInfo'
).
businessId
,
targetId
:
id
,
}
deleteFollow
(
form
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
){
this
.
$u
.
toast
(
'取消关注成功'
)
this
.
getUserList
()
}
})
}
else
if
(
res
.
cancel
)
{
}
}
});
},
//跳转用户详情
gotoDetail
(
item
){
uni
.
navigateTo
({
url
:
'/pagesUser/userInfo?id='
+
item
.
userId
})
},
backbar
()
{
backbar
()
{
uni
.
navigateBack
({
uni
.
navigateBack
({
delta
:
1
,
//返回层数,2则上上页
delta
:
1
,
//返回层数,2则上上页
...
@@ -284,4 +318,12 @@ export default {
...
@@ -284,4 +318,12 @@ export default {
}
}
}
}
.cnacleLike
{
height
:
40rpx
;
width
:
60rpx
;
margin-top
:
100rpx
;
margin-right
:
10rpx
;
justify-content
:
flex-end
;
display
:
flex
}
</
style
>
</
style
>
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