feat: update

This commit is contained in:
landaiqing
2024-04-26 00:43:58 +08:00
parent 773dbe1e7e
commit 21e475db41
3 changed files with 10 additions and 4 deletions

View File

@@ -41,7 +41,7 @@ export async function get(): Promise<TokenInfoType> {
return {
code: 0,
data: {
str: 'wallhaven',
str: 'wallhaven1',
token: tokenRaw,
},
msg: 'success',
@@ -64,7 +64,7 @@ export function isSupportWebp() {
export async function load() {
const [degree, src] = await handle(wallhaven)
info.angle = degree
console.log('degree', degree)
return src
}
@@ -75,6 +75,8 @@ export function sleep(time: number) {
}
export async function verify(token: string, deg: number): Promise<TicketInfoType> {
console.log(deg)
console.log(info.angle)
const { angle } = info
const success = token === tokenRaw && Math.abs(deg - angle) <= 5

View File

@@ -43,8 +43,8 @@ h1,p{
border-radius: 10px;
width: 100vw;
height: 100vh;
max-width: 1500px;
max-height: 650px;
max-width: 99vw;
max-height: 93vh;
background: linear-gradient(180deg, #e0e9fd 0%, #e9ecf1 90%);
box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.4);
display: flex;

View File

@@ -384,6 +384,10 @@ export default observer(() => {
get={get}
load={load}
verify={verify}
limit={3}
result={(val) => {
console.log(val)
}}
open={open}
onClose={() => setOpen(false)}
/>