Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivWeb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivWeb
Commits
d11b162d
Commit
d11b162d
authored
Mar 28, 2025
by
周宏民
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pref: 演示引导页添加 介绍视频
parent
ab364750
Pipeline
#96581
passed with stages
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
94 additions
and
10 deletions
+94
-10
武汉研发中心.png
src/assets/images/demonstration/武汉研发中心.png
+0
-0
index.js
...age/template/demonstration/components/VideoModal/index.js
+47
-0
index.less
...e/template/demonstration/components/VideoModal/index.less
+28
-0
index.js
src/pages/bootpage/template/demonstration/index.js
+8
-1
index.less
src/pages/bootpage/template/demonstration/index.less
+11
-9
No files found.
src/assets/images/demonstration/武汉研发中心.png
0 → 100644
View file @
d11b162d
This diff was suppressed by a .gitattributes entry.
src/pages/bootpage/template/demonstration/components/VideoModal/index.js
0 → 100644
View file @
d11b162d
/*
* @Title:
* @Author: hongmye
* @Date: 2025-03-28 11:18:55
*/
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
Modal
}
from
'antd'
;
import
classNames
from
'classnames'
;
import
styles
from
'./index.less'
;
const
videoUrl
=
'https://panda-water.cn/video/companyIntroduction.mp4'
;
const
IframeContainer
=
props
=>
{
const
{
loading
,
isVideoModal
,
setIsVideoModal
}
=
props
;
const
videoRef
=
useRef
(
null
);
const
width
=
1400
;
useEffect
(()
=>
{
if
(
videoRef
.
current
)
{
if
(
isVideoModal
)
{
videoRef
.
current
.
paused
&&
videoRef
.
current
.
play
();
}
else
{
!
videoRef
.
current
.
paused
&&
videoRef
.
current
.
pause
();
}
}
},
[
isVideoModal
]);
return
(
<>
<
Modal
style
=
{{
top
:
'60px'
}}
wrapClassName
=
{
classNames
(
styles
.
videoModal
,
'demonstration_video_modal'
)}
title
=
{
null
}
visible
=
{
isVideoModal
}
open
=
{
isVideoModal
}
footer
=
{
null
}
width
=
{
width
}
onCancel
=
{()
=>
{
setIsVideoModal
(
false
);
}}
>
<
video
ref
=
{
videoRef
}
width
=
{
width
}
autoPlay
=
"autoPlay"
muted
controls
src
=
{
videoUrl
}
loop
/>
<
/Modal
>
<
/
>
);
};
export
default
IframeContainer
;
src/pages/bootpage/template/demonstration/components/VideoModal/index.less
0 → 100644
View file @
d11b162d
:global {
.demonstration_video_modal {
.@{ant-prefix}-modal-content {
background: transparent;
}
.@{ant-prefix}-modal-body {
border-radius: 10px;
overflow: hidden;
padding: 0;
}
.@{ant-prefix}-modal-close {
top: -40px;
right: -40px;
color: #fff;
transition: all 0.2s;
}
.@{ant-prefix}-modal-close:hover {
color: #fff;
transform: scale(1.5);
transform-origin: center center;
}
}
}
\ No newline at end of file
src/pages/bootpage/template/demonstration/index.js
View file @
d11b162d
...
@@ -29,6 +29,7 @@ import Iframe from './components/Iframe';
...
@@ -29,6 +29,7 @@ import Iframe from './components/Iframe';
import
RightItem
from
'./components/Right'
;
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'
;
import
VideoModal
from
'./components/VideoModal'
;
const
boxWidth
=
1920
;
const
boxWidth
=
1920
;
const
boxHeight
=
910
;
const
boxHeight
=
910
;
...
@@ -50,6 +51,7 @@ const Demonstration = props => {
...
@@ -50,6 +51,7 @@ const Demonstration = props => {
const
[
projectConfig
,
setProjectConfig
]
=
useState
({});
// 项目案例是否可免密跳转
const
[
projectConfig
,
setProjectConfig
]
=
useState
({});
// 项目案例是否可免密跳转
const
[
showContent
,
setShowContent
]
=
useState
(
false
);
const
[
showContent
,
setShowContent
]
=
useState
(
false
);
const
[
jumpLoading
,
setJumpLoading
]
=
useState
(
false
);
const
[
jumpLoading
,
setJumpLoading
]
=
useState
(
false
);
const
[
isVideoModal
,
setIsVideoModal
]
=
useState
(
false
);
const
[
selectKey
,
setSelectKey
]
=
useState
(
'供水产品'
);
const
[
selectKey
,
setSelectKey
]
=
useState
(
'供水产品'
);
const
[
boxSize
,
setBoxSize
]
=
useState
({
const
[
boxSize
,
setBoxSize
]
=
useState
({
scale
:
1
,
scale
:
1
,
...
@@ -500,6 +502,10 @@ const Demonstration = props => {
...
@@ -500,6 +502,10 @@ const Demonstration = props => {
const
onendLoading
=
()
=>
{
const
onendLoading
=
()
=>
{
jumpProgressEnd
();
jumpProgressEnd
();
};
};
const
onOpenVideo
=
()
=>
{
// if (!productConfig?.['熊猫武汉研发中心']) return message.warning('该账号没有权限,请联系管理员');
setIsVideoModal
(
true
);
};
const
iframeItem
=
useMemo
(()
=>
{
const
iframeItem
=
useMemo
(()
=>
{
if
(
!
linkUrl
)
return
null
;
if
(
!
linkUrl
)
return
null
;
return
(
return
(
...
@@ -646,7 +652,7 @@ const Demonstration = props => {
...
@@ -646,7 +652,7 @@ const Demonstration = props => {
<
div
className
=
{
styles
.
top_c_title
}
>
熊猫智慧水务一体化解决方案
<
/div
>
<
div
className
=
{
styles
.
top_c_title
}
>
熊猫智慧水务一体化解决方案
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
{
styles
.
top_r
}
>
<
div
className
=
{
styles
.
top_r
}
>
<
div
className
=
{
styles
.
top_r_text
}
>-
引领中国智慧水务
-<
/div
>
<
div
className
=
{
styles
.
top_r_text
}
onClick
=
{
onOpenVideo
}
/
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -716,6 +722,7 @@ const Demonstration = props => {
...
@@ -716,6 +722,7 @@ const Demonstration = props => {
<
/div
>
<
/div
>
)
:
null
}
)
:
null
}
{
iframeItem
}
{
iframeItem
}
<
VideoModal
isVideoModal
=
{
isVideoModal
}
setIsVideoModal
=
{
setIsVideoModal
}
/
>
<
/div
>
<
/div
>
);
);
};
};
...
...
src/pages/bootpage/template/demonstration/index.less
View file @
d11b162d
...
@@ -196,18 +196,20 @@
...
@@ -196,18 +196,20 @@
.top_r {
.top_r {
width: 376px;
width: 376px;
height: 35px;
height: 35px;
display: flex;
position: relative;
justify-content: flex-end;
.top_r_text {
.top_r_text {
width: 281px;
width: 218px;
height: 35px;
height: 62px;
line-height: 35px;
background: url('@{imgSrc}/武汉研发中心.png') no-repeat center center;
padding-left: 60px;
background: url('@{imgSrc}/引领中国智慧水务.png') no-repeat center center;
background-size: 100% 100%;
background-size: 100% 100%;
font-size: 15px;
cursor: pointer;
letter-spacing: 3px;
position: absolute;
right: 42px;
top: -12px;
}
.top_r_text:active{
opacity: 0.8;
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment