Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
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
CivManage
Commits
5b8b85d6
Commit
5b8b85d6
authored
Apr 26, 2023
by
涂伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '手持配置新增'
parent
fa85fdea
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
86 additions
and
1 deletion
+86
-1
context.jsx
src/components/Upload/context.jsx
+2
-1
index.tsx
src/components/Upload/index.tsx
+7
-0
SiteConfig.jsx
src/pages/productCenter/mobileConfig/SiteConfig.jsx
+37
-0
addConfig.jsx
src/pages/productCenter/mobileConfig/addConfig.jsx
+40
-0
No files found.
src/components/Upload/context.jsx
View file @
5b8b85d6
...
...
@@ -14,7 +14,7 @@ const PictureWallProvider = props => {
const
[
imgBed
,
setImgBed
]
=
useState
([]);
const
update
=
()
=>
getImageBases
(
'icon,androidMenu,menuNew,logo,CityTemp'
)
getImageBases
(
'icon,androidMenu,menuNew,logo,CityTemp
,bootAnimation,loginPageImage,homePageImage
'
)
.
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
const
{
data
}
=
res
;
...
...
@@ -27,6 +27,7 @@ const PictureWallProvider = props => {
}
});
setImgBed
(
arr
);
console
.
log
(
data
,
arr
,
'6666666666666666666666'
);
}
})
.
catch
(
err
=>
{
...
...
src/components/Upload/index.tsx
View file @
5b8b85d6
...
...
@@ -29,6 +29,9 @@ const tabNames: any = {
logo
:
'项目logo'
,
menu
:
'菜单图标'
,
CityTemp
:
'用户上传'
,
bootAnimation
:
'开机动画'
,
loginPageImage
:
'登录页'
,
homePageImage
:
'主页焦点图'
,
}
function
getBase64
(
file
:
File
|
Blob
)
{
...
...
@@ -91,6 +94,8 @@ class PicturesWall extends React.Component<PicturesWallType> {
static
getDerivedStateFromProps
=
(
props
,
state
)
=>
{
const
{
value
,
uploadContext
=
{}
}
=
props
;
const
{
imgBed
,
update
}
=
uploadContext
;
console
.
log
(
imgBed
,
'imgBedimgBedimgBedimgBed'
);
const
fileList
=
state
.
fileList
;
const
shouldUpdate
=
fileList
.
every
(
f
=>
Array
.
isArray
(
value
)
?
!
value
.
some
(
v
=>
f
.
url
===
v
)
:
f
.
url
!==
value
)
if
(
value
!==
state
.
prevProps
.
value
&&
shouldUpdate
)
{
...
...
@@ -337,6 +342,8 @@ class PicturesWall extends React.Component<PicturesWallType> {
actives,
curSelectedImg,
} = this.state;
console.log(imgBed,'
imgBedddddddddddddddddddddd
');
const {
action = `${window.location.origin}${PUBLISH_SERVICE}/FileCenter/UploadSingleFile`,
headers,
...
...
src/pages/productCenter/mobileConfig/SiteConfig.jsx
View file @
5b8b85d6
...
...
@@ -125,9 +125,46 @@ const SiteConfig = props => {
message
:
'请选择系统图标'
,
},
]
}
style=
{
{
display
:
'none'
}
}
>
<
PicturesWall
picType=
"icon"
/>
</
Item
>
<
Item
label=
"开机动画:"
name=
"bootAnimation"
rules=
{
[
{
required
:
true
,
message
:
'请选择开机动画'
,
},
]
}
>
<
PicturesWall
picType=
"bootAnimation"
/>
</
Item
>
<
Item
label=
"登录页:"
name=
"loginPageImage"
rules=
{
[
{
required
:
true
,
message
:
'请选择登录页'
,
},
]
}
>
<
PicturesWall
picType=
"loginPageImage"
/>
</
Item
>
<
Item
label=
"主页焦点图:"
name=
"homePageImage"
rules=
{
[
{
required
:
true
,
message
:
'请选择主页焦点图'
,
},
]
}
>
<
PicturesWall
picType=
"homePageImage"
/>
</
Item
>
<
Item
label=
"登陆页面:"
...
...
src/pages/productCenter/mobileConfig/addConfig.jsx
View file @
5b8b85d6
...
...
@@ -43,6 +43,9 @@ const AddConfig = props => {
form
.
setFieldsValue
({
title
:
'新应用'
,
shortcutIcon
:
'assets
\\
images
\\
icon
\\
熊猫-白色.png'
,
bootAnimation
:
'assets
\\
images
\\
bootAnimation
\\
bootDefault.png'
,
loginPageImage
:
'assets
\\
images
\\
loginPageImage
\\
loginDefault.png'
,
homePageImage
:
'assets
\\
images
\\
homePageImage
\\
homeDefault.png'
,
loginTemplate
:
loginList
[
0
].
value
,
theme
:
themeList
[
0
].
value
,
style
:
styleList
[
0
].
value
,
...
...
@@ -159,9 +162,46 @@ const AddConfig = props => {
message
:
'请选择系统图标'
,
},
]
}
style=
{
{
display
:
'none'
}
}
>
<
PicturesWall
picType=
"icon"
/>
</
Item
>
<
Item
label=
"开机动画:"
name=
"bootAnimation"
rules=
{
[
{
required
:
true
,
message
:
'请选择开机动画'
,
},
]
}
>
<
PicturesWall
picType=
"bootAnimation"
/>
</
Item
>
<
Item
label=
"登录页:"
name=
"loginPageImage"
rules=
{
[
{
required
:
true
,
message
:
'请选择登录页'
,
},
]
}
>
<
PicturesWall
picType=
"loginPageImage"
/>
</
Item
>
<
Item
label=
"主页焦点图:"
name=
"homePageImage"
rules=
{
[
{
required
:
true
,
message
:
'请选择主页焦点图'
,
},
]
}
>
<
PicturesWall
picType=
"homePageImage"
/>
</
Item
>
<
Item
label=
"登陆页面:"
...
...
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