|
@@ -4,54 +4,82 @@
|
|
|
<script setup lang="ts">
|
|
|
import Card from '@/components/card.vue'
|
|
|
import SectionHeading from '@/components/section-heading.vue'
|
|
|
-import { getAppMaterial } from '../../../core/libs/requests'
|
|
|
+import { getMaterialDetail, getByDictType } from '../../../core/libs/requests'
|
|
|
+import NavbarEvo from '@/components/navbar-evo.vue'
|
|
|
+import { DictType } from '../../../core/models/moment'
|
|
|
|
|
|
const id = ref()
|
|
|
-const { data, run: setData } = useRequest(() => getAppMaterial(id.value))
|
|
|
-const handleBackClick = () => {
|
|
|
- uni.navigateBack()
|
|
|
-}
|
|
|
+const { data, run: setData } = useRequest(() => getMaterialDetail({ id: id.value }))
|
|
|
+const { data: materialBrandLevels, run: setMaterialBrandLevels } = useRequest(
|
|
|
+ () => getByDictType(DictType.memberMaterialsBrandLevel),
|
|
|
+ { initialData: [] },
|
|
|
+)
|
|
|
+const { data: materialOperationTypes, run: setMaterialOperationTypes } = useRequest(
|
|
|
+ () => getByDictType(DictType.memberMaterialsOperationType),
|
|
|
+ { initialData: [] },
|
|
|
+)
|
|
|
+const { data: materialBrandTypes, run: setMaterialBrandTypes } = useRequest(
|
|
|
+ () => getByDictType(DictType.memberMaterialsBrandType),
|
|
|
+ { initialData: [] },
|
|
|
+)
|
|
|
+const { data: materialsManageBrands, run: setMaterialsManageBrands } = useRequest(
|
|
|
+ () => getByDictType(DictType.materialsManageBrand),
|
|
|
+ { initialData: [] },
|
|
|
+)
|
|
|
onLoad(async (query: { id: number }) => {
|
|
|
id.value = query.id
|
|
|
await setData()
|
|
|
console.log(data.value)
|
|
|
+ await Promise.all([
|
|
|
+ setMaterialBrandLevels(),
|
|
|
+ setMaterialBrandTypes(),
|
|
|
+ setMaterialOperationTypes(),
|
|
|
+ setMaterialsManageBrands(),
|
|
|
+ ])
|
|
|
})
|
|
|
</script>
|
|
|
<template>
|
|
|
- <view class="">
|
|
|
+ <view class="flex-grow flex flex-col">
|
|
|
<div
|
|
|
- class="w-full aspect-[1.16/1] bg-[url(https://image.zhuchaohui.com/zhucaohui/9da274c73312f5ff828b60457bf4a469e631c001a4bf1c1f355338887b19f035.png)] bg-contain"
|
|
|
+ class="w-full aspect-[1.16/1] bg-[url(https://image.zhuchaohui.com/zhucaohui/9da274c73312f5ff828b60457bf4a469e631c001a4bf1c1f355338887b19f035.png)] bg-[length:100%]"
|
|
|
+ :style="{ backgroundImage: `url(${data?.bannerUrl})` }"
|
|
|
></div>
|
|
|
- <wd-navbar
|
|
|
- fixed
|
|
|
- left-arrow
|
|
|
- safe-area-inset-top
|
|
|
- custom-class="bg-transparent!"
|
|
|
- :bordered="false"
|
|
|
- @click-left="handleBackClick"
|
|
|
- ></wd-navbar>
|
|
|
+ <NavbarEvo transparent></NavbarEvo>
|
|
|
<div class="flex flex-col gap-6 relative top--14 px-3.5">
|
|
|
<Card>
|
|
|
- <div class="flex">
|
|
|
+ <div class="flex gap-5">
|
|
|
<wd-img
|
|
|
round
|
|
|
width="78"
|
|
|
height="78"
|
|
|
custom-class="border border-[#f2f2f2] border-solid"
|
|
|
- src="https://via.placeholder.com/78x78"
|
|
|
+ :src="data?.logoUrl"
|
|
|
></wd-img>
|
|
|
- <div>
|
|
|
- <div class="text-black/90 text-lg font-normal font-['PingFang SC'] leading-[10.18px]">
|
|
|
- IMOLA瓷砖
|
|
|
+ <div class="flex flex-col gap-2.5">
|
|
|
+ <div class="flex gap-2 items-center">
|
|
|
+ <div class="text-black/90 text-lg font-normal font-['PingFang SC'] leading-[10.18px]">
|
|
|
+ <!-- IMOLA瓷砖 -->
|
|
|
+ {{ data?.materialsName }}
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="w-[52px] h-[17px] px-2 bg-[#ef4343] rounded-[3px] justify-center items-center gap-2.5 inline-flex"
|
|
|
+ >
|
|
|
+ <div class="text-white text-[10px] font-normal font-['PingFang SC'] leading-normal">
|
|
|
+ <!-- 自营品牌 -->
|
|
|
+ {{
|
|
|
+ materialBrandLevels.find(({ value }) => value === String(data.materialsType))
|
|
|
+ ?.label
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="text-black/40 text-xs font-normal font-['PingFang SC'] leading-[10.18px]">
|
|
|
- 进口品牌 | 瓷砖
|
|
|
- </div>
|
|
|
- <div class="text-black/60 text-xs font-normal font-['PingFang SC'] leading-normal">
|
|
|
- 自营品牌
|
|
|
- </div>
|
|
|
- <div class="text-black/60 text-xs font-normal font-['PingFang SC'] leading-normal">
|
|
|
- 70%积分
|
|
|
+ {{ materialBrandTypes.find(({ value }) => value === String(data?.brandType))?.label }}
|
|
|
+ |
|
|
|
+ {{
|
|
|
+ materialOperationTypes.find(({ value }) => value === String(data?.manageType))
|
|
|
+ ?.label
|
|
|
+ }}
|
|
|
</div>
|
|
|
<div>
|
|
|
<span
|
|
@@ -62,13 +90,17 @@ onLoad(async (query: { id: number }) => {
|
|
|
<span
|
|
|
class="text-black/40 text-xs font-normal font-['PingFang SC'] uppercase leading-[10.18px]"
|
|
|
>
|
|
|
- imola / chedit
|
|
|
+ <!-- imola / chedit -->
|
|
|
+ {{
|
|
|
+ materialsManageBrands.find(({ value }) => value === String(data?.manageBrand))
|
|
|
+ ?.label
|
|
|
+ }}
|
|
|
</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</Card>
|
|
|
- <Card>
|
|
|
+ <!-- <Card>
|
|
|
<div class="my-6 text-black/90 text-lg font-normal font-['PingFang SC'] leading-[10.18px]">
|
|
|
品牌介绍
|
|
|
</div>
|
|
@@ -83,9 +115,9 @@ onLoad(async (query: { id: number }) => {
|
|
|
<br />
|
|
|
“蜜蜂”是具有代表意大利风格及产品质量并极富艺术创造力的典型品牌,其生产始终沿着两条轨道运行,一是及时掌握体现时代趋势和审美品位的设计理念,二是不断提高产品科技含量和制作工艺。
|
|
|
</div>
|
|
|
- </Card>
|
|
|
+ </Card> -->
|
|
|
<SectionHeading title="产品展示"></SectionHeading>
|
|
|
- <img class="w-[347px] h-[209px] rounded-2xl" src="https://via.placeholder.com/347x209" />
|
|
|
+ <!-- <img class="w-[347px] h-[209px] rounded-2xl" src="https://via.placeholder.com/347x209" /> -->
|
|
|
<wd-button custom-class="w-full! rounded-lg!">下载所有素材包</wd-button>
|
|
|
</div>
|
|
|
</view>
|