fix: 修复脚本依次执行问题
This commit is contained in:
@@ -51,8 +51,7 @@ export function runTaskOperationService() {
|
||||
['fzName', 'fg_trace.js'],
|
||||
['mtName', 'mt_trace.js'],
|
||||
['dyHotelName', 'dy_hotel_trace.js'],
|
||||
['dyHotSpringName', 'dy_hot_spring_trace.js'],
|
||||
['xcName', 'xc_trace.js'],
|
||||
['dyHotSpringName', 'dy_hot_spring_trace.js']
|
||||
]
|
||||
const scriptEntries = pairs.filter(([prop]) => roomType?.[prop])
|
||||
|
||||
@@ -75,9 +74,14 @@ export function runTaskOperationService() {
|
||||
dyHotelName: 'douyin',
|
||||
dyHotSpringName: 'douyin',
|
||||
}
|
||||
const defaultTabIndexMap: Record<string, number> = {
|
||||
fliggy: 0,
|
||||
meituan: 1,
|
||||
douyin: 2
|
||||
}
|
||||
const mappedName = channelNameMap[item.channel]
|
||||
const tabIndex = mappedName ? (openedTabIndexByChannelName.get(mappedName) ?? i) : i
|
||||
log.info(`Launching script for channel ${item.channel}: ${item.scriptPath}`)
|
||||
const tabIndex = mappedName ? (openedTabIndexByChannelName.get(mappedName) ?? defaultTabIndexMap[mappedName] ?? i) : i
|
||||
log.info(`Launching script for channel ${item.channel}: ${item.scriptPath} (tabIndex: ${tabIndex})`)
|
||||
const result = await executeScriptServiceInstance.executeScript(item.scriptPath, {
|
||||
roomType: roomType[item.channel],
|
||||
startTime: options.startTime,
|
||||
|
||||
Reference in New Issue
Block a user