feat: 商品计算报错问题

This commit is contained in:
2025-11-26 22:47:17 +08:00
parent f69225dbff
commit 92f981769f
2 changed files with 6 additions and 2 deletions

View File

@@ -55,7 +55,7 @@ const count = computed({
});
const totalAmt = computed(() => {
const { totalDays = 1 } = props.selectedDate;
const { totalDays } = props.selectedDate;
const { specificationPrice } = props.orderData;
return count.value * Number(specificationPrice) * totalDays;
});

View File

@@ -3,7 +3,11 @@ import { defineStore } from "pinia";
export const useSelectedDateStore = defineStore("selectedDate", {
state() {
return {
selectedDate: {},
selectedDate: {
startDate: "",
endDate: "",
totalDays: 1,
},
};
},