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
f53edbb0
Commit
f53edbb0
authored
Dec 25, 2019
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
1386ff55
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
0 deletions
+25
-0
bpo-web/app/base/controller/impl/ecompanywxuserCtl.js
+9
-0
bpo-web/app/base/service/impl/ecompanywxuserSve.js
+15
-0
bpo-web/app/front/entry/public/js/wxsign.js
+1
-0
No files found.
bpo-web/app/base/controller/impl/ecompanywxuserCtl.js
View file @
f53edbb0
...
@@ -37,6 +37,15 @@ class ecompanywxuserCtl extends CtlBase {
...
@@ -37,6 +37,15 @@ class ecompanywxuserCtl extends CtlBase {
if
(
rs
==
-
101
)
{
if
(
rs
==
-
101
)
{
return
system
.
getErrResult2
(
"公司还未配置签约参数"
);
return
system
.
getErrResult2
(
"公司还未配置签约参数"
);
}
}
if
(
rs
==
-
102
)
{
return
system
.
getErrResult2
(
"您的身份证号格式错误, 只支持18位身份证号码"
);
}
if
(
rs
==
-
103
)
{
return
system
.
getErrResult2
(
"签约失败,男限制18-60岁之间"
);
}
if
(
rs
==
-
104
)
{
return
system
.
getErrResult2
(
"签约失败,女限制18-55岁之间"
);
}
if
(
rs
==
-
201
)
{
if
(
rs
==
-
201
)
{
return
system
.
getErrResult2
(
"提交失败,您填写的身份证号码已经录入系统"
);
return
system
.
getErrResult2
(
"提交失败,您填写的身份证号码已经录入系统"
);
...
...
bpo-web/app/base/service/impl/ecompanywxuserSve.js
View file @
f53edbb0
...
@@ -8,6 +8,7 @@ class EcompanywxuserService extends ServiceBase {
...
@@ -8,6 +8,7 @@ class EcompanywxuserService extends ServiceBase {
super
(
ServiceBase
.
getDaoName
(
EcompanywxuserService
));
super
(
ServiceBase
.
getDaoName
(
EcompanywxuserService
));
this
.
ecompanybusiDao
=
system
.
getObject
(
"db.ecompanybusiDao"
);
this
.
ecompanybusiDao
=
system
.
getObject
(
"db.ecompanybusiDao"
);
this
.
restClient
=
system
.
getObject
(
"util.restClient"
);
this
.
restClient
=
system
.
getObject
(
"util.restClient"
);
this
.
idcardClient
=
system
.
getObject
(
"util.idcardClient"
);
}
}
async
savewxuser
(
wxuser
)
{
async
savewxuser
(
wxuser
)
{
...
@@ -16,6 +17,20 @@ class EcompanywxuserService extends ServiceBase {
...
@@ -16,6 +17,20 @@ class EcompanywxuserService extends ServiceBase {
return
-
101
;
return
-
101
;
}
}
let
card
=
await
this
.
idcardClient
.
cardInfo
(
wxuser
.
id_no
);
let
age
=
card
.
age
||
0
;
if
(
!
age
)
{
return
-
102
;
}
if
(
card
.
sex
==
'male'
)
{
if
(
age
<
18
||
age
>
60
)
{
return
-
103
;
}
}
else
{
if
(
age
<
18
||
age
>
55
)
{
return
-
104
;
}
}
// var idNoUser = await this.dao.findOne({id_no: wxuser.id_no});
// var idNoUser = await this.dao.findOne({id_no: wxuser.id_no});
var
user
=
await
this
.
dao
.
findOne
({
openId
:
wxuser
.
openId
});
var
user
=
await
this
.
dao
.
findOne
({
openId
:
wxuser
.
openId
});
...
...
bpo-web/app/front/entry/public/js/wxsign.js
View file @
f53edbb0
...
@@ -184,6 +184,7 @@ var app = new Vue({
...
@@ -184,6 +184,7 @@ var app = new Vue({
if
(
valid
)
{
if
(
valid
)
{
//处理登录逻辑
//处理登录逻辑
self
.
$root
.
postReq
(
"/web/ecompanywxuserCtl/saveuser"
,
self
.
wxuser
).
then
(
function
(
d
){
self
.
$root
.
postReq
(
"/web/ecompanywxuserCtl/saveuser"
,
self
.
wxuser
).
then
(
function
(
d
){
console
.
log
(
d
);
if
(
d
.
status
==
0
)
{
if
(
d
.
status
==
0
)
{
self
.
$message
.
success
(
"保存成功"
);
self
.
$message
.
success
(
"保存成功"
);
}
else
{
}
else
{
...
...
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