Commit 642ef97c authored by 周宏民's avatar 周宏民

fix: 演示环境 修改 动画效果造成文字显示模糊的问题

parent 032d7638
Pipeline #90007 waiting for manual action with stages
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: hongmye * @Author: hongmye
* @Date: 2023-01-10 11:18:55 * @Date: 2023-01-10 11:18:55
*/ */
import React, { memo, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import Iframe from 'react-iframe'; import Iframe from 'react-iframe';
import Empty from '@wisdom-components/empty'; import Empty from '@wisdom-components/empty';
import axios from 'axios'; import axios from 'axios';
...@@ -13,8 +13,18 @@ import { decode, encode } from 'js-base64'; ...@@ -13,8 +13,18 @@ import { decode, encode } from 'js-base64';
import styles from './index.less'; import styles from './index.less';
const IframeContainer = props => { const IframeContainer = props => {
const { linkUrl, onMessageBack, loading } = props; const { linkUrl, onMessageBack, loading } = props;
const [showBackBtn, setShowBackBtn] = useState(true); // 是否显示iframe 返回按钮,三维平台用
const onMessage = e => { const onMessage = e => {
console.log('onMessageBack ~ data:', e?.data);
if (e?.data.type === 'showBack') {
!showBackBtn && setShowBackBtn(true);
return;
}
if (e?.data.type === 'hideBack') {
showBackBtn && setShowBackBtn(false);
return;
}
onMessageBack && onMessageBack(e?.data); onMessageBack && onMessageBack(e?.data);
}; };
const onError = e => { const onError = e => {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
.r_title_wrap { .r_title_wrap {
width: 100%; width: 100%;
height: 123px; height: 123px;
background: url('@{imgSrc}/全行业软硬件系统解决方案.png') no-repeat center center; background: url('@{imgSrc}/新产品动态bg.png') no-repeat center center;
background-size: 100% 100%; background-size: 100% 100%;
padding: 30px 0 0 25px; padding: 30px 0 0 25px;
...@@ -53,13 +53,14 @@ ...@@ -53,13 +53,14 @@
width: 370px; width: 370px;
height: 48px; height: 48px;
font-size: 16px; font-size: 16px;
letter-spacing: 1px;
text-align: center; text-align: center;
font-weight: bold; font-weight: bold;
line-height: 46px; line-height: 46px;
position: relative; position: relative;
left: 0; left: 0;
color: #fff;
transition: all 0.3s; transition: all 0.3s;
filter: brightness(90%)
} }
.r_list_item[type='jump'] { .r_list_item[type='jump'] {
...@@ -110,10 +111,12 @@ ...@@ -110,10 +111,12 @@
background: url('@{imgSrc}/bg5.png') no-repeat left center; background: url('@{imgSrc}/bg5.png') no-repeat left center;
background-size: 100% 100%; background-size: 100% 100%;
} }
.r_list_item[rIndex='r_0'] { .r_list_item[rIndex='r_0'] {
background: url('@{imgSrc}/bg6.png') no-repeat left center; background: url('@{imgSrc}/bg6.png') no-repeat left center;
background-size: 100% 100%; background-size: 100% 100%;
} }
.r_list_item[name='敬请期待'] { .r_list_item[name='敬请期待'] {
background: url('@{imgSrc}/敬请期待.png') no-repeat left center; background: url('@{imgSrc}/敬请期待.png') no-repeat left center;
background-size: 100% 100%; background-size: 100% 100%;
......
...@@ -17,7 +17,10 @@ import 'swiper/components/pagination/pagination.min.css'; ...@@ -17,7 +17,10 @@ import 'swiper/components/pagination/pagination.min.css';
import 'swiper/components/effect-coverflow/effect-coverflow.min.css'; import 'swiper/components/effect-coverflow/effect-coverflow.min.css';
import 'swiper/swiper.min.css'; import 'swiper/swiper.min.css';
import styles from './index.less'; import styles from './index.less';
const autoplay = 15000; const autoplay = {
delay: 15000,
disableOnInteraction: false,
};
SwiperCore.use([Autoplay, Pagination, Navigation, Mousewheel, EffectCoverflow]); SwiperCore.use([Autoplay, Pagination, Navigation, Mousewheel, EffectCoverflow]);
const VideoItem = (props, ref) => { const VideoItem = (props, ref) => {
const { selectKey = '', setSelectKey, showContent } = props; const { selectKey = '', setSelectKey, showContent } = props;
...@@ -83,10 +86,7 @@ const VideoItem = (props, ref) => { ...@@ -83,10 +86,7 @@ const VideoItem = (props, ref) => {
<div className={classNames(styles.video_list, 'dt_video_list')}> <div className={classNames(styles.video_list, 'dt_video_list')}>
<Swiper <Swiper
slidesPerView="auto" slidesPerView="auto"
autoplay={{ autoplay={showVideo ? autoplay : false}
delay: autoplay,
disableOnInteraction: false,
}}
loop loop
height={450} height={450}
direction="horizontal" direction="horizontal"
......
...@@ -10,14 +10,10 @@ ...@@ -10,14 +10,10 @@
import { DoubleLeftOutlined, FullscreenExitOutlined, FullscreenOutlined, RightOutlined } from '@ant-design/icons'; import { DoubleLeftOutlined, FullscreenExitOutlined, FullscreenOutlined, RightOutlined } from '@ant-design/icons';
import backImg from '@/assets/images/demonstration/返回.png'; import backImg from '@/assets/images/demonstration/返回.png';
import arrowLeftImg from '@/assets/images/demonstration/左箭头.png'; import arrowLeftImg from '@/assets/images/demonstration/左箭头.png';
import Cookies from 'js-cookie';
import QueueAnim from 'rc-queue-anim';
import { Button, Spin, message, Progress } from 'antd'; import { Button, message } from 'antd';
import React, { useMemo, useState, useEffect, useRef } from 'react'; import React, { useMemo, useState, useEffect, useRef } from 'react';
import { cloneDeep, debounce } from 'lodash'; import { cloneDeep, debounce } from 'lodash';
import { useHistory, useAliveController } from '@wisdom-utils/runtime';
import { appService } from '@/api'; import { appService } from '@/api';
import { actionCreators } from '@/containers/App/store'; import { actionCreators } from '@/containers/App/store';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
...@@ -34,11 +30,9 @@ import RightItem from './components/Right'; ...@@ -34,11 +30,9 @@ import RightItem from './components/Right';
import BottomItem from './components/Bottom'; import BottomItem from './components/Bottom';
import { platformData } from './components/configData'; import { platformData } from './components/configData';
const boxWidth = 1920; const boxWidth = 1920;
const boxHeight = 911; const boxHeight = 910;
const Demonstration = props => { const Demonstration = props => {
const history = useHistory();
const { clear } = useAliveController();
const onLineUrl = window.globalConfig?.mainserver || 'https://panda-water.cn/'; const onLineUrl = window.globalConfig?.mainserver || 'https://panda-water.cn/';
const showFullScreen = true; const showFullScreen = true;
const videoRef = useRef(null); const videoRef = useRef(null);
...@@ -56,7 +50,7 @@ const Demonstration = props => { ...@@ -56,7 +50,7 @@ const Demonstration = props => {
const [selectKey, setSelectKey] = useState('供水产品'); const [selectKey, setSelectKey] = useState('供水产品');
const [boxSize, setBoxSize] = useState({ const [boxSize, setBoxSize] = useState({
scale: 1, scale: 1,
boxHeight: 911, boxHeight: 910,
}); });
const [linkUrl, setLinkUrl] = useState(''); const [linkUrl, setLinkUrl] = useState('');
const [projectData, setProjectData] = useState([]); const [projectData, setProjectData] = useState([]);
...@@ -139,7 +133,6 @@ const Demonstration = props => { ...@@ -139,7 +133,6 @@ const Demonstration = props => {
}; };
const onMessageBack = data => { const onMessageBack = data => {
if (!data?.type) return; if (!data?.type) return;
console.log('🚀 ~ data:', data);
if (data?.type === 'runAfterFirstMounted' || data?.type === 'loginSuccess') { if (data?.type === 'runAfterFirstMounted' || data?.type === 'loginSuccess') {
jumpProgressEnd(); jumpProgressEnd();
setTimeout(() => { setTimeout(() => {
...@@ -201,6 +194,11 @@ const Demonstration = props => { ...@@ -201,6 +194,11 @@ const Demonstration = props => {
if (poor > 0.05) { if (poor > 0.05) {
bHeight = boxHeight + 30; bHeight = boxHeight + 30;
} }
// 高度为偶数
bHeight = parseInt(bHeight, 10);
if (bHeight % 2 !== 0) {
bHeight += 1;
}
n = Number(n.toFixed(4)); n = Number(n.toFixed(4));
setBoxSize({ setBoxSize({
scale: n, scale: n,
......
...@@ -128,6 +128,7 @@ ...@@ -128,6 +128,7 @@
justify-content: space-between; justify-content: space-between;
align-items: flex-end; align-items: flex-end;
flex: none; flex: none;
height: 50px;
.top_l { .top_l {
width: 376px; width: 376px;
...@@ -150,11 +151,13 @@ ...@@ -150,11 +151,13 @@
} }
.top_r { .top_r {
width: 281px; width: 376px;
height: 35px; height: 35px;
display: flex;
justify-content: flex-end;
.top_r_text { .top_r_text {
width: 100%; width: 281px;
height: 35px; height: 35px;
line-height: 35px; line-height: 35px;
padding-left: 60px; padding-left: 60px;
...@@ -190,6 +193,7 @@ ...@@ -190,6 +193,7 @@
overflow: hidden; overflow: hidden;
z-index: 10; z-index: 10;
flex: none; flex: none;
height: 478px;
.row_l { .row_l {
width: 372px; width: 372px;
...@@ -209,6 +213,7 @@ ...@@ -209,6 +213,7 @@
.center_wrap { .center_wrap {
position: relative; position: relative;
flex: none; flex: none;
height: 96px;
} }
.center_tip { .center_tip {
......
...@@ -395,5 +395,9 @@ ...@@ -395,5 +395,9 @@
.@{ant-prefix}-tabs-tab-disabled { .@{ant-prefix}-tabs-tab-disabled {
color: rgba(255, 255, 255, 0.8) !important; color: rgba(255, 255, 255, 0.8) !important;
} }
.@{ant-prefix}-input-password-icon.anticon {
color: rgba(255, 255, 255, 1) !important;
}
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment