From 2c757ac058e9b7da2b013875e10b0973b3700021 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=99=88=E5=A4=A9=E7=90=AA?=
<13764541+chen-tianqi04@user.noreply.gitee.com>
Date: Tue, 27 May 2025 21:18:26 +0800
Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E4=BA=8Epull=20request?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
vue3/src/views/contentDetail/index.vue | 47 ++++++++++++++------------
1 file changed, 26 insertions(+), 21 deletions(-)
diff --git a/vue3/src/views/contentDetail/index.vue b/vue3/src/views/contentDetail/index.vue
index 8a393fad..7c0641f8 100644
--- a/vue3/src/views/contentDetail/index.vue
+++ b/vue3/src/views/contentDetail/index.vue
@@ -81,13 +81,13 @@
-->
@@ -184,18 +184,18 @@
-
-
-
-
+
+
+
-
+
-
-
- {{ item.title }}
+
+
+ {{ item.title }}
-
+
{{ item.place }}
{{ formatDateWithWeekday(item.showTime, item.showWeekTime) }}
¥{{ item.minPrice }} 起
@@ -207,7 +207,7 @@
-
+
@@ -257,7 +257,8 @@ function getProgramDetialsList() {
ticketCategoryVoList.value = detailList.value.ticketCategoryVoList
countPrice.value=ticketCategoryVoList.value[0].price
ticketCategoryId.value = ticketCategoryVoList.value[0].id
- allPrice.value = ''
+ allPrice.value = countPrice.value * num.value; // 初始总价 = 默认单价 × 默认数量(1)
+ // allPrice.value = '' 原始代码
ticketNeedInfo.value = [{
name: '限购规则',
value: detailList.value.purchaseLimitRule,
@@ -306,9 +307,13 @@ function getProgramDetialsList() {
}
const ticketClick = (item, index) => {
- actvieIndex.value = index
- allPrice.value = item.price
- ticketCategoryId.value = item.id
+ actvieIndex.value = index;
+ countPrice.value = item.price; // 显式更新单价
+ allPrice.value = item.price * num.value; // 总价 = 新单价 × 当前数量
+ ticketCategoryId.value = item.id;
+ // actvieIndex.value = index 原本代码
+ // allPrice.value = item.price 原本代码
+ // ticketCategoryId.value = item.id 原本代码
}
const detialClick = (url, index) => {
menuActive.value = index
@@ -316,7 +321,7 @@ const detialClick = (url, index) => {
}
const handleChange = (value) => {
- const priceEach= countPrice.value
+ const priceEach= countPrice.value
allPrice.value = priceEach*value
}
@@ -348,7 +353,7 @@ function getRecommendList(){
.app-container {
width: 1200px;
margin: 0 auto;
- overflow: auto;
+ //overflow: auto; 删去这一行
.wrapper {
display: flex;
--
Gitee