Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TOSTUMI
Project
Project
Details
Activity
Releases
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
Maple
TOSTUMI
Commits
aa62b187
Commit
aa62b187
authored
Aug 19, 2020
by
maple
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[new]作业中
parent
46efa679
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
222 additions
and
10 deletions
+222
-10
config.ts
config/config.ts
+5
-2
proxy.ts
config/proxy.ts
+6
-1
login.ts
src/models/login.ts
+2
-2
Account.less
src/pages/AccountManagement/AccountManagement/Account.less
+107
-0
Account.tsx
src/pages/AccountManagement/AccountManagement/Account.tsx
+90
-0
AccountManagement.tsx
...AccountManagement/AccountManagement/AccountManagement.tsx
+3
-4
ServiceProviderManagement.tsx
...t/ServiceProviderManagement/ServiceProviderManagement.tsx
+1
-0
index.tsx
src/pages/user/login/index.tsx
+1
-1
login.ts
src/services/login.ts
+7
-0
No files found.
config/config.ts
View file @
aa62b187
...
@@ -211,9 +211,12 @@ export default defineConfig({
...
@@ -211,9 +211,12 @@ export default defineConfig({
icon
:
'UserSwitchOutlined'
,
icon
:
'UserSwitchOutlined'
,
routes
:
[
routes
:
[
{
{
path
:
'
/AccountManagement
/AccountManagement'
,
path
:
'
.
/AccountManagement'
,
name
:
'accountmanagement1'
,
name
:
'accountmanagement1'
,
component
:
'./AccountManagement/AccountManagement/AccountManagement'
routes
:
[
{
path
:
'./'
,
component
:
'./AccountManagement/AccountManagement/Account'
},
{
path
:
'./AccountManagementEdit'
,
component
:
'./AccountManagement/AccountManagement/AccountManagement'
},
]
},
},
{
{
path
:
'/AccountManagement/CompanyInformation'
,
path
:
'/AccountManagement/CompanyInformation'
,
...
...
config/proxy.ts
View file @
aa62b187
...
@@ -37,9 +37,14 @@ export default {
...
@@ -37,9 +37,14 @@ export default {
pathRewrite
:
{
'^'
:
''
},
pathRewrite
:
{
'^'
:
''
},
},
},
'/tos/'
:
{
'/tos/'
:
{
target
:
'http://
localhost
:8651'
,
target
:
'http://
47.74.233.180
:8651'
,
changeOrigin
:
true
,
changeOrigin
:
true
,
pathRewrite
:
{
'^'
:
''
},
pathRewrite
:
{
'^'
:
''
},
},
},
// '/tos/': {
// target: 'http://localhost:8651',
// changeOrigin: true,
// pathRewrite: { '^': '' },
// },
},
},
};
};
src/models/login.ts
View file @
aa62b187
import
{
stringify
}
from
'querystring'
;
import
{
stringify
}
from
'querystring'
;
import
{
history
,
Reducer
,
Effect
}
from
'umi'
;
import
{
history
,
Reducer
,
Effect
}
from
'umi'
;
import
{
fake
AccountLogin
}
from
'@/services/login'
;
import
{
AccountLogin
}
from
'@/services/login'
;
import
{
setAuthority
}
from
'@/utils/authority'
;
import
{
setAuthority
}
from
'@/utils/authority'
;
import
{
getPageQuery
}
from
'@/utils/utils'
;
import
{
getPageQuery
}
from
'@/utils/utils'
;
...
@@ -32,7 +32,7 @@ const Model: LoginModelType = {
...
@@ -32,7 +32,7 @@ const Model: LoginModelType = {
effects
:
{
effects
:
{
*
login
({
payload
},
{
call
,
put
})
{
*
login
({
payload
},
{
call
,
put
})
{
const
response
=
yield
call
(
fake
AccountLogin
,
payload
);
const
response
=
yield
call
(
AccountLogin
,
payload
);
yield
put
({
yield
put
({
type
:
'changeLoginStatus'
,
type
:
'changeLoginStatus'
,
payload
:
response
,
payload
:
response
,
...
...
src/pages/AccountManagement/AccountManagement/Account.less
0 → 100644
View file @
aa62b187
@import '~antd/lib/style/themes/default.less';
//基石
.base {
width: 100%;
background-color: #ffffff;
padding: 34px;
}
//边栏1
//头部组件
.box{
width: 100%;
height: 64px;
position: relative;
}
.input{
width:200px;
height:32px;
background:none;
outline: none;
border:1px solid rgba(217,217,217,1);
border-radius:2px;
font-size:14px;
font-weight:400;
line-height:30px;
text-indent: 19px;
}
.item1{
.input();
}
.item2{
.input();
margin-left: 20px;
}
.item3{
width:80px;
height:32px;
border:1px solid rgba(24,144,255,1);
border-radius:2px;
background-color:#e7f4ff;
outline: none;
font-size:14px;
font-weight:400;
color:rgba(24,144,255,1);
line-height:30px;
cursor: pointer;
margin-top: 16px;
}
.item3:active{
background-color:#ffffff;
}
//边栏2
.box2{
width: 100%;
height: 40px;
margin-top: 0px;
position: relative;
}
//小组件1
.buttonLine{
width:200px;
height:32px;
border:none;
background:none;
outline: none;
font-size:14px;
font-weight:400;
line-height:30px;
cursor: pointer;
}
.buttonWait{
.buttonLine();
border-bottom:2px solid#dedede;
color:#454545;
}
.buttonWait:hover{
border-bottom:3px solid rgba(24,144,255,1);
color:rgba(24,144,255,1);
}
.buttonChoose{
.buttonLine();
border-bottom:3px solid rgba(24,144,255,1);
color:rgba(24,144,255,1);
}
.buttonAdd{
background:none;
outline: none;
cursor: pointer;
font-size:14px;
width:154px;
height:32px;
border:1px solid rgba(24,144,255,1);
color:rgba(24,144,255,1);
border-radius:2px;
position: absolute;
right: 0;
}
.buttonAdd2{
.buttonAdd();
right: 168px;
}
src/pages/AccountManagement/AccountManagement/Account.tsx
0 → 100644
View file @
aa62b187
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
styles
from
'./Account.less'
;
import
{
Form
,
Input
,
Button
,
Table
,
Space
}
from
'antd'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
,
history
}
from
'umi'
;
import
SelectOptions
from
'../../../components/SelectOptions/index'
;
const
Account
=
(
props
:
any
)
=>
{
const
{
formatMessage
}
=
useIntl
();
const
{
dispatch
,
location
,
Data
,
CommunityList
}
=
props
;
const
get
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'ServiceProvider/get'
,
playload
:
values
})};
useEffect
(()
=>
{
get
(
null
)
},
[]);
const
formRef
=
useRef
(
null
);
const
onFinish
=
(
values
:
any
)
=>
{
get
(
values
)};
const
onFinishFailed
=
(
errorInfo
:
any
)
=>
{
console
.
log
(
'Failed:'
,
errorInfo
)
};
const
goToDetail
=
(
values
:
any
,
e
:
any
)
=>
{
history
.
push
(
location
.
pathname
+
'/Detail?providerName='
+
values
.
providerName
)
}
const
goToCreate
=
()
=>
{
history
.
push
(
location
.
pathname
+
'/AccountManagementEdit'
)
}
const
goToEdit
=
(
values
:
any
,
e
:
any
)
=>
{
history
.
push
(
location
.
pathname
+
'/Edit?providerName='
+
values
.
providerName
)
}
const
goToServices
=
()
=>
{
history
.
push
(
location
.
pathname
+
'/Services'
)}
const
pagination
=
{
defaultCurrent
:
1
,
total
:
16
}
const
columns
=
[
{
title
:
"Service Provider"
,
dataIndex
:
'providerName'
,},
{
title
:
"Contacts"
,
dataIndex
:
'contactPhone'
,},
{
title
:
"Contact Details"
,
dataIndex
:
'contactEmail'
,},
{
title
:
"Services Available"
,
dataIndex
:
'enable'
,},
{
title
:
"Account Status"
,
dataIndex
:
'enable'
,},
{
title
:
"Actions"
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
size=
"middle"
><
a
onClick=
{
goToDetail
.
bind
(
this
,
record
)
}
>
Detail
</
a
><
a
onClick=
{
goToEdit
.
bind
(
this
,
record
)
}
>
edit
</
a
></
Space
>
),
},
];
const
dataSource
=
(
values
:
any
)
=>
{
let
tmp
=
values
;
return
tmp
;
}
return
(
<
div
className=
{
styles
.
base
}
>
{
/* 头部组件 */
}
<
Form
ref=
{
formRef
}
name=
"basic"
initialValues=
{
{}
}
onFinish=
{
onFinish
}
onFinishFailed=
{
onFinishFailed
}
>
<
div
className=
{
styles
.
box
}
>
<
Form
.
Item
name=
"providerName"
><
Input
placeholder=
"Service Provider"
/></
Form
.
Item
>
<
Form
.
Item
name=
"providerName"
><
Input
placeholder=
"Service Provider"
/></
Form
.
Item
>
</
div
>
</
Form
>
{
/* 内容组件 */
}
<
div
className=
{
styles
.
box2
}
>
<
Button
className=
{
styles
.
buttonAdd
}
onClick=
{
goToCreate
}
>
create new
</
Button
>
</
div
>
{
/* 列表组件 */
}
<
Table
size=
"small"
rowKey=
{
"id"
}
style=
{
{
marginTop
:
16
}
}
columns=
{
columns
}
dataSource=
{
Data
.
data
!=
null
?
dataSource
(
Data
.
data
.
rows
):
null
}
pagination=
{
pagination
}
/>
</
div
>
);
};
function
mapStateToProps
(
state
:
any
)
{
const
{
Data
}
=
state
.
ServiceProvider
;
const
{
CommunityList
}
=
state
.
Init
;
console
.
log
(
CommunityList
)
return
{
Data
,
CommunityList
};
}
export
default
connect
(
mapStateToProps
)(
Account
);
src/pages/AccountManagement/AccountManagement/AccountManagement.tsx
View file @
aa62b187
...
@@ -7,6 +7,8 @@ import { Link, useIntl, connect, Dispatch } from 'umi';
...
@@ -7,6 +7,8 @@ import { Link, useIntl, connect, Dispatch } from 'umi';
import
SelectOptions
from
'../../../components/SelectOptions/index'
;
import
SelectOptions
from
'../../../components/SelectOptions/index'
;
import
TreeAction
from
'../../../components/TreeAction/TreeAction'
;
import
TreeAction
from
'../../../components/TreeAction/TreeAction'
;
import
TitleBack
from
'../../../components/TitleBack/TitleBack'
;
const
printContent
=
(
comment
:
any
)
=>
{
const
printContent
=
(
comment
:
any
)
=>
{
console
.
log
(
comment
)
console
.
log
(
comment
)
}
}
...
@@ -24,10 +26,7 @@ const AccountManagement = () => {
...
@@ -24,10 +26,7 @@ const AccountManagement = () => {
<
div
className=
{
styles
.
base
}
>
<
div
className=
{
styles
.
base
}
>
{
/* 头部组件 */
}
{
/* 头部组件 */
}
<
div
className=
{
styles
.
box
}
>
<
TitleBack
title=
"Admin Account Adding"
/>
<
div
className=
{
styles
.
item1
}
>
Add Admin Account
</
div
>
<
button
className=
{
styles
.
item3
}
>
返回
</
button
>
</
div
>
<
div
className=
{
styles
.
box1
}
>
<
div
className=
{
styles
.
box1
}
>
<
div
className=
{
styles
.
box1item1
}
>
Account ID
</
div
>
<
div
className=
{
styles
.
box1item1
}
>
Account ID
</
div
>
...
...
src/pages/UserManagement/ServiceProviderManagement/ServiceProviderManagement.tsx
View file @
aa62b187
...
@@ -90,6 +90,7 @@ const ServiceProviderManagement = (props: any) => {
...
@@ -90,6 +90,7 @@ const ServiceProviderManagement = (props: any) => {
function
mapStateToProps
(
state
:
any
)
{
function
mapStateToProps
(
state
:
any
)
{
const
{
Data
}
=
state
.
ServiceProvider
;
const
{
Data
}
=
state
.
ServiceProvider
;
const
{
CommunityList
}
=
state
.
Init
;
const
{
CommunityList
}
=
state
.
Init
;
console
.
log
(
CommunityList
)
return
{
return
{
Data
,
Data
,
CommunityList
CommunityList
...
...
src/pages/user/login/index.tsx
View file @
aa62b187
...
@@ -30,7 +30,7 @@ const Login: React.FC<LoginProps> = (props) => {
...
@@ -30,7 +30,7 @@ const Login: React.FC<LoginProps> = (props) => {
console
.
log
({
...
values
,
type
,
userName
,
password
})
console
.
log
({
...
values
,
type
,
userName
,
password
})
dispatch
({
dispatch
({
type
:
'login/login'
,
type
:
'login/login'
,
payload
:
{
...
values
,
type
,
userName
,
password
},
payload
:
{
userName
,
password
},
});
});
};
};
const
usernameHandle
=
(
e
:
any
)
=>
{
const
usernameHandle
=
(
e
:
any
)
=>
{
...
...
src/services/login.ts
View file @
aa62b187
...
@@ -17,3 +17,10 @@ export async function fakeAccountLogin(params: LoginParamsType) {
...
@@ -17,3 +17,10 @@ export async function fakeAccountLogin(params: LoginParamsType) {
export
async
function
getFakeCaptcha
(
mobile
:
string
)
{
export
async
function
getFakeCaptcha
(
mobile
:
string
)
{
return
request
(
`/api/login/captcha?mobile=
${
mobile
}
`
);
return
request
(
`/api/login/captcha?mobile=
${
mobile
}
`
);
}
}
export
async
function
AccountLogin
(
params
:
LoginParamsType
)
{
return
request
(
'/tos/user/login'
,
{
method
:
'POST'
,
data
:
params
,
});
}
\ No newline at end of file
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