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
c4338955
Commit
c4338955
authored
Jan 22, 2025
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了我的页面的,三种类型的会员列表查询
parent
736a59cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
211 deletions
+71
-211
my.vue
pages/tab/my.vue
+6
-6
likeList.vue
pagesme/me/likeList.vue
+65
-205
No files found.
pages/tab/my.vue
View file @
c4338955
...
...
@@ -44,25 +44,25 @@
<text
v-else
>
0
</text>
</view>
<view
class=
"top-tabs"
>
<view
class=
"tab-1"
@
click=
"gotolike(1,info.
ilike
)"
>
<view
class=
"tab-1"
@
click=
"gotolike(1,info.
meFollowCount
)"
>
<view
class=
"tab-1-num"
>
<text
v-if=
"info.
ilike"
>
{{
info
.
ilike
}}
</text><text
v-else
>
0
</text>
<text
v-if=
"info.
meFollowCount"
>
{{
info
.
meFollowCount
}}
</text><text
v-else
>
0
</text>
</view>
<view
class=
"tab-1-text"
>
我喜欢的
</view>
</view>
<view
class=
"tab-2"
style=
"margin: 0 136rpx;"
@
click=
"gotolike(2,info.
likeMe
)"
>
<view
class=
"tab-2"
style=
"margin: 0 136rpx;"
@
click=
"gotolike(2,info.
followMeCount
)"
>
<view
class=
"tab-2-num"
>
<text
v-if=
"info.
likeMe"
>
{{
info
.
likeMe
}}
</text><text
v-else
>
0
</text>
<text
v-if=
"info.
followMeCount"
>
{{
info
.
followMeCount
}}
</text><text
v-else
>
0
</text>
</view>
<view
class=
"tab-2-text"
>
喜欢我的
</view>
</view>
<view
class=
"tab-3"
@
click=
"gotolike(3,info.
lovers
)"
>
<view
class=
"tab-3"
@
click=
"gotolike(3,info.
eachFollowCount
)"
>
<view
class=
"tab-3-num"
>
<text
v-if=
"info.
lovers"
>
{{
info
.
lovers
}}
</text><text
v-else
>
0
</text>
<text
v-if=
"info.
eachFollowCount"
>
{{
info
.
eachFollowCount
}}
</text><text
v-else
>
0
</text>
</view>
<view
class=
"tab-3-text"
>
互相喜欢
...
...
pagesme/me/likeList.vue
View file @
c4338955
...
...
@@ -14,16 +14,16 @@
<view
class=
"card-bottom"
>
<view
class=
"bottom-left"
>
<view
class=
"bottom-info"
>
{{
item
.
n
ickName
}}
<image
v-if=
"item.
gender == 'MALE
'"
class=
"gender"
:src=
"baseUrl+'/user/male.png'"
mode=
""
/>
{{
item
.
memN
ickName
}}
<image
v-if=
"item.
memSex === '0
'"
class=
"gender"
:src=
"baseUrl+'/user/male.png'"
mode=
""
/>
<image
v-else
class=
"gender"
:src=
"baseUrl+'/user/famale.png'"
mode=
""
/>
</view>
<view
class=
"bottom-info"
>
{{
item
.
a
ge
}}
岁
{{
item
.
memA
ge
}}
岁
<text
style=
"margin-left: 10rpx;margin-right: 10rpx;color: #BBB9B9FF;"
>
|
</text>
{{
item
.
h
eight
}}
cm
{{
item
.
memH
eight
}}
cm
</view>
<view
class=
"bottom-address"
>
{{
item
.
address
}}
</view>
<view
class=
"bottom-address"
>
{{
item
.
city
}}
</view>
</view>
</view>
</view>
...
...
@@ -33,56 +33,18 @@
</
template
>
<
script
>
import
{
userList
}
from
"../../api/user"
;
import
{
getOssUrl
}
from
"../../api/article"
;
import
{
getCity
,
getValue
}
from
"../../common/options"
;
import
{
calculateAge
,
parseDate
}
from
"../../common"
;
export
default
{
data
()
{
return
{
//图片路径
baseUrl
:
this
.
$IMG_URL
,
//用户列表
userList
:[
{
nickName
:
'暖洋洋'
,
gender
:
'FEMALE'
,
age
:
'21'
,
height
:
'165'
,
address
:
'重庆市'
},
{
nickName
:
'暖洋洋'
,
gender
:
'MALE'
,
age
:
'21'
,
height
:
'165'
,
address
:
'重庆市'
},
{
nickName
:
'暖洋洋'
,
gender
:
'MALE'
,
age
:
'21'
,
height
:
'165'
,
address
:
'重庆市'
},
{
nickName
:
'暖洋洋'
,
gender
:
'FEMALE'
,
age
:
'21'
,
height
:
'165'
,
address
:
'重庆市'
},
{
nickName
:
'暖洋洋'
,
gender
:
'FEMALE'
,
age
:
'21'
,
height
:
'165'
,
address
:
'重庆市'
},
{
nickName
:
'暖洋洋'
,
gender
:
'FEMALE'
,
age
:
'21'
,
height
:
'165'
,
address
:
'重庆市'
},
],
userList
:[],
//是否有数据
isdata
:
false
,
//页头
...
...
@@ -95,6 +57,11 @@ export default {
navHeight
:
''
,
share
:
false
,
menuButtonInfo
:
''
,
//分页查询参数
queryParam
:{
page
:
1
,
rows
:
10
}
};
},
onLoad
(
options
)
{
...
...
@@ -132,169 +99,62 @@ export default {
this
.
getUserList
()
},
methods
:
{
getList
(
params
){
//我喜欢的
userList
(
params
).
then
(
res
=>
{
this
.
userList
=
res
.
data
.
data
//遍历this.userList
this
.
userList
.
forEach
(
item
=>
{
//处理头像
if
(
item
.
avatar
!=
null
&&
item
.
avatar
!=
''
){
getOssUrl
(
item
.
avatar
).
then
(
res
=>
{
item
.
avatarUrl
=
res
.
data
.
data
})
}
//处理性别
if
(
item
.
memSex
!=
null
&&
item
.
memSex
!=
''
){
item
.
memSex
=
getValue
(
'sex'
,
item
.
memSex
)
}
//处理年龄
if
(
item
.
memBirthday
!=
null
&&
item
.
memBirthday
!=
''
){
const
birthdayItem
=
parseDate
(
item
.
memBirthday
)
item
.
memAge
=
calculateAge
(
birthdayItem
.
year
,
birthdayItem
.
month
,
birthdayItem
.
day
)
}
//处理地址
if
(
item
.
memResidenceProvince
!=
null
&&
item
.
memResidenceProvince
!=
''
&&
item
.
memResidenceCity
!=
null
&&
item
.
memResidenceCity
!=
''
){
item
.
city
=
getCity
(
item
.
memResidenceProvince
,
item
.
memResidenceCity
)
}
});
}).
catch
(
e
=>
{
console
.
log
(
e
)
})
},
//获取用户列表数据
getUserList
(){
if
(
this
.
type
==
'1'
){
//我喜欢的
const
list
=
[
{
nickName
:
'暖洋洋'
,
gender
:
'FEMALE'
,
age
:
'21'
,
height
:
'165'
,
address
:
'重庆市'
},
{
nickName
:
'暖洋洋'
,
gender
:
'MALE'
,
age
:
'21'
,
height
:
'165'
,
address
:
'重庆市'
},
{
nickName
:
'暖洋洋'
,
gender
:
'MALE'
,
age
:
'21'
,
height
:
'165'
,
address
:
'重庆市'
},
{
nickName
:
'暖洋洋'
,
gender
:
'FEMALE'
,
age
:
'21'
,
height
:
'165'
,
address
:
'重庆市'
},
{
nickName
:
'暖洋洋'
,
gender
:
'FEMALE'
,
age
:
'21'
,
height
:
'165'
,
address
:
'重庆市'
},
{
nickName
:
'暖洋洋'
,
gender
:
'FEMALE'
,
age
:
'21'
,
height
:
'165'
,
address
:
'重庆市'
},
]
this
.
userList
=
list
const
params
=
{
page
:
this
.
queryParam
.
page
,
rows
:
this
.
queryParam
.
rows
,
queryType
:
'1'
}
this
.
getList
(
params
)
}
else
if
(
this
.
type
==
'2'
)
{
//喜欢我的
const
list
=
[
{
nickName
:
'暖洋洋'
,
gender
:
'FEMALE'
,
age
:
'21'
,
height
:
'165'
,
address
:
'重庆市'
},
{
nickName
:
'暖洋洋'
,
gender
:
'MALE'
,
age
:
'21'
,
height
:
'165'
,
address
:
'重庆市'
},
{
nickName
:
'暖洋洋'
,
gender
:
'MALE'
,
age
:
'21'
,
height
:
'165'
,
address
:
'重庆市'
},
{
nickName
:
'暖洋洋'
,
gender
:
'FEMALE'
,
age
:
'21'
,
height
:
'165'
,
address
:
'重庆市'
},
{
nickName
:
'暖洋洋'
,
gender
:
'FEMALE'
,
age
:
'21'
,
height
:
'165'
,
address
:
'重庆市'
},
{
nickName
:
'暖洋洋'
,
gender
:
'FEMALE'
,
age
:
'21'
,
height
:
'165'
,
address
:
'重庆市'
},
{
nickName
:
'暖洋洋'
,
gender
:
'FEMALE'
,
age
:
'21'
,
height
:
'165'
,
address
:
'重庆市'
},
]
this
.
userList
=
list
const
params
=
{
page
:
this
.
queryParam
.
page
,
rows
:
this
.
queryParam
.
rows
,
queryType
:
'2'
}
this
.
getList
(
params
)
}
else
if
(
this
.
type
==
'3'
)
{
//互相喜欢的
const
list
=
[
{
nickName
:
'暖洋洋'
,
gender
:
'MALE'
,
age
:
'21'
,
height
:
'165'
,
address
:
'重庆市'
},
{
nickName
:
'暖洋洋'
,
gender
:
'MALE'
,
age
:
'21'
,
height
:
'165'
,
address
:
'重庆市'
},
{
nickName
:
'暖洋洋'
,
gender
:
'FEMALE'
,
age
:
'21'
,
height
:
'165'
,
address
:
'重庆市'
},
{
nickName
:
'暖洋洋'
,
gender
:
'FEMALE'
,
age
:
'21'
,
height
:
'165'
,
address
:
'重庆市'
},
{
nickName
:
'暖洋洋'
,
gender
:
'FEMALE'
,
age
:
'21'
,
height
:
'165'
,
address
:
'重庆市'
},
{
nickName
:
'暖洋洋'
,
gender
:
'FEMALE'
,
age
:
'21'
,
height
:
'165'
,
address
:
'重庆市'
},
{
nickName
:
'暖洋洋'
,
gender
:
'FEMALE'
,
age
:
'21'
,
height
:
'165'
,
address
:
'重庆市'
},
{
nickName
:
'暖洋洋'
,
gender
:
'FEMALE'
,
age
:
'21'
,
height
:
'165'
,
address
:
'重庆市'
}
]
this
.
userList
=
list
const
params
=
{
page
:
this
.
queryParam
.
page
,
rows
:
this
.
queryParam
.
rows
,
queryType
:
'3'
}
this
.
getList
(
params
)
}
},
backbar
()
{
...
...
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