hookehuyr

feat(弹幕组件): 重构弹幕组件并添加API数据支持

重构弹幕组件逻辑,移除mock数据改用API获取真实弹幕数据
优化弹幕动画逻辑和轨道管理,提高弹幕显示效果
调整弹幕样式和间距,增强用户体验
1 /* 1 /*
2 * @Date: 2023-12-22 10:29:37 2 * @Date: 2023-12-22 10:29:37
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2025-09-18 17:23:51 4 + * @LastEditTime: 2025-10-28 17:03:04
5 * @FilePath: /lls_program/src/api/points.js 5 * @FilePath: /lls_program/src/api/points.js
6 * @Description: 文件描述 6 * @Description: 文件描述
7 */ 7 */
...@@ -72,5 +72,10 @@ export const getPointListAPI = (params) => fn(fetch.get(Api.POINT_LIST, params)) ...@@ -72,5 +72,10 @@ export const getPointListAPI = (params) => fn(fetch.get(Api.POINT_LIST, params))
72 * @returns {number} response.data.current_family[].step - 步数 72 * @returns {number} response.data.current_family[].step - 步数
73 * @returns {number} response.data.current_family[].rank - 排名 73 * @returns {number} response.data.current_family[].rank - 排名
74 * @returns {number} response.data.current_family[].country - 区县 74 * @returns {number} response.data.current_family[].country - 区县
75 + * @returns {Array} response.data.bullet_families[] - 弹幕家庭列表
76 + * @returns {string} response.data.bullet_families[].id - 家庭ID
77 + * @returns {string} response.data.bullet_families[].name - 家庭名称
78 + * @returns {string} response.data.bullet_families[].avatar_url - 头像URL
79 + * @returns {string} response.data.bullet_families[].note - 家庭介绍
75 */ 80 */
76 export const getStepLeaderboardAPI = (params) => fn(fetch.get(Api.STEP_LEADERBOARD, params)); 81 export const getStepLeaderboardAPI = (params) => fn(fetch.get(Api.STEP_LEADERBOARD, params));
......
This diff is collapsed. Click to expand it.
1 <!-- 1 <!--
2 * @Date: 2025-01-09 00:00:00 2 * @Date: 2025-01-09 00:00:00
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2025-10-28 16:24:46 4 + * @LastEditTime: 2025-10-28 16:58:49
5 * @FilePath: /lls_program/src/components/RankingCard.vue 5 * @FilePath: /lls_program/src/components/RankingCard.vue
6 * @Description: 排行榜卡片组件 6 * @Description: 排行榜卡片组件
7 --> 7 -->
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
43 <!-- 排行榜日期 --> 43 <!-- 排行榜日期 -->
44 <view class="rank-date relative"> 44 <view class="rank-date relative">
45 <!-- <view class="flex items-center justify-center"><text class="mr-2">截止昨日</text>{{ currentDate }}<text v-if="activeTab !== 'shanghai'" class="ml-2">排名</text><IconFont name="ask" size="16" class="ml-2" @click="handleRankAskClick"></IconFont></view> --> 45 <!-- <view class="flex items-center justify-center"><text class="mr-2">截止昨日</text>{{ currentDate }}<text v-if="activeTab !== 'shanghai'" class="ml-2">排名</text><IconFont name="ask" size="16" class="ml-2" @click="handleRankAskClick"></IconFont></view> -->
46 - <view class="flex items-center justify-center"><text class="mr-2">截止昨日</text>{{ currentDate }}<text class="ml-2">排名</text><IconFont name="ask" size="16" class="ml-2" @click="handleRankAskClick"></IconFont></view> 46 + <view class="flex items-center justify-center"><text class="mr-2">截止昨日</text>{{ currentDate }}<text class="ml-2">排名</text><IconFont v-if="activeTab !== 'support'" name="ask" size="16" class="ml-2" @click="handleRankAskClick"></IconFont></view>
47 <view v-if="activeTab === 'support'" class="absolute font-bold text-white bg-orange-500 top-0 rounded-full px-4 py-1" style="right: -30rpx; top: -5rpx; font-size: 23rpx; z-index: 999;" @tap="joinOrganization">助力码</view> 47 <view v-if="activeTab === 'support'" class="absolute font-bold text-white bg-orange-500 top-0 rounded-full px-4 py-1" style="right: -30rpx; top: -5rpx; font-size: 23rpx; z-index: 999;" @tap="joinOrganization">助力码</view>
48 </view> 48 </view>
49 49
...@@ -532,11 +532,11 @@ const danmuRef = ref(null) ...@@ -532,11 +532,11 @@ const danmuRef = ref(null)
532 // 处理弹幕点击事件 532 // 处理弹幕点击事件
533 const handleDanmuClick = (familyData) => { 533 const handleDanmuClick = (familyData) => {
534 console.log('弹幕点击:', familyData) 534 console.log('弹幕点击:', familyData)
535 - Taro.showToast({ 535 + // Taro.showToast({
536 - title: `点击了${familyData.familyName}`, 536 + // title: `点击了${familyData.familyName}`,
537 - icon: 'none', 537 + // icon: 'none',
538 - duration: 2000 538 + // duration: 2000
539 - }) 539 + // })
540 } 540 }
541 541
542 // 处理弹幕悬停事件 542 // 处理弹幕悬停事件
......
1 <!-- 1 <!--
2 * @Date: 2025-09-01 13:07:52 2 * @Date: 2025-09-01 13:07:52
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2025-10-28 16:04:30 4 + * @LastEditTime: 2025-10-28 16:36:47
5 * @FilePath: /lls_program/src/pages/FamilyRank/index.vue 5 * @FilePath: /lls_program/src/pages/FamilyRank/index.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -286,11 +286,11 @@ const danmuRef = ref(null) ...@@ -286,11 +286,11 @@ const danmuRef = ref(null)
286 // 处理弹幕点击事件 286 // 处理弹幕点击事件
287 const handleDanmuClick = (familyData) => { 287 const handleDanmuClick = (familyData) => {
288 console.log('弹幕点击:', familyData) 288 console.log('弹幕点击:', familyData)
289 - Taro.showToast({ 289 + // Taro.showToast({
290 - title: `点击了${familyData.familyName}`, 290 + // title: `点击了${familyData.familyName}`,
291 - icon: 'none', 291 + // icon: 'none',
292 - duration: 2000 292 + // duration: 2000
293 - }) 293 + // })
294 } 294 }
295 295
296 // 处理弹幕悬停事件 296 // 处理弹幕悬停事件
......