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
16e1ffef
Commit
16e1ffef
authored
Dec 30, 2020
by
Maofei94
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: fix style
parent
ea0ef603
Pipeline
#21524
passed with stages
in 18 minutes 49 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
6 deletions
+53
-6
context.js
src/components/Upload/context.js
+24
-3
productConfig.jsx
src/pages/webConfig/productConfig.jsx
+19
-0
api.js
src/services/common/api.js
+5
-0
index.js
src/services/index.js
+5
-3
No files found.
src/components/Upload/context.js
View file @
16e1ffef
import
{
getImageBases
}
from
'@/services/common/api'
;
import
{
getImageBases
,
getSysConfigurate
}
from
'@/services/common/api'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
const
UploadContext
=
React
.
createContext
();
...
...
@@ -14,10 +14,12 @@ const PictureWallProvider = props => {
const
[
imgBed
,
setImgBed
]
=
useState
([]);
const
update
=
()
=>
getImageBases
(
''
)
getImageBases
(
'
icon,androidMenu,menuNew,logo
'
)
.
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
setImgBed
(
res
.
data
);
const
{
data
}
=
res
;
let
arr
=
data
.
filter
(
item
=>
item
.
moduleName
!==
'menu'
)
||
[];
setImgBed
(
arr
);
}
})
.
catch
(
err
=>
{
...
...
@@ -26,10 +28,29 @@ const PictureWallProvider = props => {
return
sleep
(
3000
).
then
(
update
);
});
const
updateDicName
=
()
=>
{
getSysConfigurate
().
then
(
res
=>
{
if
(
res
.
getMe
&&
(
res
.
getMe
[
0
]
===
1
||
res
.
getMe
[
0
]
===
'1'
))
{
window
.
DicNameSERVICE
=
{
CITY_SERVICE
:
'/Publish/GateWay/OMS'
,
PUBLISH_SERVICE
:
'/Publish/GateWay/CityServer'
,
};
}
else
{
window
.
DicNameSERVICE
=
{
CITY_SERVICE
:
'/Cityinterface/rest/services'
,
PUBLISH_SERVICE
:
'/Publish/OMS'
,
};
}
});
};
useEffect
(()
=>
{
update
();
},
[]);
useEffect
(()
=>
{
updateDicName
();
},
[]);
return
(
<
UploadContext
.
Provider
value
=
{{
imgBed
,
update
}}
>
{
children
}
...
...
src/pages/webConfig/productConfig.jsx
0 → 100644
View file @
16e1ffef
import
React
,
{
useState
}
from
'react'
;
import
{
Card
,
List
}
from
'antd'
;
const
ProductConfig
=
props
=>
{
const
a
=
'q'
;
return
(
<
div
>
<
Card
>
<
List
>
a
</
List
>
<
List
>
a
</
List
>
<
List
>
a
</
List
>
<
List
>
a
</
List
>
<
List
>
a
</
List
>
</
Card
>
</
div
>
);
};
export
default
ProductConfig
;
src/services/common/api.js
View file @
16e1ffef
...
...
@@ -2,3 +2,8 @@ import { post, postForm, get, PUBLISH_SERVICE } from '../index';
export
const
getImageBases
=
moduleName
=>
get
(
`
${
PUBLISH_SERVICE
}
/FileCenter/GetFileUrls`
,
{
moduleName
});
export
const
getSysConfigurate
=
params
=>
get
(
`/CityInterface/rest/services/Common.svc/Tool/GetSysConfigurate?dicName=网关启停`
,
);
src/services/index.js
View file @
16e1ffef
import
{
request
}
from
'../utils/request'
;
// export const CITY_SERVICE = '/Cityinterface/rest/services';
export
const
PUBLISH_SERVICE
=
'/Publish/GateWay/OMS'
;
export
const
CITY_SERVICE
=
'/Publish/GateWay/CityServer'
;
export
const
CITY_SERVICE
=
'/Cityinterface/rest/services'
;
export
const
PUBLISH_SERVICE
=
'/Publish/OMS'
;
// export const PUBLISH_SERVICE = '/Publish/GateWay/OMS';
// export const CITY_SERVICE = '/Publish/GateWay/CityServer';
const
get
=
async
(
url
,
params
,
options
=
{})
=>
request
({
...
...
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