From aa275367ed30102b4875fda5070cb39a41165d93 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Mon, 31 Jul 2023 16:12:29 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=AF=E9=9D=A2=E6=89=A7=E6=B3=95=E7=9B=91?= =?UTF-8?q?=E6=8E=A7=20=E4=BD=86=E8=A7=86=E9=A2=91=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../footer/leadership/centerleft/daolu.js | 1 - .../footer/leadership/centerleft/hudong.js | 5 +- .../footer/leadership/left/left-center.js | 20 +-- .../footer/leadership/right/hudongVideo.js | 137 ++++++++++-------- 4 files changed, 87 insertions(+), 76 deletions(-) diff --git a/web/client/src/sections/quanju/containers/footer/leadership/centerleft/daolu.js b/web/client/src/sections/quanju/containers/footer/leadership/centerleft/daolu.js index 807f1dc1..ed949479 100644 --- a/web/client/src/sections/quanju/containers/footer/leadership/centerleft/daolu.js +++ b/web/client/src/sections/quanju/containers/footer/leadership/centerleft/daolu.js @@ -34,7 +34,6 @@ const Right = (props) => { // const }) }, []) - console.log("1211", nums); const renderBody = () => { return ( diff --git a/web/client/src/sections/quanju/containers/footer/leadership/centerleft/hudong.js b/web/client/src/sections/quanju/containers/footer/leadership/centerleft/hudong.js index 4d01525f..a78f90fc 100644 --- a/web/client/src/sections/quanju/containers/footer/leadership/centerleft/hudong.js +++ b/web/client/src/sections/quanju/containers/footer/leadership/centerleft/hudong.js @@ -45,11 +45,9 @@ class ReactCarousel extends Component { // arr1: "" dizhi: localStorage.getItem("qndmn") } - console.log(this.props.shuzu); this.state.imgs = this.props.shuzu.filter((item) => { return item.imgs !== "" }) - } @@ -80,7 +78,8 @@ class ReactCarousel extends Component { diff --git a/web/client/src/sections/quanju/containers/footer/leadership/left/left-center.js b/web/client/src/sections/quanju/containers/footer/leadership/left/left-center.js index 7587bf57..faf4302b 100644 --- a/web/client/src/sections/quanju/containers/footer/leadership/left/left-center.js +++ b/web/client/src/sections/quanju/containers/footer/leadership/left/left-center.js @@ -28,16 +28,16 @@ const Leftcenter = ({ videoCenterList }) => { }, [videoCenterList]) useEffect(() => { - const timer = setInterval(() => { - if (num == list.length) { - setNum(1); - // setTu(list[0].img); - } else { - setNum(num + 1); - // setTu(list[num].img); - } - }, 1000 * 60 * 5); - return () => clearInterval(timer); + // const timer = setInterval(() => { + // if (num == list.length) { + // setNum(1); + // // setTu(list[0].img); + // } else { + // setNum(num + 1); + // // setTu(list[num].img); + // } + // }, 1000 * 60 * 5); + // return () => clearInterval(timer); }, [num]); const renderBody = () => { diff --git a/web/client/src/sections/quanju/containers/footer/leadership/right/hudongVideo.js b/web/client/src/sections/quanju/containers/footer/leadership/right/hudongVideo.js index ce22bfba..412ee694 100644 --- a/web/client/src/sections/quanju/containers/footer/leadership/right/hudongVideo.js +++ b/web/client/src/sections/quanju/containers/footer/leadership/right/hudongVideo.js @@ -50,80 +50,93 @@ class ReactCarousel extends Component { } render () { - const { imgs } = this.state + const { imgs, showIndex } = this.state return (
{ this.stop() }} //鼠标进入停止自动播放 onMouseLeave={() => { this.start() }} //鼠标退出自动播放 > -
    + { + imgs[showIndex] ? +
    + {this.renderVideo(imgs[showIndex], showIndex)} +
    +
    + + {imgs[showIndex]?.deviceName} +
    +
    +
    + : '' + } + {/*
      { - this.state.imgs.map((value, index) => { - return ( -
    • - { - imgs.map((value, index) => { - if (index == 0) { - return value?.deviceSerial ?
      - {this.renderVideo(value, index)} -
      -
      - - {value?.deviceName} -
      -
      -
      : '' - } else if (index == 1) { - return value?.deviceSerial ?
      - {this.renderVideo(value, index)} -
      -
      - - {value?.deviceName} -
      -
      -
      : "" - } else if (index == 2) { - return value?.deviceSerial ?
      - {this.renderVideo(value, index)} -
      -
      - - {value?.deviceName} -
      -
      -
      : "" - } else if (index == 3) { - return value?.deviceSerial ?
      - {this.renderVideo(value, index)} -
      -
      - - {value?.deviceName} -
      -
      -
      : "" - } else { - return undefined - } - }) - } -
    • - ) - }) + // this.state.imgs.map((value, index) => { + // return ( + //
    • + // { + // imgs.map((value, index) => { + // if (index == 0) { + // return value?.deviceSerial ?
      + // {this.renderVideo(value, index)} + //
      + //
      + // + // {value?.deviceName} + //
      + //
      + //
      : '' + // } else if (index == 1) { + // return value?.deviceSerial ?
      + // {this.renderVideo(value, index)} + //
      + //
      + // + // {value?.deviceName} + //
      + //
      + //
      : "" + // } else if (index == 2) { + // return value?.deviceSerial ?
      + // {this.renderVideo(value, index)} + //
      + //
      + // + // {value?.deviceName} + //
      + //
      + //
      : "" + // } else if (index == 3) { + // return value?.deviceSerial ?
      + // {this.renderVideo(value, index)} + //
      + //
      + // + // {value?.deviceName} + //
      + //
      + //
      : "" + // } else { + // return undefined + // } + // }) + // } + //
    • + // ) + // }) } -
    - {/*
    - { this.previous(e) }}> +
*/} +
+ { this.previous(e) }}> - { this.next(e) }}> + { this.next(e) }}> -
*/} +
)