Merge branch 'feature/dsw' of https://git.nianxx.cn/duanshuwen/zn-ai into feature/dsw
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,
|
||||
|
||||
@@ -24,6 +24,7 @@ const isSameOrigin = (currentUrl, targetUrl) => {
|
||||
const current = normalizeUrl(currentUrl);
|
||||
const target = normalizeUrl(targetUrl);
|
||||
if (!current || !target) return false;
|
||||
|
||||
return current.origin === target.origin;
|
||||
};
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 245 KiB |
@@ -220,5 +220,6 @@ const navigateToRoomStatusManagement = async (page) => {
|
||||
process.exitCode = 1;
|
||||
} finally {
|
||||
await safeDisconnectBrowser(browser);
|
||||
process.exit(process.exitCode || 0);
|
||||
}
|
||||
})();
|
||||
|
||||
@@ -220,5 +220,6 @@ const navigateToRoomStatusManagement = async (page) => {
|
||||
process.exitCode = 1;
|
||||
} finally {
|
||||
await safeDisconnectBrowser(browser);
|
||||
process.exit(process.exitCode || 0);
|
||||
}
|
||||
})();
|
||||
|
||||
@@ -169,5 +169,6 @@ const toggleRoomByDateIndex = async (container, { roomType, dateIndex, operation
|
||||
process.exitCode = 1;
|
||||
} finally {
|
||||
await safeDisconnectBrowser(browser);
|
||||
process.exit(process.exitCode || 0);
|
||||
}
|
||||
})();
|
||||
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
|
Before Width: | Height: | Size: 74 KiB |
@@ -232,5 +232,6 @@ const toggleRoom = async (page, { roomType, mmdd, operation }) => {
|
||||
process.exitCode = 1;
|
||||
} finally {
|
||||
await safeDisconnectBrowser(browser);
|
||||
process.exit(process.exitCode || 0);
|
||||
}
|
||||
})();
|
||||
|
||||
@@ -128,5 +128,6 @@ const isBlankLikePage = (url) => {
|
||||
}
|
||||
} catch {}
|
||||
}
|
||||
process.exit(process.exitCode || 0);
|
||||
}
|
||||
})();
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
import log from 'electron-log';
|
||||
|
||||
log.info('xc_trace.mjs placeholder: not implemented');
|
||||
process.exit(0);
|
||||
@@ -46,6 +46,6 @@ export async function launchLocalChrome() {
|
||||
// 延迟几秒等浏览器起来
|
||||
setTimeout(() => {
|
||||
resolve(0);
|
||||
}, 3000); // 延迟3秒
|
||||
}, 1000); // 延迟1秒
|
||||
});
|
||||
}
|
||||
|
||||
@@ -31,6 +31,6 @@ export function createLogo() {
|
||||
if (logo != null) {
|
||||
return logo;
|
||||
}
|
||||
logo = path.join(__dirname, 'logo.ico');
|
||||
logo = path.join(__dirname, '/public/logo.ico');
|
||||
return logo;
|
||||
}
|
||||
|
||||
@@ -8,23 +8,23 @@
|
||||
<native-tooltip :content="t('window.minimize')">
|
||||
<button v-show="isMinimizable" class="flex items-center justify-center cursor-pointer w-[40px] h-[40px]"
|
||||
@click="minimizeWindow">
|
||||
<iconify-icon icon="material-symbols:check-indeterminate-small" color="#525866" :width="btnSize"
|
||||
<iconify-icon icon="material-symbols:check-indeterminate-small" :color="color" :width="btnSize"
|
||||
:height="btnSize" />
|
||||
</button>
|
||||
</native-tooltip>
|
||||
<native-tooltip :content="isMaximized ? t('window.restore') : t('window.maximize')">
|
||||
<button v-show="isMaximizable" class="flex items-center justify-center cursor-pointer w-[40px] h-[40px]"
|
||||
@click="maximizeWindow">
|
||||
<iconify-icon icon="material-symbols:chrome-maximize-outline-sharp" color="#525866" :width="btnSize"
|
||||
<iconify-icon icon="material-symbols:chrome-maximize-outline-sharp" :color="color" :width="btnSize"
|
||||
:height="btnSize" v-show="!isMaximized" />
|
||||
<iconify-icon icon="material-symbols:chrome-restore-outline-sharp" color="#525866" :width="btnSize"
|
||||
<iconify-icon icon="material-symbols:chrome-restore-outline-sharp" :color="color" :width="btnSize"
|
||||
:height="btnSize" v-show="isMaximized" />
|
||||
</button>
|
||||
</native-tooltip>
|
||||
<native-tooltip :content="t('window.close')">
|
||||
<button v-show="isClosable" class="flex items-center justify-center cursor-pointer w-[40px] h-[40px]"
|
||||
@click="handleClose">
|
||||
<iconify-icon icon="material-symbols:close" color="#525866" :width="btnSize" :height="btnSize" />
|
||||
<iconify-icon icon="material-symbols:close" :color="color" :width="btnSize" :height="btnSize" />
|
||||
</button>
|
||||
</native-tooltip>
|
||||
</div>
|
||||
@@ -42,9 +42,10 @@ interface HeaderBarProps {
|
||||
isMaximizable?: boolean;
|
||||
isMinimizable?: boolean;
|
||||
isClosable?: boolean;
|
||||
color?: string;
|
||||
}
|
||||
|
||||
defineOptions({ name: 'HeaderBar' })
|
||||
defineOptions({ name: 'HeaderBar', color: '#525866' })
|
||||
|
||||
withDefaults(defineProps<HeaderBarProps>(), {
|
||||
isMaximizable: true,
|
||||
|
||||
@@ -20,6 +20,6 @@ export const channels: Item[] = [
|
||||
{
|
||||
id: uuidv4(),
|
||||
channelName: 'douyin',
|
||||
channelUrl: 'https://life.douyin.com/p/goods_winetour/physical_room_list?groupid=1816249020842116',
|
||||
channelUrl: 'https://life.douyin.com/p/travel-ari/hotel/price_amount_state?groupid=1816249020842116',
|
||||
}
|
||||
]
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="h-screen login-bg flex flex-col">
|
||||
<header-bar>
|
||||
<header-bar color="#fff">
|
||||
<drag-region class="w-full" />
|
||||
</header-bar>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user