feat: 日历组件|复选框组件优化
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
<!-- 日历组件 -->
|
||||
<Calender
|
||||
:visible="calendarVisible"
|
||||
:price-data="priceData"
|
||||
mode="range"
|
||||
@close="handleCalendarClose"
|
||||
@range-select="handleDateSelect"
|
||||
@@ -50,7 +51,11 @@
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import { goodsDetail, orderPay } from "@/request/api/GoodsApi";
|
||||
import {
|
||||
goodsDetail,
|
||||
commodityDailyPriceList,
|
||||
orderPay,
|
||||
} from "@/request/api/GoodsApi";
|
||||
import TopNavBar from "@/components/TopNavBar/index.vue";
|
||||
import ImageSwiper from "@/components/ImageSwiper/index.vue";
|
||||
import GoodInfo from "./components/GoodInfo/index.vue";
|
||||
@@ -62,12 +67,27 @@ const calendarVisible = ref(false);
|
||||
const goodsData = ref({});
|
||||
const goodConfirmRef = ref(null);
|
||||
const selectedDate = ref("");
|
||||
const priceData = ref([]);
|
||||
|
||||
// 获取商品详情数据
|
||||
const goodsInfo = async (params) => {
|
||||
const res = await goodsDetail(params);
|
||||
|
||||
goodsData.value = res.data;
|
||||
|
||||
// 判断是酒店类型订单再获取获取商品日价格及库存
|
||||
if (goodsData.value.commodityTypeCode === "0") {
|
||||
getGoodsDailyPrice({
|
||||
commodityId: goodsData.value.commodityId,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// 获取商品日价格及库存
|
||||
const getGoodsDailyPrice = async (params) => {
|
||||
const res = await commodityDailyPriceList(params);
|
||||
|
||||
priceData.value = res.data;
|
||||
};
|
||||
|
||||
// 显示确认弹窗
|
||||
|
||||
Reference in New Issue
Block a user