Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
9aaef0f0
Commit
9aaef0f0
authored
Jan 09, 2020
by
赵庆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
8c234ef2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
22 deletions
+23
-22
bpo-web/app/base/api/impl/econtractApi.js
+19
-18
bpo-web/app/base/api/impl/entcontractApi.js
+4
-4
No files found.
bpo-web/app/base/api/impl/econtractApi.js
View file @
9aaef0f0
...
@@ -722,25 +722,26 @@ class EcontractApi {
...
@@ -722,25 +722,26 @@ class EcontractApi {
}
}
if
(
!
param
.
idNo
)
{
if
(
!
param
.
idNo
)
{
return
this
.
returnjson
(
-
1
,
"请提供该用户身份证号"
)
return
this
.
returnjson
(
-
1
,
"请提供该用户身份证号"
)
}
else
{
if
(
!
await
this
.
idcardClient
.
checkIDCard
(
param
.
idNo
))
{
return
this
.
returnjson
(
-
1
,
"身份证格式不正确"
);
}
let
card
=
await
this
.
idcardClient
.
cardInfo
(
param
.
idNo
);
let
age
=
card
.
age
||
0
;
if
(
!
age
)
{
return
this
.
returnjson
(
-
1
,
"您的身份证号格式错误, 只支持18位身份证号码"
);
}
if
(
card
.
sex
==
'male'
)
{
if
(
age
<
18
||
age
>
60
)
{
return
this
.
returnjson
(
-
1
,
"签约失败,男限制18-60岁之间"
)
}
}
else
{
if
(
age
<
18
||
age
>
55
)
{
return
this
.
returnjson
(
-
1
,
"签约失败,女限制18-55岁之间"
)
}
}
}
}
// else {
// if (!await this.idcardClient.checkIDCard(param.idNo)) {
// return this.returnjson(-1, "身份证格式不正确");
// }
// let card = await this.idcardClient.cardInfo(param.idNo);
// let age = card.age || 0;
// if(!age) {
// return this.returnjson(-1, "身份证号格式错误, 只支持18位身份证号码");
// }
// if(card.sex == 'male') {
// if (age < 18 || age > 60) {
// return this.returnjson(-1, "签约失败,男限制18-60岁之间")
// }
// } else {
// if (age < 18 || age > 55) {
// return this.returnjson(-1, "签约失败,女限制18-55岁之间")
// }
// }
// }
if
(
!
param
.
bankno
)
{
if
(
!
param
.
bankno
)
{
return
this
.
returnjson
(
-
1
,
"请提供该用户银行卡号"
)
return
this
.
returnjson
(
-
1
,
"请提供该用户银行卡号"
)
}
}
...
...
bpo-web/app/base/api/impl/entcontractApi.js
View file @
9aaef0f0
...
@@ -48,15 +48,15 @@ class EntcontractApi {
...
@@ -48,15 +48,15 @@ class EntcontractApi {
let
card
=
await
this
.
idcardClient
.
cardInfo
(
param
.
idNo
);
let
card
=
await
this
.
idcardClient
.
cardInfo
(
param
.
idNo
);
let
age
=
card
.
age
||
0
;
let
age
=
card
.
age
||
0
;
if
(
!
age
)
{
if
(
!
age
)
{
return
this
.
returnjson
(
-
1
,
"
请提供该用户身份证号
"
);
return
this
.
returnjson
(
-
1
,
"
身份证号格式错误, 只支持18位身份证号码
"
);
}
}
if
(
card
.
sex
==
'male'
)
{
if
(
card
.
sex
==
'male'
)
{
if
(
age
<
18
||
age
>
60
)
{
if
(
age
<
18
||
age
>
60
)
{
return
this
.
returnjson
(
-
1
,
"
身份证年龄过大
"
)
return
this
.
returnjson
(
-
1
,
"
签约失败,男限制18-60岁之间
"
)
}
}
}
else
{
}
else
{
if
(
age
<
18
||
age
>
55
)
{
if
(
age
<
18
||
age
>
55
)
{
return
this
.
returnjson
(
-
1
,
"
身份证年龄过大
"
)
return
this
.
returnjson
(
-
1
,
"
签约失败,女限制18-55岁之间
"
)
}
}
}
}
}
}
...
@@ -133,7 +133,7 @@ class EntcontractApi {
...
@@ -133,7 +133,7 @@ class EntcontractApi {
let
card
=
await
this
.
idcardClient
.
cardInfo
(
param
.
idNo
);
let
card
=
await
this
.
idcardClient
.
cardInfo
(
param
.
idNo
);
let
age
=
card
.
age
||
0
;
let
age
=
card
.
age
||
0
;
if
(
!
age
)
{
if
(
!
age
)
{
return
this
.
returnjson
(
-
1
,
"
您的
身份证号格式错误, 只支持18位身份证号码"
);
return
this
.
returnjson
(
-
1
,
"身份证号格式错误, 只支持18位身份证号码"
);
}
}
if
(
card
.
sex
==
'male'
)
{
if
(
card
.
sex
==
'male'
)
{
if
(
age
<
18
||
age
>
60
)
{
if
(
age
<
18
||
age
>
60
)
{
...
...
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