Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
高东东-金蝶建发
/
jf-yzj-resume
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f140607d
authored
Aug 22, 2024
by
--local
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update: 人员标识在原来openId基础上增加uid支持
parent
1b90275a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
2 deletions
src/js/index.js
src/js/index.js
View file @
f140607d
...
@@ -139,9 +139,61 @@ function getUserInfoByOid(oId) {
...
@@ -139,9 +139,61 @@ function getUserInfoByOid(oId) {
});
});
}
}
function
initUser
()
{
// 根据“工号”查询【工号、eid、orgId】等信息
function
getPersonInfosByJobNo
(
jobNos
)
{
var
opt
=
{
url
:
'/gateway/xmjf-other-service/person/role/query/jobNo'
,
serializer
:
'form'
,
method
:
'POST'
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
,
'Cloudoffice-Version'
:
'v0.0.1'
},
data
:
{
jobNos
:
jobNos
.
join
(
','
)
}
}
return
new
Promise
(
function
(
resolve
,
reject
)
{
opt
.
success
=
function
(
result
)
{
var
success
=
(
result
||
{}).
success
||
false
var
data
=
(
result
||
{}).
data
||
[]
if
(
String
(
success
).
toLowerCase
()
!==
'true'
||
data
.
length
===
0
)
{
reject
(
result
.
error
||
'获取人员信息失败!'
)
return
}
resolve
(
result
.
data
)
}
opt
.
error
=
function
(
e
)
{
reject
(
e
)
}
qing
.
call
(
'request'
,
opt
)
})
}
async
function
initUser
()
{
console
.
log
(
'initUser>>'
);
console
.
log
(
'initUser>>'
);
const
openId
=
getUrlParamVal
(
'openId'
);
let
openId
=
getUrlParamVal
(
'openId'
);
const
jobNo
=
getUrlParamVal
(
'uid'
);
if
(
jobNo
)
{
let
isOK
=
false
try
{
const
[
personInfo
=
{}
]
=
await
getPersonInfosByJobNo
([
jobNo
])
if
(
personInfo
.
oId
)
{
openId
=
personInfo
.
oId
isOK
=
true
}
else
{
isOK
=
false
}
}
catch
(
e
)
{
isOK
=
false
}
if
(
!
isOK
)
{
alert
(
'应用启动发生错误,请联系开发人员'
)
return
}
}
const
isFromPersonDetail
=
'persondetail'
===
getUrlParamVal
(
'source'
);
const
isFromPersonDetail
=
'persondetail'
===
getUrlParamVal
(
'source'
);
// 判断是否来自人员详情。
// 判断是否来自人员详情。
// 如果是从人员详情过来的,需要对employeenumber、uid做强校验。
// 如果是从人员详情过来的,需要对employeenumber、uid做强校验。
...
...
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