feat: 商品详情调整
This commit is contained in:
@@ -1,18 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view class="mt-16">
|
||||||
<view v-if="goodsData.commodityPurchaseInstruction" class="use-notice">
|
<view v-if="goodsData.commodityPurchaseInstruction">
|
||||||
<ModuleTitle
|
<ModuleTitle
|
||||||
v-if="showTitle"
|
v-if="showTitle"
|
||||||
:title="goodsData.commodityPurchaseInstruction.templateTitle"
|
:title="goodsData.commodityPurchaseInstruction.templateTitle"
|
||||||
/>
|
/>
|
||||||
<view
|
<view
|
||||||
class="use-notice-content"
|
|
||||||
v-for="(moduleItem, index) in goodsData.commodityPurchaseInstruction
|
v-for="(moduleItem, index) in goodsData.commodityPurchaseInstruction
|
||||||
.commodityPurchaseInstructionModuleEntityList"
|
.commodityPurchaseInstructionModuleEntityList"
|
||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
<view
|
<view
|
||||||
class="module-item"
|
class="flex flex-items-start flex-col pt-12 pb-12"
|
||||||
:class="{
|
:class="{
|
||||||
'border-bottom':
|
'border-bottom':
|
||||||
index <
|
index <
|
||||||
@@ -21,13 +20,18 @@
|
|||||||
1,
|
1,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<view class="module-icon">
|
<view class="flex flex-items-center flex-row flex-shrink-0 mr-8">
|
||||||
<uni-icons fontFamily="znicons" size="20" color="#333">{{
|
<uni-icons fontFamily="znicons" size="20" color="#333">{{
|
||||||
zniconsMap[moduleItem.moduleIcon]
|
zniconsMap[moduleItem.moduleIcon]
|
||||||
}}</uni-icons>
|
}}</uni-icons>
|
||||||
<text class="module-title">{{ moduleItem.moduleTitle }}</text>
|
<text class="font-size-14 color-171717 line-height-20">{{
|
||||||
|
moduleItem.moduleTitle
|
||||||
|
}}</text>
|
||||||
</view>
|
</view>
|
||||||
<text class="module-desc">{{ moduleItem.moduleContent }}</text>
|
<text
|
||||||
|
class="flex-full font-size-12 color-525866 line-height-20 mt-4"
|
||||||
|
>{{ moduleItem.moduleContent }}</text
|
||||||
|
>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -57,6 +61,4 @@ const props = defineProps({
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss"></style>
|
||||||
@import "./styles/index.scss";
|
|
||||||
</style>
|
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
// 使用须知样式
|
|
||||||
.use-notice {
|
|
||||||
margin: 16px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.use-notice-content {
|
|
||||||
.module-item {
|
|
||||||
display: flex;
|
|
||||||
align-items: flex-start;
|
|
||||||
flex-direction: column;
|
|
||||||
padding: 12px 0;
|
|
||||||
|
|
||||||
.module-icon {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
align-items: center;
|
|
||||||
margin-right: 8px;
|
|
||||||
flex-shrink: 0;
|
|
||||||
|
|
||||||
.module-title {
|
|
||||||
font-size: $uni-font-size-base;
|
|
||||||
color: $uni-text-color;
|
|
||||||
text-align: center;
|
|
||||||
word-wrap: break-word;
|
|
||||||
margin-left: 4px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.module-desc {
|
|
||||||
flex: 1;
|
|
||||||
font-size: $uni-font-size-sm;
|
|
||||||
color: #666;
|
|
||||||
line-height: 1.5;
|
|
||||||
margin-top: 4px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.border-bottom {
|
|
||||||
border-bottom: 1px solid #f0f0f0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
.module-title {
|
.module-title {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color: #000;
|
color: #171717;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|||||||
47
src/pages/goods/components/GoodFacility/index.vue
Normal file
47
src/pages/goods/components/GoodFacility/index.vue
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
<template>
|
||||||
|
<view class="mt-16">
|
||||||
|
<view
|
||||||
|
v-for="(moduleItem, index) in goodsData.commodityPurchaseInstruction
|
||||||
|
.commodityPurchaseInstructionModuleEntityList"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
class="flex flex-items-start flex-col pt-12 pb-12"
|
||||||
|
:class="{
|
||||||
|
'border-bottom':
|
||||||
|
index <
|
||||||
|
goodsData.commodityPurchaseInstruction
|
||||||
|
.commodityPurchaseInstructionModuleEntityList.length -
|
||||||
|
1,
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<view class="flex flex-items-center flex-row flex-shrink-0 mr-8">
|
||||||
|
<uni-icons fontFamily="znicons" size="20" color="#171717">{{
|
||||||
|
zniconsMap[moduleItem.moduleIcon]
|
||||||
|
}}</uni-icons>
|
||||||
|
<text class="font-size-12 color-171717 line-height-20">{{
|
||||||
|
moduleItem.moduleTitle
|
||||||
|
}}</text>
|
||||||
|
</view>
|
||||||
|
<text class="flex-full font-size-12 color-525866 line-height-20 mt-4">{{
|
||||||
|
moduleItem.moduleContent
|
||||||
|
}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { zniconsMap } from "@/static/fonts/znicons.js";
|
||||||
|
import { defineProps } from "vue";
|
||||||
|
|
||||||
|
// Props定义
|
||||||
|
const props = defineProps({
|
||||||
|
goodsData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="goods-container">
|
<view class="goods-container bg-gray">
|
||||||
<TopNavBar title="商品详情" />
|
<TopNavBar title="商品详情" />
|
||||||
|
|
||||||
<!-- 滚动区域 -->
|
<!-- 滚动区域 -->
|
||||||
@@ -29,6 +29,9 @@
|
|||||||
:nights="selectedDate.totalDays"
|
:nights="selectedDate.totalDays"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<!-- 商品设施组件 -->
|
||||||
|
<GoodFacility :goodsData="goodsData" />
|
||||||
|
|
||||||
<!-- 商品详情组件 -->
|
<!-- 商品详情组件 -->
|
||||||
<GoodDetail :goodsData="goodsData" />
|
<GoodDetail :goodsData="goodsData" />
|
||||||
</view>
|
</view>
|
||||||
@@ -79,6 +82,7 @@ import Calender from "@/components/Calender/index.vue";
|
|||||||
import LocationCard from "@/components/LocationCard/index.vue";
|
import LocationCard from "@/components/LocationCard/index.vue";
|
||||||
import DateSelector from "./components/DateSelector/index.vue";
|
import DateSelector from "./components/DateSelector/index.vue";
|
||||||
import GoodDetail from "@/components/GoodDetail/index.vue";
|
import GoodDetail from "@/components/GoodDetail/index.vue";
|
||||||
|
import GoodFacility from "./components/GoodFacility/index.vue";
|
||||||
|
|
||||||
const calendarVisible = ref(false);
|
const calendarVisible = ref(false);
|
||||||
const goodsData = ref({});
|
const goodsData = ref({});
|
||||||
|
|||||||
@@ -7,10 +7,18 @@
|
|||||||
margin: 4px;
|
margin: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ml-4 {
|
||||||
|
margin-left: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
.mr-4 {
|
.mr-4 {
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mt-4 {
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
.mb-4 {
|
.mb-4 {
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
}
|
}
|
||||||
@@ -71,10 +79,22 @@
|
|||||||
margin-right: 12px;
|
margin-right: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mt-16 {
|
||||||
|
margin-top: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mb-16 {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
.ml-16 {
|
.ml-16 {
|
||||||
margin-left: 16px;
|
margin-left: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mr-16 {
|
||||||
|
margin-right: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
.ml-20 {
|
.ml-20 {
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user