Merge branch 'order-729'
合并order-729分支
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<uni-popup
|
||||
ref="popup"
|
||||
type="bottom"
|
||||
background-color="#E9F3F7"
|
||||
background-color="#fff"
|
||||
border-radius="12px 12px 0 0"
|
||||
mask-background-color="rgba(0,0,0,0.5)"
|
||||
:safe-area="false"
|
||||
@@ -98,7 +98,10 @@
|
||||
</scroll-view>
|
||||
|
||||
<!-- 总价区域 -->
|
||||
<SumCard :referencePrice="goodsData.specificationPrice" :discount="totalPrice" />
|
||||
<SumCard
|
||||
:referencePrice="goodsData.specificationPrice"
|
||||
:discount="totalPrice"
|
||||
/>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
@@ -144,7 +147,7 @@ const isDeleting = ref(false); // 标志位,防止删除时watch冲突
|
||||
|
||||
// 计算属性
|
||||
const totalPrice = computed(() => {
|
||||
const price = props.goodsData.price || 399;
|
||||
const price = props.goodsData.specificationPrice || 399;
|
||||
return (price * quantity.value).toFixed(0);
|
||||
});
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
}
|
||||
|
||||
.good-content {
|
||||
background: #e9f3f7;
|
||||
background: #fff;
|
||||
box-sizing: border-box;
|
||||
max-height: 60vh;
|
||||
overflow: hidden;
|
||||
@@ -54,7 +54,7 @@
|
||||
.goods-info {
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
background-color: #f5f5f5;
|
||||
padding: 12px;
|
||||
|
||||
.goods-details {
|
||||
@@ -105,13 +105,13 @@
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.goods-service-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: 8px;
|
||||
|
||||
.service-label,
|
||||
.service-value {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
<ModuleTitle title="购买须知" />
|
||||
|
||||
<zero-markdown-view :markdown="goodsData.commodityTip" :fontSize="14" />
|
||||
<zero-markdown-view :markdown="goodsData.commodityTip" />
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<view class="footer">
|
||||
<view class="left">
|
||||
<text class="label">价格:</text>
|
||||
<text class="price">{{ goodsData.commodityPrice || 399 }}</text>
|
||||
<text class="price">{{ goodsData.specificationPrice || 399 }}</text>
|
||||
</view>
|
||||
<view class="buy-button" @click="showConfirmPopup">立即抢购</view>
|
||||
</view>
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
// 显示确认弹窗
|
||||
@@ -170,4 +190,4 @@ const handleDateSelect = (data) => {
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "./styles/index.scss";
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user