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

View File

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

View File

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