feat: 商品详情交互开发
This commit is contained in:
@@ -39,13 +39,25 @@
|
||||
}}</view>
|
||||
<view class="goods-price">
|
||||
<text class="currency">¥</text>
|
||||
<text class="price">{{ goodsData.price || 399 }}</text>
|
||||
<text class="price">
|
||||
{{ goodsData.specificationPrice || 399 }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="goods-service-list">
|
||||
<view
|
||||
class="goods-service-list"
|
||||
v-if="
|
||||
goodsData.commodityServiceList &&
|
||||
goodsData.commodityServiceList.length
|
||||
"
|
||||
>
|
||||
<view class="service-title">包含服务</view>
|
||||
<view class="goods-service-item">
|
||||
<text class="service-label">随时可退</text>
|
||||
<text class="service-value">1份</text>
|
||||
<view
|
||||
class="goods-service-item"
|
||||
v-for="item in goodsData.commodityServiceList"
|
||||
:key="item.serviceTitle"
|
||||
>
|
||||
<text class="service-label">{{ item.serviceTitle }}</text>
|
||||
<text class="service-value">{{ item.serviceAmount }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -54,7 +66,11 @@
|
||||
|
||||
<!-- 数量选择区域 -->
|
||||
<view class="quantity-section">
|
||||
<ModuleTitle title="游客信息" />
|
||||
<ModuleTitle
|
||||
:title="
|
||||
goodsData.commodityTypeCode === '0' ? '订房信息' : '游客信息'
|
||||
"
|
||||
/>
|
||||
|
||||
<Stepper v-model="quantity" />
|
||||
</view>
|
||||
@@ -67,7 +83,11 @@
|
||||
>
|
||||
<FormCard
|
||||
v-for="(item, index) in userFormList"
|
||||
:title="`游客${index + 1}`"
|
||||
:title="
|
||||
goodsData.commodityTypeCode === '0'
|
||||
? `房间${index + 1}`
|
||||
: `游客${index + 1}`
|
||||
"
|
||||
:form="item"
|
||||
:showDeleteIcon="userFormList.length > 1"
|
||||
:key="index"
|
||||
@@ -78,7 +98,7 @@
|
||||
</scroll-view>
|
||||
|
||||
<!-- 总价区域 -->
|
||||
<SumCard />
|
||||
<SumCard :referencePrice="goodsData.specificationPrice" :discount="totalPrice" />
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
@@ -107,7 +127,9 @@ import SumCard from "@/components/SumCard/index.vue";
|
||||
const props = defineProps({
|
||||
goodsData: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
default: () => ({
|
||||
commodityTypeCode: "0", // 商品类型 0-酒店 1-门票 2-餐饮
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user