|
@@ -28,32 +28,32 @@
|
|
|
|
|
|
|
|
<!-- 前三名展示 -->
|
|
<!-- 前三名展示 -->
|
|
|
<view class="top-three-container" v-if="topThree.length >= 3">
|
|
<view class="top-three-container" v-if="topThree.length >= 3">
|
|
|
- <view class="top-three-item second">
|
|
|
|
|
|
|
+ <view class="top-three-item second" @click="goToDetail(topThree[1])">
|
|
|
<text class="rank-number">2</text>
|
|
<text class="rank-number">2</text>
|
|
|
<image class="avatar-large" :src="topThree[1].avatar_url || defaultAvatar" mode="aspectFill"></image>
|
|
<image class="avatar-large" :src="topThree[1].avatar_url || defaultAvatar" mode="aspectFill"></image>
|
|
|
<text class="matchmaker-name">{{ topThree[1].real_name }}</text>
|
|
<text class="matchmaker-name">{{ topThree[1].real_name }}</text>
|
|
|
<text class="success-count">成功人数: {{ topThree[1].success_couples || 0 }}</text>
|
|
<text class="success-count">成功人数: {{ topThree[1].success_couples || 0 }}</text>
|
|
|
- <view class="like-btn" :class="{ liked: topThree[1].hasLiked }" @click="handleLike(topThree[1])">
|
|
|
|
|
|
|
+ <view class="like-btn" :class="{ liked: topThree[1].hasLiked }" @click.stop="handleLike(topThree[1])">
|
|
|
{{ topThree[1].hasLiked ? '已点赞' : '点赞' }}
|
|
{{ topThree[1].hasLiked ? '已点赞' : '点赞' }}
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
- <view class="top-three-item first">
|
|
|
|
|
|
|
+ <view class="top-three-item first" @click="goToDetail(topThree[0])">
|
|
|
<text class="rank-number">1</text>
|
|
<text class="rank-number">1</text>
|
|
|
<image class="avatar-large" :src="topThree[0].avatar_url || defaultAvatar" mode="aspectFill"></image>
|
|
<image class="avatar-large" :src="topThree[0].avatar_url || defaultAvatar" mode="aspectFill"></image>
|
|
|
<text class="matchmaker-name">{{ topThree[0].real_name }}</text>
|
|
<text class="matchmaker-name">{{ topThree[0].real_name }}</text>
|
|
|
<text class="success-count">成功人数: {{ topThree[0].success_couples || 0 }}</text>
|
|
<text class="success-count">成功人数: {{ topThree[0].success_couples || 0 }}</text>
|
|
|
- <view class="like-btn" :class="{ liked: topThree[0].hasLiked }" @click="handleLike(topThree[0])">
|
|
|
|
|
|
|
+ <view class="like-btn" :class="{ liked: topThree[0].hasLiked }" @click.stop="handleLike(topThree[0])">
|
|
|
{{ topThree[0].hasLiked ? '已点赞' : '点赞' }}
|
|
{{ topThree[0].hasLiked ? '已点赞' : '点赞' }}
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
- <view class="top-three-item third">
|
|
|
|
|
|
|
+ <view class="top-three-item third" @click="goToDetail(topThree[2])">
|
|
|
<text class="rank-number">3</text>
|
|
<text class="rank-number">3</text>
|
|
|
<image class="avatar-large" :src="topThree[2].avatar_url || defaultAvatar" mode="aspectFill"></image>
|
|
<image class="avatar-large" :src="topThree[2].avatar_url || defaultAvatar" mode="aspectFill"></image>
|
|
|
<text class="matchmaker-name">{{ topThree[2].real_name }}</text>
|
|
<text class="matchmaker-name">{{ topThree[2].real_name }}</text>
|
|
|
<text class="success-count">成功人数: {{ topThree[2].success_couples || 0 }}</text>
|
|
<text class="success-count">成功人数: {{ topThree[2].success_couples || 0 }}</text>
|
|
|
- <view class="like-btn" :class="{ liked: topThree[2].hasLiked }" @click="handleLike(topThree[2])">
|
|
|
|
|
|
|
+ <view class="like-btn" :class="{ liked: topThree[2].hasLiked }" @click.stop="handleLike(topThree[2])">
|
|
|
{{ topThree[2].hasLiked ? '已点赞' : '点赞' }}
|
|
{{ topThree[2].hasLiked ? '已点赞' : '点赞' }}
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -61,7 +61,7 @@
|
|
|
|
|
|
|
|
<!-- 排行榜列表 -->
|
|
<!-- 排行榜列表 -->
|
|
|
<scroll-view scroll-y class="ranking-list">
|
|
<scroll-view scroll-y class="ranking-list">
|
|
|
- <view class="ranking-item" v-for="(item, index) in restList" :key="item.matchmaker_id">
|
|
|
|
|
|
|
+ <view class="ranking-item" v-for="(item, index) in restList" :key="item.matchmaker_id" @click="goToDetail(item)">
|
|
|
<text class="rank-number-normal">{{ index + 4 }}</text>
|
|
<text class="rank-number-normal">{{ index + 4 }}</text>
|
|
|
<image class="avatar-small" :src="item.avatar_url || defaultAvatar" mode="aspectFill"></image>
|
|
<image class="avatar-small" :src="item.avatar_url || defaultAvatar" mode="aspectFill"></image>
|
|
|
<view class="matchmaker-info">
|
|
<view class="matchmaker-info">
|
|
@@ -69,7 +69,7 @@
|
|
|
<text class="success-count-normal">成功: {{ item.success_couples || 0 }} | 点赞: {{ item.weeklyLikes || 0 }}</text>
|
|
<text class="success-count-normal">成功: {{ item.success_couples || 0 }} | 点赞: {{ item.weeklyLikes || 0 }}</text>
|
|
|
<text class="user-rating">等级: {{ item.level_name || '青铜红娘' }}</text>
|
|
<text class="user-rating">等级: {{ item.level_name || '青铜红娘' }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="like-btn-small" :class="{ liked: item.hasLiked }" @click="handleLike(item)">
|
|
|
|
|
|
|
+ <view class="like-btn-small" :class="{ liked: item.hasLiked }" @click.stop="handleLike(item)">
|
|
|
{{ item.hasLiked ? '已赞' : '点赞' }}
|
|
{{ item.hasLiked ? '已赞' : '点赞' }}
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -266,6 +266,15 @@ export default {
|
|
|
uni.redirectTo({
|
|
uni.redirectTo({
|
|
|
url: '/pages/matchmaker-workbench/mine'
|
|
url: '/pages/matchmaker-workbench/mine'
|
|
|
})
|
|
})
|
|
|
|
|
+ },
|
|
|
|
|
+ // 跳转到红娘详情
|
|
|
|
|
+ goToDetail(matchmaker) {
|
|
|
|
|
+ const id = matchmaker.matchmaker_id || matchmaker.matchmakerId
|
|
|
|
|
+ if (id) {
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: `/pages/matchmakers/detail?id=${id}`
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|