|
|
@@ -2,7 +2,6 @@
|
|
|
import React, { useCallback, useMemo, useRef, useState } from "react";
|
|
|
import styles from "./index.module.scss";
|
|
|
import { Goods } from "@/types";
|
|
|
-import { type1Arr1M } from "../data";
|
|
|
import { baseURL } from "@/utils/http";
|
|
|
import backImg from "@/assets/img/back.png";
|
|
|
import name1Img from "@/assets/img/name1.png";
|
|
|
@@ -24,12 +23,7 @@ type Props = {
|
|
|
};
|
|
|
|
|
|
function GoodsInfoM({ info, colseFu, type }: Props) {
|
|
|
- // 背景图
|
|
|
- const imgBac = useMemo(() => {
|
|
|
- const info = type1Arr1M.find((v) => v.name === type);
|
|
|
- if (info) return `info${info.id}Bac.jpg`;
|
|
|
- else return "";
|
|
|
- }, [type]);
|
|
|
+
|
|
|
|
|
|
// 看看有几个模型
|
|
|
const showNum = useMemo(() => {
|
|
|
@@ -90,7 +84,7 @@ function GoodsInfoM({ info, colseFu, type }: Props) {
|
|
|
<div
|
|
|
className={styles.GoodsInfoM}
|
|
|
style={{
|
|
|
- backgroundImage: `url(${baseURL}/3Goods/mobile/${imgBac})`,
|
|
|
+ backgroundImage: `url(${baseURL}/3Goods/mobile/bac.jpg)`,
|
|
|
}}
|
|
|
>
|
|
|
<div className="GoodsInfoMmian mySorrl">
|