| | |
| | | <div class="text-gray-500 mb-2">订货编码:{{ product.applicationCode }}</div> |
| | | <div class="flex items-center gap-2"> |
| | | <span class="text-gray-500">能效等级:</span> |
| | | <div class="flex items-center"> |
| | | <img :src="product.eecLevelIcon" class="h-8" /> |
| | | <!-- <span class="text-white relative right-[42px] top-[-1px]">1</span> |
| | | <span class="text-white relative right-[30px] top-[-1px] text-sm">一级能效</span> --> |
| | | <div class="flex items-center relative"> |
| | | <img :src="EecLevelEnum[productDataRef.EnergyEfficiencyClass]?.icon" class="h-8" /> |
| | | <!-- <span class="text-white relative right-[42px] top-[-1px]">1</span> --> |
| | | <!-- <span class="text-white absolute left-[16px] bottom-[10px] text-small">{{ EecLevelEnum[productDataRef.EnergyEfficiencyClass]?.name }}</span> --> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import EecLevel1 from '@/assets/icons/energy_level_1.svg'; |
| | | import EecLevel1 from '@/assets/icons/energy1.png'; |
| | | import EecLevel2 from '@/assets/icons/energy2.png'; |
| | | import { Check } from '@element-plus/icons-vue'; |
| | | import { ElMessage } from 'element-plus'; |
| | | import { onMounted, ref } from 'vue'; |
| | |
| | | // 跳转到支付页面 |
| | | router.push('/payment'); |
| | | }; |
| | | const EecLevelEnum = { |
| | | 1: { name: '一级能效', icon: EecLevel1 }, |
| | | 2: { name: '二级能效', icon: EecLevel2 }, |
| | | }; |
| | | |
| | | const productDataRef = ref({}); |
| | | onMounted(() => { |
| | | // 从localStorage获取产品信息 |
| | | const savedProduct = localStorage.getItem('currentProduct'); |
| | | if (savedProduct) { |
| | | const productData = JSON.parse(savedProduct); |
| | | productDataRef.value = productData; |
| | | // 合并默认值和保存的产品数据 |
| | | product.value = { |
| | | ...product.value, |
| | | id: productData.Id, |
| | | name: productData.ModelType, |
| | | applicationCode: productData.RecordNumber, |
| | | price: '询价', |
| | | price: productData.Price, |
| | | image: productData.PhysicalPicturePath, |
| | | brand: productData.CompanyName, |
| | | model: productData.Model, |