首页推荐
This commit is contained in:
parent
9b9e8f99b2
commit
24e5f5a010
|
|
@ -265,15 +265,19 @@
|
|||
// 今天看过标签
|
||||
.viewed-tag {
|
||||
position: absolute;
|
||||
top: 24rpx;
|
||||
right: 24rpx;
|
||||
background: #ff6b6b;
|
||||
padding: 8rpx 20rpx;
|
||||
border-radius: 20rpx;
|
||||
top: 0;
|
||||
right: 0;
|
||||
background: rgba(255, 180, 180, 0.65);
|
||||
padding: 15rpx 24rpx;
|
||||
border-radius: 0 24rpx 0 24rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
text {
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
font-size: 22rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ const ENV = {
|
|||
}
|
||||
|
||||
// 当前环境 - 开发时使用 development,打包时改为 production
|
||||
const CURRENT_ENV = 'production'
|
||||
const CURRENT_ENV = 'development'
|
||||
|
||||
// 导出配置
|
||||
export const config = {
|
||||
|
|
|
|||
|
|
@ -703,6 +703,11 @@ export default {
|
|||
* @param {number} userId - 用户 ID
|
||||
*/
|
||||
const handleUserClick = (userId) => {
|
||||
// 本地标记该用户为已查看,返回首页时显示"今天看过"标签
|
||||
const user = recommendList.value.find(item => item.userId === userId)
|
||||
if (user) {
|
||||
user.viewedToday = true
|
||||
}
|
||||
navigateToPage(`/pages/profile/detail?userId=${userId}`)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
<view class="popup-divider"></view>
|
||||
|
||||
<view class="popup-members-title">已绑定的用户({{ familyMembers.length }}/3)</view>
|
||||
<view class="popup-members-title">已绑定的用户({{ familyMembers.length }}/2)</view>
|
||||
|
||||
<view class="popup-members-list" v-if="familyMembers.length > 0">
|
||||
<view class="member-item" v-for="member in familyMembers" :key="member.bindId">
|
||||
|
|
@ -392,8 +392,8 @@ export default {
|
|||
return
|
||||
}
|
||||
|
||||
if (familyMembers.value.length >= 3) {
|
||||
uni.showToast({ title: '最多绑定3位家庭成员', icon: 'none' })
|
||||
if (familyMembers.value.length >= 2) {
|
||||
uni.showToast({ title: '最多绑定2位家庭成员', icon: 'none' })
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -76,6 +76,8 @@ public class UserController : ControllerBase
|
|||
if (currentUserId > 0 && currentUserId != request.UserId)
|
||||
{
|
||||
await _interactService.RecordViewAsync(currentUserId, request.UserId);
|
||||
// 标记推荐列表中该用户为已查看,首页显示"今天看过"标签
|
||||
await _recommendService.MarkAsViewedAsync(currentUserId, request.UserId);
|
||||
}
|
||||
|
||||
// 获取用户资料
|
||||
|
|
|
|||
|
|
@ -89,5 +89,5 @@ public interface IMemberService
|
|||
/// <summary>
|
||||
/// 家庭版最大绑定数量(不含主账号)
|
||||
/// </summary>
|
||||
const int MaxFamilyBindCount = 3;
|
||||
const int MaxFamilyBindCount = 2;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -357,7 +357,7 @@ public class RecommendService : IRecommendService
|
|||
0 => NormalUserRecommendCount, // 普通用户:10人
|
||||
1 => UnlimitedMemberRecommendCount, // 不限时会员:24人
|
||||
2 => _random.Next(SincereMemberMinRecommendCount, SincereMemberMaxRecommendCount + 1), // 诚意会员:24-29人
|
||||
3 => FamilyMemberRecommendCount, // 家庭版会员:24人
|
||||
3 => _random.Next(SincereMemberMinRecommendCount, SincereMemberMaxRecommendCount + 1), // 家庭版会员:24-29人
|
||||
4 => UnlimitedMemberRecommendCount, // 限时会员:24人
|
||||
_ => NormalUserRecommendCount
|
||||
};
|
||||
|
|
@ -373,7 +373,7 @@ public class RecommendService : IRecommendService
|
|||
0 => (NormalUserRecommendCount, NormalUserRecommendCount),
|
||||
1 => (UnlimitedMemberRecommendCount, UnlimitedMemberRecommendCount),
|
||||
2 => (SincereMemberMinRecommendCount, SincereMemberMaxRecommendCount),
|
||||
3 => (FamilyMemberRecommendCount, FamilyMemberRecommendCount),
|
||||
3 => (SincereMemberMinRecommendCount, SincereMemberMaxRecommendCount),
|
||||
4 => (UnlimitedMemberRecommendCount, UnlimitedMemberRecommendCount),
|
||||
_ => (NormalUserRecommendCount, NormalUserRecommendCount)
|
||||
};
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ public class FamilyBindLimitPropertyTests
|
|||
[Fact]
|
||||
public void FamilyBind_MaxBindCount_ShouldBeThree()
|
||||
{
|
||||
Assert.Equal(3, IMemberService.MaxFamilyBindCount);
|
||||
Assert.Equal(2, IMemberService.MaxFamilyBindCount);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user