Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
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
shenshaokai
jinfa-platform
Commits
8fc984ff
Commit
8fc984ff
authored
Oct 26, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into dev
parents
f0a660f3
f546797f
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
21 deletions
+37
-21
index.tsx
...ges/accountSetting/components/EditDataComponent/index.tsx
+8
-5
EmailVerifyPanel.tsx
...Setting/components/VerifyPanel/Panel/EmailVerifyPanel.tsx
+2
-3
PaycodeVerifyPanel.tsx
...tting/components/VerifyPanel/Panel/PaycodeVerifyPanel.tsx
+1
-1
PhoneVerifyPanel.tsx
...Setting/components/VerifyPanel/Panel/PhoneVerifyPanel.tsx
+7
-8
ResetPayCode.tsx
...ountSetting/components/VerifyPanel/Panel/ResetPayCode.tsx
+13
-2
index.tsx
src/pages/repositories/schema/index.tsx
+6
-2
No files found.
src/pages/accountSetting/components/EditDataComponent/index.tsx
View file @
8fc984ff
import
React
,
{
useState
,
useEffect
,
useCallback
}
from
'react'
;
// import { SchemaForm } from '@formily/antd';
import
{
Form
,
Input
,
Row
,
Col
,
Button
,
Select
,
message
}
from
'antd'
;
import
{
Form
,
Input
,
Row
,
Col
,
Button
,
Select
,
message
,
AutoComplete
}
from
'antd'
;
import
styles
from
'./index.less'
;
import
{
StepForwardOutlined
,
CheckCircleOutlined
,
CloseCircleOutlined
}
from
'@ant-design/icons'
;
import
GetCaptchaCode
from
'../GetCaptchaCode'
;
import
classNames
from
'classnames'
import
{
PublicApi
}
from
'@/services/api'
;
import
phoneRegExp
from
'./utils'
;
import
options
from
'@/pages/editor/settingsPanel/propsSettings/Animate/config'
;
const
Option
=
Select
.
Option
;
const
EditDataComponent
=
(
props
)
=>
{
...
...
@@ -15,7 +16,7 @@ const EditDataComponent = (props) => {
const
[
canSendCode
,
setCanSandCode
]
=
useState
(
false
);
const
passwordValidator
=
async
(
rule
,
value
)
=>
{
let
temp
=
{}
let
length
=
value
.
length
>=
8
&&
value
.
length
<=
20
;
let
length
=
value
&&
value
.
length
>=
8
&&
value
.
length
<=
20
;
let
trim
=
!
(
/
\s\S
+|^
\s\S
+|
\s
$/
.
test
(
value
))
//
let
compact
=
/^
(?=
.*
[
0-9
]
.*
)(?=
.*
[
A-Z
]
.*
)(?=
.*
[
a-z
]
.*
)
/
.
test
(
value
);
// 必须含有大小写和数字
temp
[
'length'
]
=
length
...
...
@@ -41,6 +42,7 @@ const EditDataComponent = (props) => {
const
country
=
props
.
form
.
getFieldValue
(
'country'
);
const
pattern
=
phoneRegExp
[
country
];
if
(
!
pattern
.
test
(
value
))
{
setCanSandCode
(
false
)
throw
new
Error
(
"请填写正确的手机号"
)
}
setCanSandCode
(
true
);
...
...
@@ -50,7 +52,8 @@ const EditDataComponent = (props) => {
const
emailValidator
=
async
(
rule
,
value
)
=>
{
const
pattern
=
/^
([
a-zA-Z0-9
]
+
[
_|
\_
|
\.]?)
*
[
a-zA-Z0-9
]
+@
([
a-zA-Z0-9
]
+
[
_|
\_
|
\.]?)
*
[
a-zA-Z0-9
]
+
\.[
a-zA-Z
]{2,3}
$/
;
if
(
!
pattern
.
test
(
value
))
{
throw
new
Error
(
"请填写正确的邮箱号"
)
setCanSandCode
(
false
)
throw
new
Error
(
"无效的邮箱"
)
}
setCanSandCode
(
true
);
}
...
...
@@ -186,7 +189,7 @@ const EditDataComponent = (props) => {
name=
"phoneCaptcha"
rules=
{
[{
required
:
true
,
message
:
'请填写验证码'
}]
}
>
<
Input
/>
<
Input
autoComplete=
{
"off"
}
/>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
6
}
>
...
...
@@ -230,7 +233,7 @@ const EditDataComponent = (props) => {
noStyle
rules=
{
[{
required
:
true
,
message
:
'请填写邮箱验证码'
}]
}
>
<
Input
/>
<
Input
autoComplete=
{
"off"
}
/>
</
Form
.
Item
>
</
Col
>
</
Row
>
...
...
src/pages/accountSetting/components/VerifyPanel/Panel/EmailVerifyPanel.tsx
View file @
8fc984ff
...
...
@@ -50,7 +50,6 @@ const EmailVerifyPanel = (props) => {
}
console
.
log
(
params
);
service
(
params
).
then
((
data
)
=>
{
console
.
log
(
"success"
)
if
(
data
.
code
==
1000
)
{
console
.
log
(
"success"
)
history
.
push
(
'/memberCenter/systemSetting/accountSetting'
)
...
...
@@ -85,7 +84,7 @@ const EmailVerifyPanel = (props) => {
message
.
success
(
"验证成功"
)
setVisible
(
true
);
}
else
{
message
.
error
(
data
.
error
)
message
.
error
(
data
.
message
)
}
})
}
...
...
@@ -111,7 +110,7 @@ const EmailVerifyPanel = (props) => {
noStyle
rules=
{
[{
required
:
true
,
message
:
'请输入验证码'
}]
}
>
<
Input
/>
<
Input
autoComplete=
"off"
/>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
6
}
>
...
...
src/pages/accountSetting/components/VerifyPanel/Panel/PaycodeVerifyPanel.tsx
View file @
8fc984ff
...
...
@@ -96,7 +96,7 @@ const PaycodeVerifyPanel: React.FC<IProps> = (props) => {
noStyle
rules=
{
[{
required
:
true
,
message
:
'请填写支付密码'
}]
}
>
<
Input
/>
<
Input
autoComplete=
"off"
/>
</
Form
.
Item
>
</
Col
>
</
Row
>
...
...
src/pages/accountSetting/components/VerifyPanel/Panel/PhoneVerifyPanel.tsx
View file @
8fc984ff
...
...
@@ -106,7 +106,8 @@ const PhoneVerifyPanel: React.FC<IProps> = (props) => {
>
{
!
visible
?
<
Form
.
Item
label=
"验证码"
>
?
<>
<
Form
.
Item
label=
"验证码"
>
<
Row
gutter=
{
10
}
>
<
Col
span=
{
14
}
>
<
Form
.
Item
...
...
@@ -114,7 +115,7 @@ const PhoneVerifyPanel: React.FC<IProps> = (props) => {
noStyle
rules=
{
[{
required
:
true
,
message
:
'请填写验证码'
}]
}
>
<
Input
/>
<
Input
autoComplete=
"off"
/>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
6
}
>
...
...
@@ -124,16 +125,14 @@ const PhoneVerifyPanel: React.FC<IProps> = (props) => {
</
Col
>
</
Row
>
</
Form
.
Item
>
:
null
}
{
!
visible
?
<
div
style=
{
{
marginBottom
:
'130px'
}
}
>
<
div
style=
{
{
marginBottom
:
'130px'
}
}
>
<
SafeVerification
handleVerifySuccess=
{
handleVerifySuccess
}
/>
</
div
>
</>
:
null
}
{
visible
?
<>
...
...
src/pages/accountSetting/components/VerifyPanel/Panel/ResetPayCode.tsx
View file @
8fc984ff
...
...
@@ -65,6 +65,14 @@ const ResetPayCode: React.FC<IProps> = (props) => {
}
}
// 6位简单数字
const
numberValidator
=
async
(
rule
,
value
)
=>
{
const
pattern
=
/^
\d{6}
$/
if
(
!
pattern
.
test
(
value
))
{
throw
new
Error
(
"请设置6位数字的密码"
)
}
}
// 支付密码
const
renderPwd
=
()
=>
{
return
(
...
...
@@ -77,7 +85,10 @@ const ResetPayCode: React.FC<IProps> = (props) => {
<
Form
.
Item
name=
"password"
noStyle
rules=
{
[{
required
:
true
,
message
:
"请填写支付密码"
}]
}
rules=
{
[
{
required
:
true
,
message
:
"请填写支付密码"
},
{
validator
:
numberValidator
}
]
}
>
<
Input
.
Password
/>
</
Form
.
Item
>
...
...
@@ -129,7 +140,7 @@ const ResetPayCode: React.FC<IProps> = (props) => {
noStyle
rules=
{
[{
required
:
true
,
message
:
'请填写验证码'
}]
}
>
<
Input
/>
<
Input
autoComplete=
"off"
/>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
6
}
>
...
...
src/pages/repositories/schema/index.tsx
View file @
8fc984ff
...
...
@@ -368,16 +368,20 @@ export const repositDetailSchema: ISchema = padRequiredMessage({
properties
:
{
name
:
{
type
:
'string'
,
required
:
true
,
// 'x-component': 'Input'
,
title
:
'仓位名称'
,
"x-component-props"
:
{
placeholder
:
'建议名称:商品名称+商城名称+渠道描述'
},
"x-rules"
:
[
{
required
:
true
,
message
:
'请填写仓位名称'
},
{
limitByte
:
true
,
maxByte
:
60
}
}
,
]
},
shopType
:
{
...
...
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