feat: update
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
@@ -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;
|
||||||
|
@@ -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)}
|
||||||
/>
|
/>
|
||||||
|
Reference in New Issue
Block a user