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