Compare commits
2 Commits
91c7a7c562
...
330f8d3b8c
Author | SHA1 | Date | |
---|---|---|---|
330f8d3b8c | |||
4616650184 |
@@ -1,14 +1,14 @@
|
||||
main {
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
font-size: 25px;
|
||||
font-size: 18px;
|
||||
}
|
||||
input {
|
||||
width: 4ch;
|
||||
text-align: center;
|
||||
}
|
||||
hr {
|
||||
width: 450px;
|
||||
width: 350px;
|
||||
height: 3px;
|
||||
}
|
||||
.grail{
|
||||
@@ -20,7 +20,7 @@ hr {
|
||||
align-items: center;
|
||||
}
|
||||
.handler {
|
||||
width: 450px;
|
||||
width: 350px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-content: space-between;
|
||||
@@ -29,8 +29,8 @@ hr {
|
||||
align-items: center;
|
||||
}
|
||||
button, input {
|
||||
font-size: 25px;
|
||||
font-size: 18px;
|
||||
}
|
||||
form {
|
||||
width:450px;
|
||||
width:350px;
|
||||
}
|
@@ -43,30 +43,52 @@ function checknext() {
|
||||
.catch(error => console.error('Error:', error));
|
||||
|
||||
}
|
||||
function apiAuth() {
|
||||
if (!window.h5sdk) {
|
||||
alert("请在飞书客户端中打开");
|
||||
return;
|
||||
}
|
||||
// function apiAuth() {
|
||||
// if (!window.h5sdk) {
|
||||
// alert("请在飞书客户端中打开");
|
||||
// return;
|
||||
// }
|
||||
|
||||
window.h5sdk.ready(() => {
|
||||
tt.requestAccess({
|
||||
appID: "your_app_id",
|
||||
scopeList: [],
|
||||
success(res) {
|
||||
// 将 code 发送到服务端
|
||||
fetch(`/callback?code=${res.code}`)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
console.log("用户信息:", data);
|
||||
// window.h5sdk.ready(() => {
|
||||
// tt.requestAccess({
|
||||
// appID: "your_app_id",
|
||||
// scopeList: [],
|
||||
// success(res) {
|
||||
// // 将 code 发送到服务端
|
||||
// fetch(`/callback?code=${res.code}`)
|
||||
// .then(response => response.json())
|
||||
// .then(data => {
|
||||
// console.log("用户信息:", data);
|
||||
// // 在页面上展示用户姓名
|
||||
// document.getElementById("username").innerText = data.name;
|
||||
// });
|
||||
// },
|
||||
// fail(err) {
|
||||
// console.error("获取授权码失败:", err);
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
// apiAuth();
|
||||
|
||||
function apiAuth() {
|
||||
tt.requestAccess({
|
||||
appID: "cli_a70da4f71bf1d00c",
|
||||
scopeList: [],
|
||||
success(res) {
|
||||
// 将 code 发送到服务端
|
||||
fetch(`/callback?code=${res.code}`)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
// console.log("用户信息:", data);
|
||||
// 在页面上展示用户姓名
|
||||
document.getElementById("username").innerText = data.name;
|
||||
document.getElementById("username").innerText = data.name;
|
||||
});
|
||||
},
|
||||
fail(err) {
|
||||
console.error("获取授权码失败:", err);
|
||||
},
|
||||
fail(err) {
|
||||
console.error("获取授权码失败:", err);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
apiAuth();
|
@@ -16,7 +16,7 @@
|
||||
{% block content %}{% endblock %}
|
||||
<footer>
|
||||
{% block footer %}
|
||||
<small> © 2025 <a href="http://yum2.cc" title="Written by luff">luff</a> /
|
||||
<small id="username"> luff
|
||||
</small>
|
||||
<!-- <p><a id="bottom" href="#" title="Go Top">↑</a></p> -->
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user