|
@@ -3,13 +3,8 @@ import MainTitle from "@/components/MainTitle"
|
|
|
import ProductMenu from "@/components/products/ProductMenuClient"
|
|
import ProductMenu from "@/components/products/ProductMenuClient"
|
|
|
import {serverGet} from "@/utils/request";
|
|
import {serverGet} from "@/utils/request";
|
|
|
import AnimatedSection from "@/components/AnimatedSection";
|
|
import AnimatedSection from "@/components/AnimatedSection";
|
|
|
-
|
|
|
|
|
-import ProductionNew from "@/components/ProductionNew";
|
|
|
|
|
import React, {Suspense} from "react";
|
|
import React, {Suspense} from "react";
|
|
|
|
|
|
|
|
-interface MenuItem {
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
export default async function ProductShowcase() {
|
|
export default async function ProductShowcase() {
|
|
|
|
|
|
|
|
const res = await serverGet<ProductCategory[]>("/webSite/getProductCategoryAndType", null, {
|
|
const res = await serverGet<ProductCategory[]>("/webSite/getProductCategoryAndType", null, {
|
|
@@ -21,9 +16,9 @@ export default async function ProductShowcase() {
|
|
|
if (res.code !== 200) {
|
|
if (res.code !== 200) {
|
|
|
return <div>服务器错误</div>
|
|
return <div>服务器错误</div>
|
|
|
}
|
|
}
|
|
|
- let hardwareProductList = []
|
|
|
|
|
|
|
+ const hardwareProductList: { key: string; label: string }[] = []
|
|
|
for (let i = 0; i < res.data.length; i++) {
|
|
for (let i = 0; i < res.data.length; i++) {
|
|
|
- let a = res.data[i].productTypes.map((item) => ({
|
|
|
|
|
|
|
+ const a = res.data[i].productTypes.map((item) => ({
|
|
|
key: item.productTypeName,
|
|
key: item.productTypeName,
|
|
|
label: item.productTypeName,
|
|
label: item.productTypeName,
|
|
|
// children: item.productCenters.map((center) => ({
|
|
// children: item.productCenters.map((center) => ({
|