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
83eb0dae
Commit
83eb0dae
authored
Jan 15, 2025
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户详情增加了条件判断
parent
81ed5d2f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
32 deletions
+58
-32
index.vue
pages/tab/index.vue
+1
-1
userArticleList.vue
pagesUser/userArticleList.vue
+15
-7
userInfo.vue
pagesUser/userInfo.vue
+42
-24
No files found.
pages/tab/index.vue
View file @
83eb0dae
...
...
@@ -166,7 +166,7 @@
//查看会员详情
gotoUserDetail
(
item
){
uni
.
navigateTo
({
url
:
'/pagesUser/userInfo?
i
d='
+
item
.
businessId
url
:
'/pagesUser/userInfo?
memberI
d='
+
item
.
businessId
})
},
//左上角的搜索
...
...
pagesUser/userArticleList.vue
View file @
83eb0dae
...
...
@@ -116,22 +116,30 @@ export default {
const
list
=
res
.
data
.
data
list
.
forEach
(
item
=>
{
//处理头像
if
(
item
.
memAvatar
!=
null
){
if
(
item
.
memAvatar
!=
=
null
&&
item
.
memAvatar
!==
''
){
item
.
memAvatar
=
item
.
memAvatar
.
replace
(
/
\\
/g
,
'/'
)
}
//处理动态照片
if
(
item
.
url
!=
null
){
if
(
item
.
url
!=
=
null
&&
item
.
url
!==
''
){
item
.
url
=
item
.
url
.
replace
(
/
\\
/g
,
'/'
).
split
(
','
)
}
//处理性别
item
.
memSex
=
getValue
(
'sex'
,
item
.
memSex
)
if
(
item
.
memSex
!==
null
&&
item
.
memSex
!==
''
){
item
.
memSex
=
getValue
(
'sex'
,
item
.
memSex
)
}
//通过生日计算年龄
const
dataItem
=
parseDate
(
item
.
memBirthday
)
item
.
memAge
=
calculateAge
(
dataItem
.
year
,
dataItem
.
month
,
dataItem
.
day
)
if
(
item
.
memBirthday
!==
null
&&
item
.
memBirthday
!==
''
){
const
dataItem
=
parseDate
(
item
.
memBirthday
)
item
.
memAge
=
calculateAge
(
dataItem
.
year
,
dataItem
.
month
,
dataItem
.
day
)
}
//处理地址
item
.
city
=
getCity
(
item
.
memResidenceProvince
,
item
.
memResidenceCity
)
if
(
item
.
memResidenceProvince
!==
null
&&
item
.
memResidenceProvince
!==
''
&&
item
.
memResidenceCity
!==
null
&&
item
.
memResidenceCity
!==
''
){
item
.
city
=
getCity
(
item
.
memResidenceProvince
,
item
.
memResidenceCity
)
}
//处理教育经历
item
.
memMaxEducation
=
getValue
(
'education'
,
item
.
memMaxEducation
)
if
(
item
.
memMaxEducation
!==
null
&&
item
.
memMaxEducation
!==
''
){
item
.
memMaxEducation
=
getValue
(
'education'
,
item
.
memMaxEducation
)
}
})
this
.
$refs
.
paging
.
complete
(
list
);
})
...
...
pagesUser/userInfo.vue
View file @
83eb0dae
...
...
@@ -342,30 +342,48 @@
//获取用户详情
getUserDetail
(){
userDetail
(
this
.
memberId
).
then
(
res
=>
{
this
.
userData
=
res
.
data
.
data
this
.
userId
=
this
.
userData
.
userId
//处理头像
this
.
imgList
.
push
(
res
.
data
.
data
.
avatarUrl
.
replace
(
/
\\
/g
,
'/'
))
//处理星座
this
.
userData
.
memConstellation
=
getValue
(
'constellation'
,
res
.
data
.
data
.
memConstellation
)
//通过生日计算年龄
const
dataItem
=
parseDate
(
res
.
data
.
data
.
memBirthday
)
this
.
userData
.
memAge
=
calculateAge
(
dataItem
.
year
,
dataItem
.
month
,
dataItem
.
day
)
//处理学历
this
.
userData
.
memMaxEducation
=
getValue
(
'education'
,
res
.
data
.
data
.
memMaxEducation
)
//处理性别
this
.
userData
.
memSex
=
getValue
(
'sex'
,
res
.
data
.
data
.
memSex
)
//处理实名
this
.
userData
.
memRealAuthen
=
getValue
(
'realAuthen'
,
res
.
data
.
data
.
memRealAuthen
)
//处理动态
this
.
userData
.
articleContent
=
'我喜欢吃鱼我喜欢吃鱼我喜欢吃鱼我喜欢吃鱼我喜欢吃鱼我喜欢吃鱼我喜欢吃鱼'
this
.
userData
.
articleImg
=
[
'http://192.168.1.7/upload/CmsActivity/20241230/E3994EF11C524D48AD88D383A2B5786B.jpg'
,
'http://192.168.1.7/upload/CmsBanner/20241230/18E63B570FF04DB3A8EFE277D58256C4.jpg'
,
'http://192.168.1.7/upload/CmsBanner/20241230/18E63B570FF04DB3A8EFE277D58256C4.jpg'
]
//处理地址
this
.
userData
.
city
=
getCity
(
res
.
data
.
data
.
memResidenceProvince
,
res
.
data
.
data
.
memResidenceCity
)
if
(
res
.
data
.
data
!==
null
&&
res
.
data
.
data
!==
''
){
this
.
userData
=
res
.
data
.
data
this
.
userId
=
this
.
userData
.
userId
//处理头像
if
(
res
.
data
.
data
.
avatarUrl
!==
''
&&
res
.
data
.
data
.
avatarUrl
!==
null
){
this
.
imgList
.
push
(
res
.
data
.
data
.
avatarUrl
.
replace
(
/
\\
/g
,
'/'
))
}
//处理星座
if
(
res
.
data
.
data
.
memConstellation
!==
''
&&
res
.
data
.
data
.
memConstellation
!==
null
){
this
.
userData
.
memConstellation
=
getValue
(
'constellation'
,
res
.
data
.
data
.
memConstellation
)
}
//通过生日计算年龄
if
(
res
.
data
.
data
.
memBirthday
!==
''
&&
res
.
data
.
data
.
memBirthday
!==
null
){
const
dataItem
=
parseDate
(
res
.
data
.
data
.
memBirthday
)
this
.
userData
.
memAge
=
calculateAge
(
dataItem
.
year
,
dataItem
.
month
,
dataItem
.
day
)
}
//处理学历
if
(
res
.
data
.
data
.
memMaxEducation
!==
''
&&
res
.
data
.
data
.
memMaxEducation
!==
null
){
this
.
userData
.
memMaxEducation
=
getValue
(
'education'
,
res
.
data
.
data
.
memMaxEducation
)
}
//处理性别
if
(
res
.
data
.
data
.
memSex
!==
''
&&
res
.
data
.
data
.
memSex
!==
null
){
this
.
userData
.
memSex
=
getValue
(
'sex'
,
res
.
data
.
data
.
memSex
)
}
//处理实名
if
(
res
.
data
.
data
.
memRealAuthen
!==
''
&&
res
.
data
.
data
.
memRealAuthen
!==
null
){
this
.
userData
.
memRealAuthen
=
getValue
(
'realAuthen'
,
res
.
data
.
data
.
memRealAuthen
)
}
//处理动态
if
(
res
.
data
.
data
.
articleContent
!==
''
&&
res
.
data
.
data
.
articleContent
!==
null
){
this
.
userData
.
articleContent
=
'我喜欢吃鱼我喜欢吃鱼我喜欢吃鱼我喜欢吃鱼我喜欢吃鱼我喜欢吃鱼我喜欢吃鱼'
this
.
userData
.
articleImg
=
[
'http://192.168.1.7/upload/CmsActivity/20241230/E3994EF11C524D48AD88D383A2B5786B.jpg'
,
'http://192.168.1.7/upload/CmsBanner/20241230/18E63B570FF04DB3A8EFE277D58256C4.jpg'
,
'http://192.168.1.7/upload/CmsBanner/20241230/18E63B570FF04DB3A8EFE277D58256C4.jpg'
]
}
//处理地址
if
(
res
.
data
.
data
.
memResidenceProvince
!==
''
&&
res
.
data
.
data
.
memResidenceProvince
!==
null
&&
res
.
data
.
data
.
memResidenceCity
!==
''
&&
res
.
data
.
data
.
memResidenceCity
!==
null
){
this
.
userData
.
city
=
getCity
(
res
.
data
.
data
.
memResidenceProvince
,
res
.
data
.
data
.
memResidenceCity
)
}
}
})
},
confirm
()
{
...
...
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