shaogen1995 2 年 前
コミット
dcd4f63060

+ 1 - 9
src/pages/A3Goods/GoodsInfo/index.tsx

@@ -9,7 +9,6 @@ import React, {
 import styles from "./index.module.scss";
 import { Goods } from "@/types";
 import { baseURL } from "@/utils/http";
-import { type1Arr1 } from "../data";
 import backImg from "@/assets/img/back.png";
 import {
   PlusOutlined,
@@ -32,13 +31,6 @@ type Props = {
 };
 
 function GoodsInfo({ info, colseFu, type }: Props) {
-  // 背景图
-  const imgBac = useMemo(() => {
-    const info = type1Arr1.find((v) => v.name === type);
-    if (info) return `info${info.id}Bac.jpg`;
-    else return "";
-  }, [type]);
-
   // 看看有几个模型 / 图片
   const showNum = useMemo(() => {
     const arr = [1];
@@ -93,7 +85,7 @@ function GoodsInfo({ info, colseFu, type }: Props) {
     <div
       className={styles.GoodsInfo}
       style={{
-        backgroundImage: `url(${baseURL}/3Goods/pc/${imgBac})`,
+        backgroundImage: `url(${baseURL}/3Goods/pc/bac.jpg)`,
       }}
     >
       <img onClick={colseFu} className="A3IBack" src={backImg} alt="" />

+ 1 - 8
src/pages/A3Goods/index.tsx

@@ -33,13 +33,6 @@ function A3Goods() {
   // 左侧馆的筛选
   const [type1, setType1] = useState("全部");
 
-  // 背景图
-  const imgBac = useMemo(() => {
-    const info = type1Arr1.find((v) => v.name === type1);
-    if (info) return `tab${info.id}Bac.jpg`;
-    else return "";
-  }, [type1]);
-
   // 右侧类别的筛选
   const [type2, setType2] = useState("全部类别");
 
@@ -99,7 +92,7 @@ function A3Goods() {
     <div
       className={styles.A3Goods}
       style={{
-        backgroundImage: `url(${baseURL}/3Goods/pc/${imgBac})`,
+        backgroundImage: `url(${baseURL}/3Goods/pc/bac.jpg)`,
       }}
     >
       {/* 顶部 */}

+ 2 - 8
src/pages/A3GoodsM/GoodsInfoM/index.tsx

@@ -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">

+ 1 - 8
src/pages/A3GoodsM/index.tsx

@@ -32,13 +32,6 @@ function A3GoodsM() {
 
   const [type1, setType1] = useState("全部馆藏");
 
-  // 背景图
-  const imgBac = useMemo(() => {
-    const info = type1Arr1M.find((v) => v.name === type1);
-    if (info) return `tab${info.id}Bac.jpg`;
-    else return "";
-  }, [type1]);
-
   // 输入框
   const inputRef = useRef<any>(null);
   const [searchKey, setSearchKey] = useState(-1);
@@ -126,7 +119,7 @@ function A3GoodsM() {
       id="A3GoodsM"
       className={styles.A3GoodsM}
       style={{
-        backgroundImage: `url(${baseURL}/3Goods/mobile/${imgBac})`,
+        backgroundImage: `url(${baseURL}/3Goods/mobile/bac.jpg)`,
       }}
     >
       <div