suit phone

This commit is contained in:
2025-02-25 21:25:52 +08:00
parent 59c087865f
commit 4616650184
3 changed files with 49 additions and 27 deletions

View File

@@ -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;
}

View File

@@ -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();

View File

@@ -16,7 +16,7 @@
{% block content %}{% endblock %}
<footer>
{% block footer %}
<small> &copy; 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">&uarr;</a></p> -->
{% endblock %}