Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
5
51business
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
方斌
51business
Commits
ffa0ad1d
Commit
ffa0ad1d
authored
Apr 26, 2020
by
任国军
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove age check
parent
e26fff71
Pipeline
#22306
passed with stage
in 14 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
6 deletions
+2
-6
user.js
app/controller/course/v5/user.js
+0
-4
user.js
app/service/course/v5/user.js
+2
-2
No files found.
app/controller/course/v5/user.js
View file @
ffa0ad1d
...
@@ -73,10 +73,6 @@ class UserController extends Controller {
...
@@ -73,10 +73,6 @@ class UserController extends Controller {
const
{
ctx
,
service
}
=
this
;
const
{
ctx
,
service
}
=
this
;
const
params
=
ctx
.
request
.
body
;
const
params
=
ctx
.
request
.
body
;
if
(
ctx
.
isEmpty
(
params
)
||
ctx
.
isEmpty
(
params
.
baby_age
))
{
ctx
.
failed
(
'age is empty'
);
}
const
ret
=
await
service
.
course
.
v5
.
user
.
addUserBaby
(
params
);
const
ret
=
await
service
.
course
.
v5
.
user
.
addUserBaby
(
params
);
ctx
.
success
(
ret
);
ctx
.
success
(
ret
);
}
}
...
...
app/service/course/v5/user.js
View file @
ffa0ad1d
...
@@ -270,8 +270,8 @@ class UserService extends Service {
...
@@ -270,8 +270,8 @@ class UserService extends Service {
async
addUserBaby
(
input
)
{
async
addUserBaby
(
input
)
{
const
{
ctx
}
=
this
;
const
{
ctx
}
=
this
;
const
name
=
input
.
baby_name
||
'qxk'
+
String
(
await
this
.
getRandomNumber
(
6
));
const
name
=
input
.
baby_name
||
'qxk'
+
String
(
await
this
.
getRandomNumber
(
6
));
const
age
=
input
.
baby_age
||
''
;
const
age
=
input
.
baby_age
||
0
;
const
sex
=
input
.
baby_sex
||
''
;
const
sex
=
input
.
baby_sex
||
1
;
const
birth
=
input
.
baby_birth
||
''
;
const
birth
=
input
.
baby_birth
||
''
;
const
data
=
{
const
data
=
{
...
...
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