diff --git a/src/pages-service/tickets/components/ProductDetail.vue b/src/pages-service/tickets/components/ProductDetail.vue index 27db41b..139761a 100644 --- a/src/pages-service/tickets/components/ProductDetail.vue +++ b/src/pages-service/tickets/components/ProductDetail.vue @@ -2,24 +2,15 @@ - - 1 / {{ productImages.length }} + 暂无商品图片 - - - - {{ product.fulfillmentLabel }} @@ -32,7 +23,7 @@ @@ -52,7 +43,7 @@ 优惠价 - {{ currencySymbol }}{{ product.startingPrice }} + {{ currencySymbol }}{{ product.startingPrice }} {{ product.bookingButtonText || '去预订' }} @@ -64,15 +55,23 @@ diff --git a/src/pages-service/tickets/view-contract.test.mjs b/src/pages-service/tickets/view-contract.test.mjs index 646a949..b9d7f7f 100644 --- a/src/pages-service/tickets/view-contract.test.mjs +++ b/src/pages-service/tickets/view-contract.test.mjs @@ -155,13 +155,16 @@ test("TicketHome consumes scenic home response fields directly", async () => { ); }); -test("TicketHome renders MP4 cover images as background videos", async () => { - const source = await readTicketFile("components/TicketHome.vue"); +test("tickets use a local indicator-free media swiper", async () => { + const source = await readTicketFile("components/TicketMediaSwiper.vue"); - assert.match( - source, - / { assert.match(source, /:show-mute-btn="false"/); assert.match(source, /:enable-progress-gesture="false"/); assert.match(source, /object-fit="cover"/); - assert.match(source, //); assert.match(source, /url\.trim\(\)\.split\(\/\[\?\#\]\/\)\[0\]/); - assert.match(source, /toLowerCase\(\)\.endsWith\('\.mp4'\)/); + assert.match(source, /toLowerCase\(\)\.endsWith\("\.mp4"\)/); +}); + +test("TicketHome prefers mediaList and falls back to coverImage", async () => { + const source = await readTicketFile("components/TicketHome.vue"); + + assert.match(source, /import TicketMediaSwiper from "\.\/TicketMediaSwiper\.vue"/); + assert.match(source, //); + assert.match(source, /if \(mediaList\.length\) return mediaList/); + assert.match(source, /props\.homeData\.coverImage/); + assert.doesNotMatch(source, /