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
d37ae2d2
Commit
d37ae2d2
authored
Mar 05, 2025
by
周宏民
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pref: 演示过渡页添加 宣传页
parent
13c1765f
Pipeline
#95987
passed with stages
Changes
6
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
115 additions
and
11 deletions
+115
-11
jumpBtn.png
src/assets/images/demonstration/jumpBtn.png
+0
-0
index.js
...ootpage/template/demonstration/components/Bottom/index.js
+1
-1
index.js
.../bootpage/template/demonstration/components/Left/index.js
+1
-1
index.js
...bootpage/template/demonstration/components/Right/index.js
+1
-1
index.js
src/pages/bootpage/template/demonstration/index.js
+75
-8
index.less
src/pages/bootpage/template/demonstration/index.less
+37
-0
No files found.
src/assets/images/demonstration/jumpBtn.png
0 → 100644
View file @
d37ae2d2
This diff was suppressed by a .gitattributes entry.
src/pages/bootpage/template/demonstration/components/Bottom/index.js
View file @
d37ae2d2
...
@@ -25,7 +25,7 @@ const BottomItem = props => {
...
@@ -25,7 +25,7 @@ const BottomItem = props => {
const
toPage
=
(
url
,
col
)
=>
{
const
toPage
=
(
url
,
col
)
=>
{
if
(
!
url
.
includes
(
'https'
))
return
;
if
(
!
url
.
includes
(
'https'
))
return
;
if
(
!
url
.
includes
(
'user/noscret'
)
||
projectConfig
[
col
[
'平台名称'
]])
{
if
(
!
url
.
includes
(
'user/noscret'
)
||
projectConfig
[
col
[
'平台名称'
]])
{
return
handToPage
(
url
);
return
handToPage
(
url
,
col
[
'平台名称'
]
);
}
}
message
.
warning
(
'该账号没有权限,请联系管理人员'
);
message
.
warning
(
'该账号没有权限,请联系管理人员'
);
};
};
...
...
src/pages/bootpage/template/demonstration/components/Left/index.js
View file @
d37ae2d2
...
@@ -17,7 +17,7 @@ const LeftItem = props => {
...
@@ -17,7 +17,7 @@ const LeftItem = props => {
if
(
row
?.[
'产品地址'
])
{
if
(
row
?.[
'产品地址'
])
{
if
(
!
row
[
'产品地址'
].
includes
(
'https'
))
return
message
.
warning
(
'产品地址配置错误,请联系管理人员'
);
if
(
!
row
[
'产品地址'
].
includes
(
'https'
))
return
message
.
warning
(
'产品地址配置错误,请联系管理人员'
);
handToProduct
(
row
[
'产品地址'
],
row
[
'产品名称'
]);
handToProduct
(
row
[
'产品地址'
],
row
[
'产品名称'
]
,
row
[
'产品类型'
]
);
}
else
{
}
else
{
return
message
.
warning
(
'未配置产品地址,请联系管理人员'
);
return
message
.
warning
(
'未配置产品地址,请联系管理人员'
);
}
}
...
...
src/pages/bootpage/template/demonstration/components/Right/index.js
View file @
d37ae2d2
...
@@ -16,7 +16,7 @@ const RightItem = props => {
...
@@ -16,7 +16,7 @@ const RightItem = props => {
if
(
!
row
[
'产品地址'
].
includes
(
'https'
))
return
message
.
warning
(
'产品地址配置错误,请联系管理人员'
);
if
(
!
row
[
'产品地址'
].
includes
(
'https'
))
return
message
.
warning
(
'产品地址配置错误,请联系管理人员'
);
if
(
row
[
'产品地址'
]
&&
row
[
'产品地址'
].
includes
(
'https'
))
{
if
(
row
[
'产品地址'
]
&&
row
[
'产品地址'
].
includes
(
'https'
))
{
handToProduct
(
row
[
'产品地址'
],
row
[
'产品名称'
]);
handToProduct
(
row
[
'产品地址'
],
row
[
'产品名称'
]
,
row
[
'产品名称'
]
);
}
}
};
};
const
renderRow
=
(
row
,
index
)
=>
{
const
renderRow
=
(
row
,
index
)
=>
{
...
...
src/pages/bootpage/template/demonstration/index.js
View file @
d37ae2d2
...
@@ -53,6 +53,8 @@ const Demonstration = props => {
...
@@ -53,6 +53,8 @@ const Demonstration = props => {
boxHeight
:
910
,
boxHeight
:
910
,
});
});
const
[
linkUrl
,
setLinkUrl
]
=
useState
(
''
);
const
[
linkUrl
,
setLinkUrl
]
=
useState
(
''
);
const
[
pageData
,
setPageData
]
=
useState
({});
// 宣传页配置
const
[
transitionImg
,
setTransitionImg
]
=
useState
(
''
);
// 宣传页过渡图
const
[
projectData
,
setProjectData
]
=
useState
([]);
const
[
projectData
,
setProjectData
]
=
useState
([]);
const
[
configData
,
setConfigData
]
=
useState
([]);
const
[
configData
,
setConfigData
]
=
useState
([]);
const
[
productData
,
setProductData
]
=
useState
([]);
const
[
productData
,
setProductData
]
=
useState
([]);
...
@@ -94,6 +96,15 @@ const Demonstration = props => {
...
@@ -94,6 +96,15 @@ const Demonstration = props => {
}
}
},
100
);
},
100
);
};
};
const
startLoading
=
name
=>
{
console
.
log
(
'🚀 ~ name:'
,
name
,
pageData
[
name
]);
if
(
pageData
?.[
name
])
{
setTransitionImg
(
pageData
[
name
]);
}
else
{
setJumpLoading
(
true
);
jumpProgressStart
();
}
};
const
jumpProgressEnd
=
()
=>
{
const
jumpProgressEnd
=
()
=>
{
setProgressValue2
(
100
);
setProgressValue2
(
100
);
timer2
.
current
&&
clearInterval
(
timer2
.
current
);
timer2
.
current
&&
clearInterval
(
timer2
.
current
);
...
@@ -110,11 +121,10 @@ const Demonstration = props => {
...
@@ -110,11 +121,10 @@ const Demonstration = props => {
timer2
.
current
=
null
;
timer2
.
current
=
null
;
},
time
*
1000
);
},
time
*
1000
);
};
};
const
handToProduct
=
(
url
,
name
)
=>
{
const
handToProduct
=
(
url
,
name
,
type
)
=>
{
console
.
log
(
'🚀 ~ url, name:'
,
url
,
name
,
productConfig
);
console
.
log
(
'🚀 ~ url, name:'
,
url
,
name
,
type
,
productConfig
);
if
(
!
productConfig
?.[
name
])
return
message
.
warning
(
'该账号没有权限,请联系管理员'
);
if
(
!
productConfig
?.[
name
])
return
message
.
warning
(
'该账号没有权限,请联系管理员'
);
setJumpLoading
(
true
);
startLoading
(
type
);
jumpProgressStart
();
setLinkUrl
(
url
);
setLinkUrl
(
url
);
let
time
=
15
;
let
time
=
15
;
...
@@ -166,11 +176,10 @@ const Demonstration = props => {
...
@@ -166,11 +176,10 @@ const Demonstration = props => {
}
}
};
};
const
handToPage
=
url
=>
{
const
handToPage
=
(
url
,
name
)
=>
{
if
(
!
url
)
return
message
.
warning
(
'该环境未配置,请联系管理员'
);
if
(
!
url
)
return
message
.
warning
(
'该环境未配置,请联系管理员'
);
if
(
!
url
.
includes
(
'https'
))
return
;
if
(
!
url
.
includes
(
'https'
))
return
;
setJumpLoading
(
true
);
startLoading
(
name
);
jumpProgressStart
();
setLinkUrl
(
url
);
setLinkUrl
(
url
);
startTiming
(
4
);
startTiming
(
4
);
};
};
...
@@ -334,6 +343,52 @@ const Demonstration = props => {
...
@@ -334,6 +343,52 @@ const Demonstration = props => {
setProductConfig
(
obj
);
setProductConfig
(
obj
);
});
});
};
};
const
imgLoad
=
data
=>
new
Promise
((
resolve
,
reject
)
=>
{
const
img
=
new
Image
();
img
.
src
=
data
.
url
;
img
.
onload
=
()
=>
{
resolve
(
data
);
};
img
.
onerror
=
()
=>
{
resolve
(
null
);
};
});
const
getConfig
=
()
=>
{
const
params
=
{
ignoreSite
:
true
,
accountName
:
'宣传页'
,
isAll
:
true
,
};
appService
.
getAccountPageList
(
params
).
then
(
res
=>
{
const
dataStr1
=
res
?.
data
?.
jsonData
||
''
;
const
data1
=
dataStr1
?
JSON
.
parse
(
dataStr1
)
:
[];
const
obj
=
{};
const
reqArr
=
[];
data1
.
forEach
(
d
=>
{
const
key
=
d
[
'名称'
];
if
(
key
)
{
const
url
=
`/PandaWorkFlow/WorkFlow/AccountManage/DownloadFiles?filePath=
${
d
[
'图片'
]}
`
;
reqArr
.
push
(
imgLoad
({
name
:
key
,
url
,
}),
);
}
});
Promise
.
all
(
reqArr
).
then
(
result
=>
{
if
(
result
.
length
>
0
)
{
result
.
forEach
(
r
=>
{
if
(
r
)
{
obj
[
r
.
name
]
=
r
.
url
;
}
});
setPageData
(
obj
);
}
});
});
};
const
getData
=
()
=>
{
const
getData
=
()
=>
{
setLoading
(
true
);
setLoading
(
true
);
const
req1
=
appService
.
getAccountPageList
({
const
req1
=
appService
.
getAccountPageList
({
...
@@ -399,8 +454,12 @@ const Demonstration = props => {
...
@@ -399,8 +454,12 @@ const Demonstration = props => {
setNewProductData
(
newList
);
setNewProductData
(
newList
);
setLoading
(
false
);
setLoading
(
false
);
getConfig
();
});
});
};
};
const
onEndPage
=
()
=>
{
setTransitionImg
(
''
);
};
const
onendLoading
=
()
=>
{
const
onendLoading
=
()
=>
{
jumpProgressEnd
();
jumpProgressEnd
();
};
};
...
@@ -498,7 +557,15 @@ const Demonstration = props => {
...
@@ -498,7 +557,15 @@ const Demonstration = props => {
</div>
</div>
</div>
</div>
) : null} */
}
) : null} */
}
{
jumpLoading
?
(
{
transitionImg
?
(
<
div
className
=
{
styles
.
demonstrationLoadPage
}
key
=
"jumpLoading"
>
<
div
className
=
{
styles
.
demonstrationLoadPageImg
}
>
<
img
src
=
{
transitionImg
}
alt
=
""
/>
<
div
className
=
{
classNames
(
styles
.
demonstrationLoadPageBtn
)}
onClick
=
{
onEndPage
}
/
>
<
/div
>
<
/div
>
)
:
null
}
{
jumpLoading
&&
!
transitionImg
?
(
<
div
className
=
{
styles
.
demonstrationLoad
}
key
=
"jumpLoading"
>
<
div
className
=
{
styles
.
demonstrationLoad
}
key
=
"jumpLoading"
>
<
div
style
=
{{
width
:
'285px'
}}
>
<
div
style
=
{{
width
:
'285px'
}}
>
<
LoadPage
percent
=
{
progressValue2
/
100
}
text
=
"页面加载中~"
/>
<
LoadPage
percent
=
{
progressValue2
/
100
}
text
=
"页面加载中~"
/>
...
...
src/pages/bootpage/template/demonstration/index.less
View file @
d37ae2d2
...
@@ -83,6 +83,42 @@
...
@@ -83,6 +83,42 @@
}
}
.demonstrationLoadPage {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 1090;
overflow-y: auto;
}
.demonstrationLoadPageImg {
height: auto;
width: 100%;
position: relative;
img {
width: 100%;
}
.demonstrationLoadPageBtn {
position: absolute;
bottom: 15px;
left: calc(50% - 188px);
width: 376px;
height: 90px;
background: url('@{imgSrc}/jumpBtn.png') no-repeat center center;
background-size: 100% 100%;
z-index: 1095;
cursor: pointer;
transition: all 0.2s;
}
.demonstrationLoadPageBtn:hover {
transform: scale(1.1);
}
}
.demonstrationLoad {
.demonstrationLoad {
width: 100%;
width: 100%;
...
@@ -417,3 +453,4 @@
...
@@ -417,3 +453,4 @@
-webkit-animation: scale-in-center .3s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
-webkit-animation: scale-in-center .3s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
animation: scale-in-center .3s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
animation: scale-in-center .3s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}
}
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