diff --git a/vue3/src/views/contentDetail/index.vue b/vue3/src/views/contentDetail/index.vue
index 8a393fad80fd5abdd0c9a47ab55460bdf6336290..7c0641f89d1b9ff7b41cac2d3db8768373de6710 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;