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