feat: 🎸 issue update

This commit is contained in:
zhangqingwu
2024-08-04 15:16:25 +08:00
committed by Lyric Wai
parent 55ea4ac849
commit 16f4d0882e
3 changed files with 16 additions and 11 deletions

View File

@@ -1,5 +1,5 @@
<template>
<div class="default-layout bg-white">
<div class="default-layout">
<PageHeader />
<slot />
<PageFooter />

View File

@@ -15,6 +15,7 @@ export default defineNuxtConfig({
head: {
viewport:
"width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no, viewport-fit=cover",
meta: [{ name: "theme-color", content: "#ffffff" }],
link: [
{
rel: "apple-touch-icon",

View File

@@ -12,16 +12,20 @@ export async function request(url: string) {
// ignore
}
const resp = await fetch(url, { method: "Get" });
const data = await resp.json();
try {
const resp = await fetch(url, { method: "Get" });
const data = await resp.json();
localStorage.setItem(
key,
JSON.stringify({
expire_time: new Date().getTime() + 1000 * 60 * 60 * 24,
data,
})
);
localStorage.setItem(
key,
JSON.stringify({
expire_time: new Date().getTime() + 1000 * 60 * 60 * 24,
data,
})
);
return data;
return data;
} catch (error) {
console.log("request error", error);
}
}