<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title></title>
<script src="https://auth.dingtalk.com/opendata-1.1.0.js"></script>
</head>
<body>
<div>
<dt-open-data open-type="userName" open-id="manager163711"></dt-open-data>
<dt-open-data open-type="userTitle" open-id="013768148774791"></dt-open-data>
<dt-open-data open-type="deptName" open-id="2202079361"></dt-open-data>
</div>
<div id="load">点击加载数据</div>
<script>
if (window.DTOpenData.init('ding1d4b5fc9223daa8e35c2f4657eb6378f')) {
document.getElementById('load').addEventListener('click', () => {
window.DTOpenData.update(document.querySelectorAll('dt-open-data'));
});
} else {
// 说明当前用户未登录,需要跳转到钉钉统一登录
window.location.href = '$登录态URL$';
}
</script>
</body>
</html>