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
851262aa
Commit
851262aa
authored
Nov 11, 2020
by
Sixiang_Zzb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试问题修复
parent
db3e8fa2
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
14 additions
and
12 deletions
+14
-12
SecurityLayout.tsx
src/layouts/SecurityLayout.tsx
+1
-0
CommunityService.ts
src/models/CommunityManagement/CommunityService.ts
+1
-1
login.ts
src/models/login.ts
+2
-0
CardAdd.tsx
src/pages/CommercialService/CardAdd.tsx
+1
-1
Detail.tsx
src/pages/CommercialService/Detail.tsx
+3
-3
PropertyServices.tsx
src/pages/CommercialService/PropertyServices.tsx
+1
-1
index.tsx
src/pages/user/login/index.tsx
+3
-2
authority.ts
src/utils/authority.ts
+2
-4
No files found.
src/layouts/SecurityLayout.tsx
View file @
851262aa
...
@@ -68,6 +68,7 @@ class SecurityLayout extends React.Component<SecurityLayoutProps, SecurityLayout
...
@@ -68,6 +68,7 @@ class SecurityLayout extends React.Component<SecurityLayoutProps, SecurityLayout
console
.
log
(
'页面加载'
);
console
.
log
(
'页面加载'
);
return
<
PageLoading
/>;
return
<
PageLoading
/>;
}
}
console
.
log
(
window
.
location
.
pathname
);
if
(
!
isLogin
&&
window
.
location
.
pathname
!==
'/user/login'
)
{
if
(
!
isLogin
&&
window
.
location
.
pathname
!==
'/user/login'
)
{
message
.
error
(
'Please Re Login!'
,
3
);
message
.
error
(
'Please Re Login!'
,
3
);
// console.log('未登录返回登录页!');
// console.log('未登录返回登录页!');
...
...
src/models/CommunityManagement/CommunityService.ts
View file @
851262aa
...
@@ -79,7 +79,7 @@ export default {
...
@@ -79,7 +79,7 @@ export default {
address
:
tmp
.
addressAndpostalCode
,
address
:
tmp
.
addressAndpostalCode
,
home
:
tmp
.
buildingNumber
+
'#'
+
tmp
.
floorNumber
+
'-'
+
tmp
.
roomNumber
,
home
:
tmp
.
buildingNumber
+
'#'
+
tmp
.
floorNumber
+
'-'
+
tmp
.
roomNumber
,
name
:
tmp
.
owerName
,
name
:
tmp
.
owerName
,
phone
:
tmp
.
accountLogin
!=
null
?
tmp
.
accountLogin
:
tmp
.
owerPhone
,
phone
:
tmp
.
owerPhone
,
email
:
tmp
.
owerEmail
,
email
:
tmp
.
owerEmail
,
content
:
resp
.
data
.
serviceContent
,
content
:
resp
.
data
.
serviceContent
,
replyContent
:
resp
.
data
.
replyContent
,
replyContent
:
resp
.
data
.
replyContent
,
...
...
src/models/login.ts
View file @
851262aa
...
@@ -67,6 +67,8 @@ const Model: LoginModelType = {
...
@@ -67,6 +67,8 @@ const Model: LoginModelType = {
console
.
log
(
userMessage
);
console
.
log
(
userMessage
);
console
.
log
(
userMessage
.
token
);
console
.
log
(
userMessage
.
token
);
setCookie
(
'token'
,
userMessage
.
token
);
setCookie
(
'token'
,
userMessage
.
token
);
setCookie
(
'name'
,
userMessage
.
userModel
.
tosUserName
);
setCookie
(
'phone'
,
userMessage
.
userModel
.
tosUserPhone
);
localStorage
.
setItem
(
'permission'
,
JSON
.
stringify
(
userMessage
.
permission
));
localStorage
.
setItem
(
'permission'
,
JSON
.
stringify
(
userMessage
.
permission
));
console
.
log
(
'获取到Token:'
+
getCookie
(
'token'
));
console
.
log
(
'获取到Token:'
+
getCookie
(
'token'
));
yield
put
({
yield
put
({
...
...
src/pages/CommercialService/CardAdd.tsx
View file @
851262aa
...
@@ -103,7 +103,7 @@ const CardAdd = (props: any) => {
...
@@ -103,7 +103,7 @@ const CardAdd = (props: any) => {
className=
{
styles
.
buildNumber
}
className=
{
styles
.
buildNumber
}
rules=
{
[{
required
:
true
,
validator
:
checkData
}]
}
rules=
{
[{
required
:
true
,
validator
:
checkData
}]
}
>
>
<
Input
style=
{
{
width
:
80
}
}
placeholder=
{
'B
uilding
'
}
/>
<
Input
style=
{
{
width
:
80
}
}
placeholder=
{
'B
LK
'
}
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
div
style=
{
{
lineHeight
:
2
,
marginRight
:
16
}
}
>
#
</
div
>
<
div
style=
{
{
lineHeight
:
2
,
marginRight
:
16
}
}
>
#
</
div
>
<
Form
.
Item
<
Form
.
Item
...
...
src/pages/CommercialService/Detail.tsx
View file @
851262aa
...
@@ -77,6 +77,8 @@ const Detail = (props: any) => {
...
@@ -77,6 +77,8 @@ const Detail = (props: any) => {
fromRef
.
current
.
setFieldsValue
(
tmp
);
fromRef
.
current
.
setFieldsValue
(
tmp
);
}
}
setLoading
(
false
);
setLoading
(
false
);
}
else
{
history
.
back
();
}
}
},
[
CurDataDetail
]);
},
[
CurDataDetail
]);
...
@@ -119,9 +121,7 @@ const Detail = (props: any) => {
...
@@ -119,9 +121,7 @@ const Detail = (props: any) => {
{
CurDataDetail
.
address
}{
' '
}
{
CurDataDetail
.
address
}{
' '
}
</
Descriptions
.
Item
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"User Name"
>
{
CurDataDetail
.
name
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"User Name"
>
{
CurDataDetail
.
name
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Contact Details"
>
<
Descriptions
.
Item
label=
"Contact Details"
>
{
CurDataDetail
.
phone
}
</
Descriptions
.
Item
>
{
CurDataDetail
.
phone
}{
' '
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
>
{
CurDataDetail
.
email
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
>
{
CurDataDetail
.
email
}
</
Descriptions
.
Item
>
</
Descriptions
>
</
Descriptions
>
<
Row
gutter=
{
16
}
>
<
Row
gutter=
{
16
}
>
...
...
src/pages/CommercialService/PropertyServices.tsx
View file @
851262aa
...
@@ -57,7 +57,7 @@ const PropertyServices = (props: any) => {
...
@@ -57,7 +57,7 @@ const PropertyServices = (props: any) => {
),
),
},
},
{
{
title
:
'Handle
s
tatus'
,
title
:
'Handle
S
tatus'
,
dataIndex
:
'id'
,
dataIndex
:
'id'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
size=
"middle"
>
{
handle_Status
[
record
.
handle_status
][
1
]
}
</
Space
>
<
Space
size=
"middle"
>
{
handle_Status
[
record
.
handle_status
][
1
]
}
</
Space
>
...
...
src/pages/user/login/index.tsx
View file @
851262aa
...
@@ -85,6 +85,7 @@ const Login: React.FC<LoginProps> = (props) => {
...
@@ -85,6 +85,7 @@ const Login: React.FC<LoginProps> = (props) => {
const
onGetCaptcha
=
useCallback
(
async
(
email
:
string
)
=>
{
const
onGetCaptcha
=
useCallback
(
async
(
email
:
string
)
=>
{
// getFakeCaptcha
// getFakeCaptcha
// getCaptcha
// getCaptcha
message
.
success
(
'Has Been Sent!'
);
const
result
=
await
getCaptcha
({
account
:
email
});
const
result
=
await
getCaptcha
({
account
:
email
});
console
.
log
(
result
);
console
.
log
(
result
);
...
@@ -92,7 +93,7 @@ const Login: React.FC<LoginProps> = (props) => {
...
@@ -92,7 +93,7 @@ const Login: React.FC<LoginProps> = (props) => {
if
(
result
===
false
)
{
if
(
result
===
false
)
{
return
;
return
;
}
}
message
.
success
(
'获取验证码成功!验证码为:1234'
);
setTiming
(
true
);
setTiming
(
true
);
},
[]);
},
[]);
...
@@ -144,7 +145,7 @@ const Login: React.FC<LoginProps> = (props) => {
...
@@ -144,7 +145,7 @@ const Login: React.FC<LoginProps> = (props) => {
</
div
>
</
div
>
)
:
(
)
:
(
<
div
>
<
div
>
<
Form
.
Item
name=
"password"
>
<
Form
.
Item
name=
"password"
initialValue=
{
userName
||
''
}
>
<
input
className=
{
styles
.
input2
}
type=
"password"
/>
<
input
className=
{
styles
.
input2
}
type=
"password"
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
div
>
<
div
>
...
...
src/utils/authority.ts
View file @
851262aa
...
@@ -2,11 +2,9 @@ import { reloadAuthorized } from './Authorized';
...
@@ -2,11 +2,9 @@ import { reloadAuthorized } from './Authorized';
// use localStorage to store the authority info, which might be sent from server in actual project.
// use localStorage to store the authority info, which might be sent from server in actual project.
export
function
getAuthority
(
str
?:
string
):
string
|
string
[]
{
export
function
getAuthority
(
str
?:
string
):
string
|
string
[]
{
console
.
log
(
"获取权限"
)
const
authorityString
=
const
authorityString
=
typeof
str
===
'undefined'
&&
localStorage
?
localStorage
.
getItem
(
'antd-pro-authority'
)
:
str
;
typeof
str
===
'undefined'
&&
localStorage
?
localStorage
.
getItem
(
'antd-pro-authority'
)
:
str
;
// authorityString could be admin, "admin", ["admin"]
// authorityString could be admin, "admin", ["admin"]
console
.
log
(
authorityString
)
let
authority
;
let
authority
;
try
{
try
{
if
(
authorityString
)
{
if
(
authorityString
)
{
...
@@ -17,7 +15,7 @@ export function getAuthority(str?: string): string | string[] {
...
@@ -17,7 +15,7 @@ export function getAuthority(str?: string): string | string[] {
}
}
if
(
typeof
authority
===
'string'
)
{
if
(
typeof
authority
===
'string'
)
{
// return [authority];
// return [authority];
return
[
'admin'
];
return
[
'admin'
];
}
}
// preview.pro.ant.design only do not use in your production.
// preview.pro.ant.design only do not use in your production.
// preview.pro.ant.design 专用环境变量,请不要在你的项目中使用它。
// preview.pro.ant.design 专用环境变量,请不要在你的项目中使用它。
...
@@ -26,7 +24,7 @@ export function getAuthority(str?: string): string | string[] {
...
@@ -26,7 +24,7 @@ export function getAuthority(str?: string): string | string[] {
return
[
'admin'
];
return
[
'admin'
];
}
}
// return authority;
// return authority;
return
[
'admin'
];
return
[
'admin'
];
}
}
export
function
setAuthority
(
authority
:
string
|
string
[]):
void
{
export
function
setAuthority
(
authority
:
string
|
string
[]):
void
{
...
...
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