Skip to content
Merged

7.3.4 #648

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ node_modules
# MacOS
.DS_Store

# Editor directories and files
# Editor/Agent directories and files
.vscode/*
!.vscode/extensions.json
.idea
Expand All @@ -13,6 +13,8 @@ node_modules
.agents
.qoder
opencode.json
artifacts
.dsh

# Notes
notes
Expand Down
4 changes: 4 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ npm run preview # 打开提供编译产物安装链接的本地预览网页
- **默认模块**(`src/modules/default/`):做准备工作,如基础数据获取,先于大多数功能模块加载
- **功能模块**:实现具体业务逻辑,如完成每日任务

## 内部库

位于 `src/library/`,每个子目录对应一个库,均通过 `index.ts` 默认导出。

## 配置持久化

`src/library/storage/` 通过 `GM_setValue`/`GM_getValue` 存取配置。
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

## [Unreleased]

## [7.3.4] - 2026-8-25

### 新增

- 新增【亲密喂养】模块,自动完成亲密喂养活动(B站超能粉丝节的养猫活动)的选猫,每日签到,喂猫粮和撸猫。支持黑白名单。
- 优化【屏蔽挂机检测】模块,使其尽早运行;增加页面焦点状态属性的修改

### 调整

- 亲密度储蓄提示日志的等级提升为警告(`console.warn`)

## [7.3.3] - 2026-7-25

### 新增
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bilibili-live-tasks-helper",
"private": true,
"version": "7.3.3",
"version": "7.3.4",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
28 changes: 27 additions & 1 deletion src/components/LiveTasks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ interface MedalInfoRow {
roomid: number
}

type MedalTaskKey = 'light' | 'like' | 'danmu' | 'watch'
type MedalTaskKey = 'light' | 'like' | 'danmu' | 'watch' | 'miaoZai'
type DanmuTaskKey = 'light' | 'danmu'

const TASK_LABELS: Record<MedalTaskKey, string> = {
light: '点亮熄灭勋章',
like: '点赞',
danmu: '发弹幕',
watch: '观看直播',
miaoZai: '亲密喂养',
}

const moduleStore = useModuleStore()
Expand Down Expand Up @@ -399,6 +400,31 @@ function handleRowClick(row: MedalInfoRow) {

<el-divider />

<!-- 亲密喂养(养猫活动) -->
<el-row>
<el-space wrap :size="[8, 0]">
<el-switch v-model="config.medalTasks.miaoZai.enabled" active-text="亲密喂养" />
<Info :item="helpInfo.DailyTasks.LiveTasks.medalTasks.miaoZai" />
<TaskStatus :status="status.medalTasks.miaoZai" @click="reset.medalTasks.miaoZai" />
</el-space>
</el-row>
<el-row>
<el-space wrap :size="[8, 0]">
<el-switch
v-model="config.medalTasks.miaoZai.isWhiteList"
active-text="白名单"
inactive-text="黑名单"
@change="(val) => !val && (uiStore.uiConfig.medalInfoPanelIsSortMode.miaoZai = false)"
/>
<el-button type="primary" size="small" :icon="Edit" @click="handleEditList('miaoZai')"
>编辑名单
</el-button>
<Info :item="helpInfo.DailyTasks.LiveTasks.medalTasks.list" />
</el-space>
</el-row>

<el-divider />

<!-- 说明 -->
<el-row>
<el-text>粉丝团任务相关信息可在</el-text>
Expand Down
23 changes: 23 additions & 0 deletions src/library/bili-api/api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,29 @@ interface BapiMethods {
supported_drms?: string,
web_location?: string,
) => Promise<Live.GetRoomPlayInfo>
Q3FansS1MiaoZaiHome: (
room_id: number,
ruid: number,
target_uid?: number | string,
act_id?: number,
web_location?: string,
) => Promise<Live.Q3FansS1MiaoZaiHome>
Q3FansS1MiaoZaiSelectCat: (
ruid: number,
cat_type?: number,
act_id?: number,
) => Promise<Live.Q3FansS1MiaoZaiSelectCat>
Q3FansS1MiaoZaiSignIn: (ruid: number, act_id?: number) => Promise<Live.Q3FansS1MiaoZaiSignIn>
Q3FansS1MiaoZaiPetCat: (
ruid: number,
target_uid?: number,
act_id?: number,
) => Promise<Live.Q3FansS1MiaoZaiPetCat>
Q3FansS1MiaoZaiFeedCat: (
ruid: number,
target_uid?: number,
act_id?: number,
) => Promise<Live.Q3FansS1MiaoZaiFeedCat>
}
liveTrace: {
E: (
Expand Down
126 changes: 126 additions & 0 deletions src/library/bili-api/data.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,27 @@ declare namespace LiveData {
light_source: number
free_intimacy: number
reach_free_intimacy_limit: boolean
intimacy_journey_info: IntimacyJourneyInfo
}

interface IntimacyJourneyInfo {
enable: boolean
title_icon: string
completed_icon: string
incomplete_icon: string
gift_icon: string
badge_icon_intimacy: string
badge_icon_day: string
badge_icon_hour: string
total_days: number
completed_days: number
has_task_intimacy_journey_gift: boolean
task_intimacy_journey_gift_expire_ts: number
gift_intimacy: number
gift_id: number
background_color: string
font_color: string
gift_multiplier: string
}

interface TaskInfo {
Expand Down Expand Up @@ -1339,6 +1360,111 @@ declare namespace LiveData {
skip_frame_threshold: number
}
}

namespace Q3FansS1MiaoZai {
interface HomeData {
current_time: number
start_time: number
end_time: number
activity_status: number
/** 猫主人的 uid */
target_uid: number
fan_relation_status: number
cat_selected: boolean
cat_info: CatInfo | null
food_info: FoodInfo | null
cat_home_level: number
daily_tasks: DailyTask[] | null
level_configs: LevelConfig[] | null
food_level_configs: FoodLevelConfig[] | null
gift_open_time: number
gift_claim_status: number
gift_by_cat_level: GiftByCatLevel[] | null
medal_name: string
gift_intimacy: number
room_type: number
can_intimacy_journey: boolean
}

interface ActionData {
/** code: 0 表示成功 */
code: number
msg: string
cat_level: number
growth: number
food_balance: number
level_up_list: LevelUpInfo[] | null
growth_delta: number
cat_type: number
}

interface CatInfo {
cat_type: number
cat_name: string
growth: number
level: number
level_name: string
level_start_growth: number
next_level_growth: number
}

interface FoodInfo {
level: number
balance: number
growth_per_food: number
}

interface DailyTask {
task_key: string
progress: number
level_list: TaskLevel[]
}

interface TaskLevel {
level: number
target: number
reward_food: number
task_status: number
}

interface LevelConfig {
level: number
level_name: string
growth_threshold: number
rewards: Reward[] | null
}

interface FoodLevelConfig {
level: number
name: string
growth_per_food: number
price: number
can_upgrade: boolean
growth_boost_text: string
}

interface GiftByCatLevel {
level: number
name: string
desc: string
low: number
high: number
}

interface LevelUpInfo {
level: number
level_name: string
title: string
rewards: Reward[] | null
}

interface Reward {
reward_type: string
name: string
desc: string
image: string
}
}
}

declare namespace LiveTraceData {
Expand Down
98 changes: 98 additions & 0 deletions src/library/bili-api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,104 @@ const BAPI: BapiMethods = {
}),
)
},
/**
* 获取超能粉丝节——粉丝福利——亲密喂养(养猫活动)主页数据
*/
Q3FansS1MiaoZaiHome: (
room_id,
ruid,
target_uid = '',
act_id = 110505,
web_location = '445.25',
) => {
const bili_jct = useBiliStore().cookies!.bili_jct
return request.live.get(
'/xlive/custom-activity-interface/activities2026/Q3FansS1MiaoZaiHome',
{
act_id,
csrf: bili_jct,
room_id,
ruid, // 主播 uid
target_uid, // 如果为空字符串,默认为当前用户的 uid
web_location,
},
)
},
/**
* 亲密喂养:选择一只要养的猫
*/
Q3FansS1MiaoZaiSelectCat: (ruid, cat_type = 2, act_id = 110505) => {
const bili_jct = useBiliStore().cookies!.bili_jct
return request.live.post(
'/xlive/custom-activity-interface/activities2026/Q3FansS1MiaoZaiSelectCat',
JSON.stringify({
act_id,
ruid: String(ruid), // 主播 uid
cat_type,
}),
{
params: { csrf: bili_jct },
headers: { 'Content-Type': 'application/json' },
},
)
},
/**
* 亲密喂养:每日签到,获得猫粮
*/
Q3FansS1MiaoZaiSignIn: (ruid, act_id = 110505) => {
const bili_jct = useBiliStore().cookies!.bili_jct
return request.live.post(
'/xlive/custom-activity-interface/activities2026/Q3FansS1MiaoZaiSignIn',
JSON.stringify({
act_id,
ruid: String(ruid), // 主播 uid
}),
{
params: { csrf: bili_jct },
headers: { 'Content-Type': 'application/json' },
},
)
},
/**
* 亲密喂养:撸猫(摸猫),有概率获得成长值
*/
Q3FansS1MiaoZaiPetCat: (ruid, target_uid, act_id = 110505) => {
const biliStore = useBiliStore()
const bili_jct = biliStore.cookies!.bili_jct
const uid = target_uid ?? biliStore.BilibiliLive!.UID
return request.live.post(
'/xlive/custom-activity-interface/activities2026/Q3FansS1MiaoZaiPetCat',
JSON.stringify({
act_id,
ruid: String(ruid), // 主播 uid
target_uid: String(uid),
}),
{
params: { csrf: bili_jct },
headers: { 'Content-Type': 'application/json' },
},
)
},
/**
* 亲密喂养:喂猫,消耗一份猫粮获得成长值
*/
Q3FansS1MiaoZaiFeedCat: (ruid, target_uid, act_id = 110505) => {
const biliStore = useBiliStore()
const bili_jct = biliStore.cookies!.bili_jct
const uid = target_uid ?? biliStore.BilibiliLive!.UID
return request.live.post(
'/xlive/custom-activity-interface/activities2026/Q3FansS1MiaoZaiFeedCat',
JSON.stringify({
act_id,
ruid: String(ruid), // 主播 uid
target_uid: String(uid),
}),
{
params: { csrf: bili_jct },
headers: { 'Content-Type': 'application/json' },
},
)
},
},
liveTrace: {
E: (id, device, ruid, is_patch = 0, heart_beat = [], web_location = '444.8') => {
Expand Down
Loading