fix click published
This commit is contained in:
parent
cbb2e21bcd
commit
4773ffd7b0
File diff suppressed because one or more lines are too long
|
|
@ -301,17 +301,14 @@ const handle = async (item: IItem) => {
|
|||
|
||||
await clickNext();
|
||||
|
||||
if (import.meta.env.ENV === "prod") {
|
||||
await delay(200);
|
||||
await clickPublist();
|
||||
}
|
||||
await delay(200);
|
||||
|
||||
await clickPublist();
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
const closeTab = async (data: IItem) => {
|
||||
await delay(1000);
|
||||
|
||||
chrome.runtime.sendMessage({
|
||||
type: "close-tab",
|
||||
payload: data,
|
||||
|
|
@ -341,19 +338,21 @@ port.onMessage.addListener(async (message) => {
|
|||
} finally {
|
||||
await finistPublist(data, { published: true });
|
||||
|
||||
await delay(2000);
|
||||
|
||||
await closeTab(data);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// async function init() {
|
||||
// const { data } = await axios.get("products/27");
|
||||
async function init() {
|
||||
const { data } = await axios.get("products/27");
|
||||
|
||||
// if (!data.data) return;
|
||||
if (!data.data) return;
|
||||
|
||||
// const item = data.data as IItem;
|
||||
const item = data.data as IItem;
|
||||
|
||||
// await handle(item);
|
||||
// }
|
||||
await handle(item);
|
||||
}
|
||||
|
||||
// init();
|
||||
init();
|
||||
|
|
|
|||
Loading…
Reference in New Issue