mirror of
https://github.com/shanmiteko/LotteryAutoScript.git
synced 2026-06-04 21:01:17 +08:00
眼瞎了
This commit is contained in:
parent
062db159f7
commit
82163b38c1
@ -103,22 +103,41 @@ function parseDynamicCard(data) {
|
||||
/* 转发描述 */
|
||||
obj.description = '';
|
||||
let _total_len = 0;
|
||||
ditem?.modules?.module_dynamic?.desc?.rich_text_nodes.forEach(node => {
|
||||
if (node.type === 'RICH_TEXT_NODE_TYPE_AT') {
|
||||
obj.ctrl.push({
|
||||
data: node.rid,
|
||||
location: _total_len,
|
||||
length: node.text.length,
|
||||
type: 1
|
||||
});
|
||||
}
|
||||
/* 是否有官方抽奖 */
|
||||
if (node.type === 'RICH_TEXT_NODE_TYPE_LOTTERY') {
|
||||
obj.hasOfficialLottery = true;
|
||||
}
|
||||
obj.description += node.orig_text;
|
||||
_total_len += node.text.length;
|
||||
});
|
||||
if (Array.isArray(ditem?.orig?.modules?.module_dynamic?.desc?.rich_text_nodes)) {
|
||||
ditem?.modules?.module_dynamic?.desc?.rich_text_nodes.forEach(node => {
|
||||
if (node.type === 'RICH_TEXT_NODE_TYPE_AT') {
|
||||
obj.ctrl.push({
|
||||
data: node.rid,
|
||||
location: _total_len,
|
||||
length: node.text.length,
|
||||
type: 1
|
||||
});
|
||||
}
|
||||
/* 是否有官方抽奖 */
|
||||
if (node.type === 'RICH_TEXT_NODE_TYPE_LOTTERY') {
|
||||
obj.hasOfficialLottery = true;
|
||||
}
|
||||
obj.description += node.orig_text;
|
||||
_total_len += node.text.length;
|
||||
});
|
||||
} else {
|
||||
ditem?.modules?.module_dynamic?.major?.opus?.summary?.rich_text_nodes.forEach(node => {
|
||||
if (node.type === 'RICH_TEXT_NODE_TYPE_AT') {
|
||||
obj.ctrl.push({
|
||||
data: node.rid,
|
||||
location: _total_len,
|
||||
length: node.text.length,
|
||||
type: 1
|
||||
});
|
||||
}
|
||||
/* 是否有官方抽奖 */
|
||||
if (node.type === 'RICH_TEXT_NODE_TYPE_LOTTERY') {
|
||||
obj.hasOfficialLottery = true;
|
||||
}
|
||||
obj.description += node.orig_text;
|
||||
_total_len += node.text.length;
|
||||
});
|
||||
}
|
||||
/* 预约抽奖信息 */
|
||||
obj.reserve_id = ditem?.modules?.module_dynamic?.additional?.reserve?.rid || 0;
|
||||
obj.reserve_lottery_text = ditem?.modules?.module_dynamic?.additional?.reserve?.title || '信息丢失';
|
||||
@ -175,7 +194,7 @@ function parseDynamicCard(data) {
|
||||
obj.origin_description += node.orig_text;
|
||||
});
|
||||
} else {
|
||||
ditem?.modules?.module_dynamic?.major?.opus?.summary?.rich_text_nodes.forEach(node => {
|
||||
ditem?.orig.modules?.module_dynamic?.major?.opus?.summary?.rich_text_nodes.forEach(node => {
|
||||
/* 是否有官方抽奖 */
|
||||
if (node.type === 'RICH_TEXT_NODE_TYPE_LOTTERY') {
|
||||
obj.origin_hasOfficialLottery = true;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user