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
e85e4f41
Commit
e85e4f41
authored
Jan 08, 2025
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了部分显示字段
parent
df1add6e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
15 deletions
+26
-15
activity.vue
pages/tab/activity.vue
+2
-3
index.vue
pages/tab/index.vue
+4
-2
userInfo.vue
pagesUser/userInfo.vue
+1
-1
userList.vue
pagesUser/userList.vue
+19
-9
No files found.
pages/tab/activity.vue
View file @
e85e4f41
...
...
@@ -24,9 +24,9 @@
</view>
<view
class=
"rightlist-address"
>
<view
class=
"addressicon"
>
<u-icon
name=
"
map
"
color=
"#D84848;"
size=
"15"
></u-icon>
<u-icon
name=
"
tags
"
color=
"#D84848;"
size=
"15"
></u-icon>
</view>
<view
class=
"addresstext"
v-if=
"item.
address"
>
{{
item
.
address
}}
</view>
<view
class=
"addresstext"
v-if=
"item.
summary"
>
{{
item
.
summary
}}
</view>
<view
class=
"addresstext"
v-else
>
-
</view>
</view>
</view>
...
...
@@ -136,7 +136,6 @@ export default {
rows
:
this
.
queryParam
.
rows
}
activityList
(
query
).
then
(
res
=>
{
console
.
log
(
'res.data.data:'
,
res
.
data
.
data
)
this
.
activityList
=
res
.
data
.
data
.
map
(
item
=>
({
...
item
,
// 复制对象中的所有属性
url
:
item
.
url
!=
null
?
item
.
url
.
replace
(
/
\\
/g
,
'/'
)
:
''
// 替换 avatarUrl 中的所有 \ 为 /
...
...
pages/tab/index.vue
View file @
e85e4f41
...
...
@@ -60,7 +60,7 @@
<view
class=
"addressicon"
>
<u-icon
name=
"map"
color=
"#D84848;"
size=
"15"
></u-icon>
</view>
<view
class=
"addresstext"
v-if=
"item.
memResidenceProvince"
>
{{
item
.
memResidenceProvince
}}
</view>
<view
class=
"addresstext"
v-if=
"item.
city"
>
{{
item
.
city
}}
</view>
<view
class=
"addresstext"
v-else
>
-
</view>
</view>
</view>
...
...
@@ -78,6 +78,7 @@
import
{
noticeList
}
from
'../../api/notice/index'
import
{
bannerList
}
from
'../../api/banner/index'
import
{
userList
}
from
'../../api/user/index'
import
{
getCity
}
from
"../../common/options"
;
export
default
{
components
:
{
LsSwiper
...
...
@@ -118,7 +119,8 @@
// 假设 res.data.data 是从服务器接收到的数据
this
.
userList
=
res
.
data
.
data
.
map
(
item
=>
({
...
item
,
// 复制对象中的所有属性
avatarUrl
:
item
.
avatarUrl
!=
null
?
item
.
avatarUrl
.
replace
(
/
\\
/g
,
'/'
)
:
''
// 替换 avatarUrl 中的所有 \ 为 /
avatarUrl
:
item
.
avatarUrl
!=
null
?
item
.
avatarUrl
.
replace
(
/
\\
/g
,
'/'
)
:
''
,
// 替换 avatarUrl 中的所有 \ 为 /
city
:
getCity
(
item
.
memResidenceProvince
,
item
.
memResidenceCity
)
}));
}).
catch
(
e
=>
{
console
.
log
(
e
)
...
...
pagesUser/userInfo.vue
View file @
e85e4f41
...
...
@@ -350,7 +350,7 @@
'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
)
})
},
...
...
pagesUser/userList.vue
View file @
e85e4f41
...
...
@@ -15,15 +15,15 @@
<view
class=
"bottom-left"
>
<view
class=
"bottom-info"
>
{{
item
.
memNickName
}}
<image
v-if=
"item.memSex == '
0
'"
class=
"gender"
:src=
"baseUrl+'/user/male.png'"
mode=
""
/>
<image
v-if=
"item.memSex == '
男
'"
class=
"gender"
:src=
"baseUrl+'/user/male.png'"
mode=
""
/>
<image
v-else
class=
"gender"
:src=
"baseUrl+'/user/famale.png'"
mode=
""
/>
</view>
<view
class=
"bottom-info"
>
{{
18
}}
岁
{{
item
.
memAge
}}
岁
<text
style=
"margin-left: 10rpx;margin-right: 10rpx;color: #BBB9B9FF;"
>
|
</text>
{{
item
.
memHeight
}}
cm
</view>
<view
class=
"bottom-address"
>
{{
item
.
address
}}
</view>
<view
class=
"bottom-address"
>
{{
item
.
city
}}
</view>
</view>
</view>
</view>
...
...
@@ -34,6 +34,8 @@
<
script
>
import
{
userList
}
from
"../api/user"
;
import
{
getCity
,
getValue
}
from
"../common/options"
;
import
{
calculateAge
,
parseDate
}
from
"../common"
;
export
default
{
data
()
{
return
{
...
...
@@ -90,12 +92,20 @@ export default {
rows
:
this
.
queryParam
.
rows
}
userList
(
query
).
then
(
res
=>
{
// 假设 res.data.data 是从服务器接收到的数据
this
.
userList
=
res
.
data
.
data
.
map
(
item
=>
({
...
item
,
// 复制对象中的所有属性
avatarUrl
:
item
.
avatarUrl
.
replace
(
/
\\
/g
,
'/'
)
// 替换 avatarUrl 中的所有 \ 为 /
}));
console
.
log
(
'this.userList:'
,
this
.
userList
)
this
.
userList
=
res
.
data
.
data
//遍历this.userList
this
.
userList
.
forEach
(
item
=>
{
//处理头像
item
.
avatarUrl
=
item
.
avatarUrl
.
replace
(
/
\\
/g
,
'/'
)
// 替换 avatarUrl 中的所有 \ 为 /
//处理性别
item
.
memSex
=
getValue
(
'sex'
,
item
.
memSex
)
//处理年龄
const
birthdayItem
=
parseDate
(
item
.
memBirthday
)
item
.
memAge
=
calculateAge
(
birthdayItem
.
year
,
birthdayItem
.
month
,
birthdayItem
.
day
)
//处理地址
item
.
city
=
getCity
(
item
.
memResidenceProvince
,
item
.
memResidenceCity
)
});
}).
catch
(
e
=>
{
console
.
log
(
e
)
...
...
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