Files
云端客 ecc2de529a feat(ActivitySwitchNotice): 添加新活动通知功能 (#2831)
* feat(ActivitySwitchNotice): 添加新活动通知功能

- 新增配置文件路径定义用于存储活动数据
- 在activityMain函数中添加newActivityNotice参数控制新活动通知
- 读取历史活动配置文件并转换为Set进行对比
- 创建activityNameSet记录当前页面活动名称
- 修复OCR键值获取中的参数传递格式问题
- 实现新活动检测逻辑并与历史数据进行比较
- 添加新活动通知发送功能包括UID识别
- 更新版本号从0.0.8到0.1.0并在README中记录变更
- 在设置界面添加新活动通知的启用开关选项

* feat(ActivitySwitchNotice): 更新活动主函数调用以支持新活动通知设置

- 修改 activityMain 函数调用,传入 settings.newActivityNotice 参数
- 实现新活动通知功能的配置支持

* feat(ActivitySwitchNotice): 优化活动通知逻辑并修复数据处理问题

- 在遍历活动列表时同步更新 activityNameSet 集合
- 注释掉冗余的数组合并操作避免重复数据处理
- 重构新增活动检测逻辑提高代码可读性
- 优化通知发送后的配置文件更新时机确保数据一致性
- 改进错误处理机制并添加调试日志
- 修复当无新增活动时不执行通知发送的逻辑分支

* feat(ActivitySwitchNotice): 实现基于UID的个性化活动数据管理

- 添加UID识别功能,通过uidUtil.ocrUID()获取用户唯一标识
- 修改活动数据结构,将全局活动集合改为按UID分类存储
- 实现用户特定活动过滤,只处理当前UID相关的活动数据
- 更新活动配置文件写入逻辑,支持多用户数据分离存储
- 优化新增活动检测机制,基于用户历史活动进行精确匹配
- 重构活动数据序列化处理,确保数据格式兼容性和持久化
2026-02-02 07:27:12 +08:00

141 lines
3.7 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[
{
"name": "toMainUi",
"type": "checkbox",
"label": "启用先返回主界面后执行切换",
"default": true
},
{
"name": "noticeType",
"type": "select",
"label": "通知模式(默认BGI通知-使用独立通知需要开启JS HTTP权限)",
"options": [
"BGI通知",
"独立通知",
"独立通知和BGI通知"
],
"default": "BGI通知"
},
{
"type": "separator"
},
{
"name": "newActivityNotice",
"type": "checkbox",
"label": "启用新活动通知",
"default": true
},
{
"label": "地图识别任务提醒",
"type": "multi-checkbox",
"name": "mapMissionKeys",
"options": [
"伴月纪闻任务",
"探索派遣奖励",
"豪斗旅纪奖励",
"每日委托奖励"
],
"default": [
"伴月纪闻任务",
"探索派遣奖励",
"每日委托奖励"]
},
{
"type": "separator"
},
{
"name": "relationship",
"type": "checkbox",
"label": "剩余时间,白名单 启用`和`关系(默认`或`关系)",
"default": false
},
{
"name": "whiteActivityNameList",
"type": "input-text",
"label": "白名单活动名称(使用|分割)<可不填 默认推送所有有剩余时间的活动>"
},
{
"name": "blackActivity",
"type": "input-text",
"label": "黑名单活动名称(使用|分割)<可不填,默认没有不推送的活动>(新增语法指定条件的黑名单活动1-条件1,条件2|活动2-条件1)"
},
{
"name": "notifyHoursThreshold",
"type": "input-text",
"label": "通知剩余时间阈值<单位:小时>(默认 8760小时=365天)",
"default": "8760"
},
{
"name": "activityKey",
"type": "input-text",
"label": "打开活动页面按键(不填默认F5)",
"default": "F5"
},
{
"type": "separator"
},
{
"name": "campaignAreaReminderDay",
"type": "select",
"label": "周本提醒日(0-6,0=周日,1=周一,2=周二,3=周三,4=周四,5=周五,6=周六)",
"options": [
"0",
"1",
"2",
"3",
"4",
"5",
"6"
],
"default": "0"
},
{
"name": "campaignAreaKey",
"type": "input-text",
"label": "打开冒险之证按键(不填默认F1)",
"default": "F1"
},
{
"type": "separator"
},
{
"name": "ws_proxy_url",
"type": "input-text",
"label": "独立通知配置:\n==============================\nWebSocketProxyUrl(列:http://127.0.0.1:8081/ws-proxy/message/send)",
"default": "http://127.0.0.1:8081/ws-proxy/message/send"
},
{
"name": "ws_url",
"type": "input-text",
"label": "WebSocket客户端 Url(列:ws://127.0.0.1:8080)",
"default": "ws://127.0.0.1:8080/"
},
{
"name": "ws_token",
"type": "input-text",
"label": "WebSocket客户端 token(没有可不填)",
"default": ""
},
{
"name": "action",
"type": "select",
"label": "发送类型",
"options": [
"私聊",
"群聊"
],
"default": "私聊"
},
{
"name": "send_id",
"type": "input-text",
"label": "(发送id 群号|QQ号 对应发送类型)",
"default": ""
},
{
"name": "at_list",
"type": "input-text",
"label": "@某人列表使用,隔开(QQ号)",
"default": ""
}
]