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
7c3020e3
Commit
7c3020e3
authored
Nov 12, 2020
by
张烨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: webconfig
parent
bb93830b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
11 deletions
+32
-11
siteConfigDrawer.js
src/pages/webConfig/components/siteConfigDrawer.js
+28
-7
index.js
src/pages/webConfig/index.js
+2
-2
api.js
src/services/user/api.js
+2
-2
No files found.
src/pages/webConfig/components/siteConfigDrawer.js
View file @
7c3020e3
...
...
@@ -2,10 +2,20 @@ import React from 'react';
import
{
Button
,
Col
,
Drawer
,
Row
}
from
'antd'
;
import
styles
from
'./siteConfigDrawer.less'
;
import
BaseForm
,
{
ITEM_TYPE
}
from
'@/components/BaseForm'
;
let
form
=
null
;
const
typeContent
=
hasIntegerate
=>
{
if
(
hasIntegerate
)
{
return
[];
}
return
[
{
value
:
'a'
,
children
:
'集成网站'
,
},
];
};
const
defaultKeyMap
=
{
const
defaultKeyMap
=
({
hasIntegerate
})
=>
(
{
title
:
{
label
:
'标题'
,
formType
:
ITEM_TYPE
.
INPUT
,
...
...
@@ -23,6 +33,17 @@ const defaultKeyMap = {
formType
:
ITEM_TYPE
.
INPUT
,
allowClear
:
true
,
},
type
:
{
label
:
'网站类型'
,
formType
:
ITEM_TYPE
.
SINGLE_RADIO
,
initialValue
:
hasIntegerate
?
'b'
:
'a'
,
options
:
[
{
value
:
'b'
,
children
:
'一般网站'
,
},
].
concat
(
typeContent
(
hasIntegerate
)),
},
shortcutIcon
:
{
label
:
'图标icon'
,
formType
:
ITEM_TYPE
.
IMGSHOP
,
...
...
@@ -120,19 +141,19 @@ const defaultKeyMap = {
// qrcode: '二维码地址',
// mapPlan: '地图方案',
// waterMark: '地图水印',
};
}
)
;
export
default
props
=>
{
const
{
visible
,
onClose
,
config
}
=
props
;
const
{
visible
,
onClose
,
config
,
hasIntegerate
=
true
}
=
props
;
const
getForm
=
f
=>
{
form
=
f
;
};
const
itemsMap
=
defaultKeyMap
({
hasIntegerate
});
const
formConfig
=
{
getForm
,
items
:
Object
.
keys
(
defaultKey
Map
).
map
(
k
=>
({
...
defaultKey
Map
[
k
],
items
:
Object
.
keys
(
items
Map
).
map
(
k
=>
({
...
items
Map
[
k
],
dataIndex
:
k
,
})),
buttons
:
[
...
...
src/pages/webConfig/index.js
View file @
7c3020e3
...
...
@@ -2,14 +2,13 @@ import React, { useEffect, useState } from 'react';
import
{
PageContainer
}
from
'@ant-design/pro-layout'
;
import
{
Tabs
}
from
'antd'
;
import
{
getWebModuleTree
}
from
'@/services/webConfig/api'
;
import
menuTreeMock
from
'@/services/mocks/web4site'
;
import
styles
from
'./index.less'
;
import
SiteConfig
from
'./components/siteConfigDrawer'
;
import
{
appConnector
}
from
'@/containers/App/store'
;
const
{
TabPane
}
=
Tabs
;
const
getMenuTree
=
userMode
=>
getWebModuleTree
(
userMode
).
then
(
res
=>
console
.
log
(
res
));
getWebModuleTree
(
userMode
||
'super'
).
then
(
res
=>
console
.
log
(
res
));
const
WebConfigPage
=
props
=>
{
const
[
configVisible
,
setConfigVisible
]
=
useState
(
false
);
...
...
@@ -55,6 +54,7 @@ const WebConfigPage = props => {
visible
=
{
configVisible
}
onClose
=
{
onDrawerClose
}
config
=
{
configObj
}
hasIntegerate
=
{
false
}
/
>
<
/div
>
<
/PageContainer
>
...
...
src/services/user/api.js
View file @
7c3020e3
import
sha
from
'sha1'
;
//
import sha from 'sha1';
import
{
CITY_SERVICE
,
get
,
post
,
PUBLISH_SERVICE
}
from
'../index'
;
export
const
getUserInfo
=
param
=>
get
(
'/cityinterface/getUserinfo'
,
param
);
...
...
@@ -9,5 +9,5 @@ export const login = param =>
export
const
OMSLogin
=
(
loginName
,
password
)
=>
post
(
`
${
PUBLISH_SERVICE
}
/OMSLogin`
,
{
UserName
:
loginName
,
PassWord
:
sha
(
password
).
toUpperCase
(),
PassWord
:
password
,
//
sha(password).toUpperCase(),
});
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