Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taobao-mini-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
qinhaitao
taobao-mini-template
Commits
15ad0454
Commit
15ad0454
authored
Sep 24, 2020
by
qinhaitao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:
🐛
校验错误
parent
e6e5fd18
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
prize-dialog.js
client/components/dialog/prize-dialog/prize-dialog.js
+1
-1
validate.ts
server/duibats/src/decorator/validate.ts
+7
-6
No files found.
client/components/dialog/prize-dialog/prize-dialog.js
View file @
15ad0454
...
...
@@ -259,7 +259,7 @@ Component({
prizeInitData
:
{
...
this
.
data
.
prizeInitData
,
switchStock
:
value
,
stock
:
value
===
0
?
""
:
this
.
data
.
prizeInitData
.
stock
,
stock
:
value
===
2
?
""
:
this
.
data
.
prizeInitData
.
stock
,
},
});
},
...
...
server/duibats/src/decorator/validate.ts
View file @
15ad0454
...
...
@@ -24,13 +24,14 @@ const validateParams = (validators: Rules, data: object) => {
const
validator
=
new
Schema
(
validators
)
return
new
Promise
(
resolve
=>
{
validator
.
validate
(
data
)
.
then
(()
=>
{
validator
.
validate
(
data
,
{},
(
errors
,
fields
)
=>
{
console
.
log
(
'errors'
,
errors
)
console
.
log
(
'fields'
,
fields
)
if
(
errors
)
{
resolve
({})
})
.
catch
(({
errors
,
fields
})
=>
{
}
else
{
resolve
({
errors
,
fields
})
}
})
})
}
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