需新增:添加好友页面,优化各模块页面

This commit is contained in:
cbb
2026-01-22 17:04:43 +08:00
parent 57fec30165
commit 571e91b01c
17 changed files with 223 additions and 87 deletions

View File

@@ -16,12 +16,12 @@
const { showDialog, showToast } = useUI()
const placeholderStyle = `font-family: PingFang SC, PingFang SC;
font-weight: 500;
font-size: 28rpx;
color: #999999;
line-height: 40rpx;
font-style: normal;
text-transform: none;`
font-weight: 500;
font-size: 28rpx;
color: #999999;
line-height: 40rpx;
font-style: normal;
text-transform: none;`
const MAX_SCROLL = 446
const paging = ref(null)
@@ -39,6 +39,7 @@ text-transform: none;`
})
const contentData = ref('')
const inputId = ref('')
const isType = ref('')
const onScroll = e => {
cbNavBar.value?.updateScroll(e.detail.scrollTop)
@@ -56,7 +57,7 @@ text-transform: none;`
const res = await getUserMomentsList({
pageNum,
pageSize,
targetUserId: userInfo.value.userId
targetUserId: isType.value == 1 ? userInfo.value.userId : ''
})
const list = res.rows.map(item => {
return {
@@ -120,7 +121,10 @@ text-transform: none;`
onShow(() => {
getData(1, formData.pageSize)
})
onLoad(async () => {})
onLoad(async e => {
isType.value = e?.type || ''
})
</script>
<template>
@@ -187,11 +191,18 @@ text-transform: none;`
<view v-if="!listLoading" class="dynamic-list" @click="closeComment">
<view v-for="item in dataList" :key="item.id" class="list">
<image
v-if="item.avatar"
:src="item.avatar"
lazy-load
mode="aspectFill"
class="avatar"
></image>
<view v-else class="avatar">
<uni-icons
type="contact-filled"
class="avatar-icon"
></uni-icons>
</view>
<view class="content">
<text class="name">{{ item.userName }}</text>
<text class="text">{{ item.content }}</text>
@@ -235,8 +246,8 @@ text-transform: none;`
color="#747474"
@click.stop="inputId = item.id"
></uni-icons>
<uni-icons
v-if="item.userId === userInfo.userId"
type="trash"
size="20"
color="#d95d5d"

View File

@@ -87,16 +87,28 @@
mode="heightFix"
class="grade"
></image>
<text v-else class="item-text">1</text>
<text v-else class="item-text">{{ index + 1 }}</text>
</view>
</uni-col>
<uni-col :span="12">
<view class="table-name">
<image
:src="item.avatar || '/static/images/public/random2.png'"
v-if="item.avatar"
:src="item.avatar"
mode="aspectFill"
class="left-icon"
></image>
<view
v-else
style="
display: flex;
align-items: center;
justify-content: center;
"
class="left-icon"
>
<uni-icons type="contact-filled" size="90rpx"></uni-icons>
</view>
<view class="name">
<text>{{ item.userName }}</text>
<text>{{ item.mobile }}</text>
@@ -119,7 +131,9 @@
@import './styles/index.scss';
.table-box {
font-family: PingFang SC, PingFang SC;
font-family:
PingFang SC,
PingFang SC;
font-style: normal;
text-transform: none;
.grade-box {

View File

@@ -15,7 +15,9 @@
align-items: flex-start;
.name {
margin-top: 30rpx;
font-family: PingFang SC, PingFang SC;
font-family:
PingFang SC,
PingFang SC;
font-weight: 600;
font-size: 32rpx;
color: #ffffff;
@@ -44,10 +46,18 @@
border-radius: 96rpx;
flex-shrink: 0;
margin-right: 32rpx;
display: flex;
align-items: center;
justify-content: center;
.avatar-icon {
font-size: 130rpx !important;
}
}
.content {
width: 100%;
font-family: PingFang SC, PingFang SC;
font-family:
PingFang SC,
PingFang SC;
text-align: left;
font-style: normal;
text-transform: none;