1
This commit is contained in:
@@ -73,7 +73,7 @@ export default defineAppConfig({
|
|||||||
|
|
||||||
window: {
|
window: {
|
||||||
backgroundTextStyle: "light",
|
backgroundTextStyle: "light",
|
||||||
navigationBarBackgroundColor: "#fff",
|
navigationBarBackgroundColor: "#FAFAFA",
|
||||||
navigationBarTextStyle: "black",
|
navigationBarTextStyle: "black",
|
||||||
backgroundColor: "#FAFAFA",
|
backgroundColor: "#FAFAFA",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ const BackNavbar: React.FC<BackNavbarProps> = ({
|
|||||||
className = ''
|
className = ''
|
||||||
}) => {
|
}) => {
|
||||||
const userInfo = useUserInfo();
|
const userInfo = useUserInfo();
|
||||||
|
|
||||||
const { statusBarHeight, navBarHeight, totalHeight } = getNavbarHeight();
|
const { statusBarHeight, navBarHeight, totalHeight } = getNavbarHeight();
|
||||||
|
|
||||||
const handleBack = () => {
|
const handleBack = () => {
|
||||||
@@ -39,7 +40,7 @@ const BackNavbar: React.FC<BackNavbarProps> = ({
|
|||||||
style={{
|
style={{
|
||||||
paddingTop: `${statusBarHeight}px`,
|
paddingTop: `${statusBarHeight}px`,
|
||||||
height: `${totalHeight}px`,
|
height: `${totalHeight}px`,
|
||||||
backgroundColor: backgroundColor || "#ffffff"
|
backgroundColor: backgroundColor || "#fafafa"
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<View
|
<View
|
||||||
@@ -55,7 +56,7 @@ const BackNavbar: React.FC<BackNavbarProps> = ({
|
|||||||
{showAvatar && (
|
{showAvatar && (
|
||||||
<Image
|
<Image
|
||||||
className="navbar-avatar"
|
className="navbar-avatar"
|
||||||
src={userInfo?.userInfo?.avatar_url}
|
src={userInfo?.avatar_url || require('@/static/userInfo/default_avatar.svg')}
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -10,65 +10,10 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
background: #FFFFFF;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
// 顶部导航栏
|
|
||||||
.navbar {
|
|
||||||
height: 100px;
|
|
||||||
background: #FFFFFF;
|
|
||||||
flex-shrink: 0;
|
|
||||||
z-index: 100;
|
|
||||||
|
|
||||||
.navbar-content {
|
|
||||||
height: 56px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding: 0 15px;
|
|
||||||
margin-top: 44px;
|
|
||||||
gap: 12px;
|
|
||||||
|
|
||||||
.back-button {
|
|
||||||
width: 24px;
|
|
||||||
height: 24px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
cursor: pointer;
|
|
||||||
flex-shrink: 0;
|
|
||||||
margin-top: 2px;
|
|
||||||
|
|
||||||
.back-icon {
|
|
||||||
width: 10px;
|
|
||||||
height: 10px;
|
|
||||||
position: relative;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
|
|
||||||
&::before {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
width: 10px;
|
|
||||||
height: 10px;
|
|
||||||
border-left: 2px solid #000000;
|
|
||||||
border-bottom: 2px solid #000000;
|
|
||||||
transform: rotate(45deg) translateY(-1px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar-title {
|
|
||||||
font-family: 'PingFang SC';
|
|
||||||
font-weight: 600;
|
|
||||||
font-size: 20px;
|
|
||||||
line-height: 1.4;
|
|
||||||
letter-spacing: 0.019em;
|
|
||||||
color: #000000;
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 评论列表滚动区域
|
// 评论列表滚动区域
|
||||||
.comment-scroll {
|
.comment-scroll {
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
gap: 20px;
|
gap: 20px;
|
||||||
padding: 6px 24px;
|
padding: 6px 24px;
|
||||||
background: #ffffff;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
height: 124px;
|
height: 124px;
|
||||||
|
|
||||||
@@ -83,8 +82,6 @@
|
|||||||
.message-scroll {
|
.message-scroll {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: #ffffff;
|
|
||||||
|
|
||||||
.message-cards {
|
.message-cards {
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -143,6 +143,7 @@ const Message = () => {
|
|||||||
<Image
|
<Image
|
||||||
className="tab-icon"
|
className="tab-icon"
|
||||||
src={require('@/static/message/comment-icon.svg')}
|
src={require('@/static/message/comment-icon.svg')}
|
||||||
|
mode="aspectFit"
|
||||||
/>
|
/>
|
||||||
<Text className="tab-text">评论和回复</Text>
|
<Text className="tab-text">评论和回复</Text>
|
||||||
</View>
|
</View>
|
||||||
@@ -153,6 +154,7 @@ const Message = () => {
|
|||||||
<Image
|
<Image
|
||||||
className="tab-icon"
|
className="tab-icon"
|
||||||
src={require('@/static/message/follow-icon.svg')}
|
src={require('@/static/message/follow-icon.svg')}
|
||||||
|
mode="aspectFit"
|
||||||
/>
|
/>
|
||||||
<Text className="tab-text">新增关注</Text>
|
<Text className="tab-text">新增关注</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ const NewFollow = () => {
|
|||||||
try {
|
try {
|
||||||
const res = await FollowService.get_new_fans_list(1, 20);
|
const res = await FollowService.get_new_fans_list(1, 20);
|
||||||
|
|
||||||
if (res.list) {
|
if (res.list && res.list.length > 0) {
|
||||||
// 映射数据
|
// 映射数据
|
||||||
const mappedList = res.list.map((item: any) => ({
|
const mappedList = res.list.map((item: any) => ({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
@@ -51,6 +51,9 @@ const NewFollow = () => {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
setFollowList(mappedList);
|
setFollowList(mappedList);
|
||||||
|
} else {
|
||||||
|
// 如果没有数据,设置为空数组以显示空状态
|
||||||
|
setFollowList([]);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
Taro.showToast({
|
Taro.showToast({
|
||||||
@@ -131,7 +134,7 @@ const NewFollow = () => {
|
|||||||
try {
|
try {
|
||||||
const res = await FollowService.get_new_fans_list(1, 20);
|
const res = await FollowService.get_new_fans_list(1, 20);
|
||||||
|
|
||||||
if (res.list) {
|
if (res.list && res.list.length > 0) {
|
||||||
const mappedList = res.list.map((item: any) => ({
|
const mappedList = res.list.map((item: any) => ({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
user_id: item.id,
|
user_id: item.id,
|
||||||
@@ -145,6 +148,9 @@ const NewFollow = () => {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
setFollowList(mappedList);
|
setFollowList(mappedList);
|
||||||
|
} else {
|
||||||
|
// 如果没有数据,设置为空数组以显示空状态
|
||||||
|
setFollowList([]);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
Taro.showToast({
|
Taro.showToast({
|
||||||
|
|||||||
Reference in New Issue
Block a user