Deploy to Staging #9
|
|
@ -1 +1 @@
|
|||
{"createdAt":1744342271961}
|
||||
{"createdAt":1744361020595}
|
||||
|
|
@ -234,9 +234,10 @@ export class BidsService {
|
|||
const bidHistoriesItem = bid.histories[0]; // Lấy lịch sử bid gần nhất (mới nhất)
|
||||
|
||||
if (
|
||||
!bidHistoriesItem ||
|
||||
// Nếu giá cuối cùng không phải là giá của người dùng và giá hiện tại vượt quá mức người dùng đặt + bước giá
|
||||
bidHistoriesItem.price !== data.current_price &&
|
||||
data.current_price > bid.max_price + bid.plus_price
|
||||
(bidHistoriesItem.price !== data.current_price &&
|
||||
data.current_price > bid.max_price + bid.plus_price)
|
||||
) {
|
||||
bid.status = 'out-bid'; // Người dùng đã bị outbid khi đấu giá kết thúc
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ export class LangtonsApiBid extends ApiBid {
|
|||
await this.page_context.reload({ waitUntil: 'networkidle2' });
|
||||
console.log(`✅ [${this.id}] Page reloaded successfully.`);
|
||||
|
||||
this.handleUpdateWonItem();
|
||||
// this.handleUpdateWonItem();
|
||||
} else {
|
||||
console.log(`❌ [${this.id}] Page context is closed. Stopping reload.`);
|
||||
clearInterval(this.reloadInterval);
|
||||
|
|
|
|||
|
|
@ -125,6 +125,7 @@ export class LangtonsProductBid extends ProductBid {
|
|||
close_time: close_time ? String(close_time) : null,
|
||||
name,
|
||||
},
|
||||
// [],
|
||||
['close_time'],
|
||||
);
|
||||
|
||||
|
|
@ -216,7 +217,7 @@ export class LangtonsProductBid extends ProductBid {
|
|||
console.log(`📝 [${this.id}] Cleared bid input field.`);
|
||||
|
||||
// 📌 Nhập giá đấu vào ô input
|
||||
await page.type('#place-bid', String(this.max_price), { delay: 100 });
|
||||
await page.type('#place-bid', String(this.max_price), { delay: 800 });
|
||||
console.log(`✅ [${this.id}] Entered bid amount: ${this.max_price}`);
|
||||
|
||||
// 📌 Lấy giá trị thực tế từ ô input sau khi nhập
|
||||
|
|
@ -230,7 +231,7 @@ export class LangtonsProductBid extends ProductBid {
|
|||
}
|
||||
|
||||
// 📌 Nhấn nút "Place Bid"
|
||||
await page.click('.place-bid-submit .btn.btn-primary.btn-block.place-bid-btn', { delay: 10000 });
|
||||
await page.click('.place-bid-submit .btn.btn-primary.btn-block.place-bid-btn', { delay: 5000 });
|
||||
console.log(`🖱️ [${this.id}] Clicked "Place Bid" button.`);
|
||||
|
||||
console.log(`📩 [${this.id}] Bid submitted, waiting for navigation...`);
|
||||
|
|
|
|||
Loading…
Reference in New Issue