feat:模块名称调整
This commit is contained in:
File diff suppressed because one or more lines are too long
61
springboot-login/src/main/resources/static/ding/error.html
Normal file
61
springboot-login/src/main/resources/static/ding/error.html
Normal file
@@ -0,0 +1,61 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta content="IE=edge" http-equiv="X-UA-Compatible"/>
|
||||
<meta
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
|
||||
name="viewport"
|
||||
/>
|
||||
</head>
|
||||
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.contain {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
width: 100%;
|
||||
font-size: 14px;
|
||||
color: #8a8a8a;
|
||||
}
|
||||
|
||||
.errorImg {
|
||||
width: 30vw;
|
||||
height: 30vw;
|
||||
object-fit: contain;
|
||||
margin-bottom: 24px;
|
||||
margin-top: 25vw;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="contain">
|
||||
<img alt="" class="errorImg" src="error.png">
|
||||
<div id="message"></div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function getQueryString(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) return decodeURI(r[2]);
|
||||
return null;
|
||||
}
|
||||
|
||||
let errorMessage = getQueryString("msg");
|
||||
document.getElementById("message").innerText = errorMessage;
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
BIN
springboot-login/src/main/resources/static/ding/error.png
Normal file
BIN
springboot-login/src/main/resources/static/ding/error.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
37
springboot-login/src/main/resources/static/ding/index.html
Normal file
37
springboot-login/src/main/resources/static/ding/index.html
Normal file
@@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta content="IE=edge" http-equiv="X-UA-Compatible"/>
|
||||
<meta
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
|
||||
name="viewport"
|
||||
/>
|
||||
<title>钉钉授权</title>
|
||||
</head>
|
||||
<body>
|
||||
<script src="dingtalk.open.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function getQueryString(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) return decodeURI(r[2]);
|
||||
return null;
|
||||
}
|
||||
|
||||
dd.runtime.permission.requestAuthCode({
|
||||
corpId: getQueryString("corpId"),
|
||||
onSuccess: function (result) {
|
||||
let search = window.location.search + "&code=" + result.code;
|
||||
window.location.href = "/auth/ding/oauth2/" + getQueryString("service") + search;
|
||||
},
|
||||
onFail: function (err) {
|
||||
window.location.href = "./error.html?message=" + JSON.stringify(err);
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user