diff --git a/src/pages-booking/index.vue b/src/pages-booking/index.vue
index f6ce226..ba98143 100644
--- a/src/pages-booking/index.vue
+++ b/src/pages-booking/index.vue
@@ -7,7 +7,7 @@
:shadow="false"
>
- {{ GOODS_TYPE[orderData.commodityTypeCode] }}
+ {{ GOODS_TYPE[orderData.orderType] }}
@@ -18,7 +18,7 @@
@@ -253,7 +253,7 @@ const handlePayClick = ThrottleUtils.createThrottle(async (goodsData) => {
};
//酒店类型添加入住时间、离店时间
- if (goodsData.commodityTypeCode === "0" && selectedDate.value) {
+ if (goodsData.orderType === 0 && selectedDate.value) {
const { startDate, endDate } = selectedDate.value;
// 入住时间
params.checkInData = startDate;
diff --git a/src/pages-order/order/components/GoodsInfo/index.vue b/src/pages-order/order/components/GoodsInfo/index.vue
index bd495a7..15f83af 100644
--- a/src/pages-order/order/components/GoodsInfo/index.vue
+++ b/src/pages-order/order/components/GoodsInfo/index.vue
@@ -1,11 +1,11 @@
@@ -32,7 +32,7 @@
{
};
});
-const commodityTypeCode = computed(() => props.orderData.commodityTypeCode);
+const orderType = computed(() => props.orderData.orderType);
const commodityAmount = computed(() => {
// 门票单位:张、餐饮单位:份
const { commodityAmount } = props.orderData;
- return commodityTypeCode.value === "2"
+ return orderType.value === "2"
? `${parseInt(commodityAmount)}张`
: `${parseInt(commodityAmount)}份`;
});
diff --git a/src/pages-order/order/detail.vue b/src/pages-order/order/detail.vue
index f2bcdc0..d98d704 100644
--- a/src/pages-order/order/detail.vue
+++ b/src/pages-order/order/detail.vue
@@ -11,7 +11,7 @@
-
+
diff --git a/src/pages/goods/components/DateSelector/styles/index.scss b/src/pages/goods/components/DateSelector/styles/index.scss
index 0aa5175..ab0aaa5 100644
--- a/src/pages/goods/components/DateSelector/styles/index.scss
+++ b/src/pages/goods/components/DateSelector/styles/index.scss
@@ -2,8 +2,8 @@
display: flex;
align-items: flex-end;
justify-content: space-between;
- margin: 24rpx 0 12rpx;
- padding: 12rpx 0;
+ margin: 12px 0;
+ padding: 0 12px;
}
.date-item {
diff --git a/src/pages/goods/components/GoodConfirm/index.vue b/src/pages/goods/components/GoodConfirm/index.vue
index b8ea00a..d1f0e06 100644
--- a/src/pages/goods/components/GoodConfirm/index.vue
+++ b/src/pages/goods/components/GoodConfirm/index.vue
@@ -39,7 +39,7 @@
}}
¥
-
+
{{ goodsData.calculatedTotalPrice || 0 }}
@@ -106,7 +106,7 @@
{
// 常量定义
const COMMODITY_TYPES = {
- HOTEL: "0",
- TICKET: "1",
- DINING: "2",
+ HOTEL: 0,
+ TICKET: 1,
+ DINING: 2,
};
const DEFAULT_PRICE = 399;
@@ -166,7 +166,7 @@ const props = defineProps({
goodsData: {
type: Object,
default: () => ({
- commodityTypeCode: "0",
+ orderType: "0",
specificationPrice: "",
commodityName: "",
commodityPhotoList: [],
@@ -195,14 +195,14 @@ const isDeleting = ref(false); // 标志位,防止删除时watch冲突
// 计算属性
const totalPrice = computed(() => {
const price =
- props.goodsData?.commodityTypeCode === "0"
+ props.goodsData?.orderType === 0
? props.goodsData?.calculatedTotalPrice
: props.goodsData?.specificationPrice || 0;
return (price * quantity.value).toFixed(0);
});
const isHotelType = computed(() => {
- return props.goodsData?.commodityTypeCode === COMMODITY_TYPES.HOTEL;
+ return props.goodsData?.orderType === COMMODITY_TYPES.HOTEL;
});
const sectionTitle = computed(() => {
@@ -332,7 +332,7 @@ const confirmOrder = () => {
visitorName: user.visitorName.trim(),
contactPhone: user.contactPhone.trim(),
})),
- commodityType: props.goodsData?.commodityTypeCode,
+ commodityType: props.goodsData?.orderType,
timestamp: Date.now(),
};
diff --git a/src/pages/goods/index.vue b/src/pages/goods/index.vue
index c7a4273..14b240f 100644
--- a/src/pages/goods/index.vue
+++ b/src/pages/goods/index.vue
@@ -25,7 +25,7 @@
-
+
+
-
+
@@ -127,7 +128,7 @@ const goodsInfo = async (params) => {
calculatedTotalPrice.value = goodsData.value.specificationPrice || 0;
// 判断是酒店类型订单再获取获取商品日价格及库存
- if (goodsData.value.commodityTypeCode === "0") {
+ if (goodsData.value.orderType === 0) {
configGoodsData();
getGoodsDailyPrice({
commodityId: goodsData.value.commodityId,
@@ -188,7 +189,7 @@ const handleDateSelect = (data) => {
selectedDateStore.setData(selectedDate.value);
// 根据商品类型计算价格
- if (goodsData.value.commodityTypeCode === "0") {
+ if (goodsData.value.orderType === 0) {
// 酒店类型:计算dateRange总价格,排除最后一天(同一天除外)
if (data.dateRange && Array.isArray(data.dateRange)) {
// 获取默认价格作为回退值