Sfoglia il codice sorgente

fix: 修改轮询方式

ansoni 1 mese fa
parent
commit
3efc95e16c

+ 1 - 1
next.config.mjs

@@ -4,7 +4,7 @@ import createNextIntlPlugin from "next-intl/plugin";
 const withNextIntl = createNextIntlPlugin();
 /** @type {import('next').NextConfig} */
 const nextConfig = {
-    // output: "standalone",
+    output: "standalone",
     productionBrowserSourceMaps: true,
     reactStrictMode: false,
     env: {

+ 2 - 3
src/app/[locale]/(TabBar)/[[...share]]/@actionWidget/page.tsx

@@ -1,5 +1,4 @@
 import { getServicesApi } from "@/api/customservice";
-import Box from "@/components/Box";
 import AutoShowDialog from "@/dialog/auto";
 import { Link } from "@/i18n/routing";
 import { getTranslations } from "next-intl/server";
@@ -21,7 +20,7 @@ const Page = async () => {
     const services = await getServicesApi();
     const t = await getTranslations("HomePage");
     return (
-        <Box>
+        <div className={"px-[0.12rem] py-[0.08rem]"}>
             {/*about*/}
             <div
                 className={
@@ -87,7 +86,7 @@ const Page = async () => {
             </div>
             <Dialogs></Dialogs>
             <AutoShowDialog />
-        </Box>
+        </div>
     );
 };
 

+ 3 - 5
src/app/[locale]/(TabBar)/[[...share]]/_home/HomeCategory.tsx

@@ -1,4 +1,4 @@
-'use client'
+"use client";
 
 import { GroupType } from "@/api/home";
 import Box from "@/components/Box";
@@ -10,7 +10,6 @@ import { useTranslations } from "next-intl";
 import React from "react";
 import { Swiper, SwiperSlide } from "swiper/react";
 
-
 const buttonGroup = [
     {
         icon: "qianbao3",
@@ -125,8 +124,7 @@ const TabItem = ({
     );
 };
 
-const HomeCateGory: React.FC<Props> = ({tabs}) => {
-
+const HomeCateGory: React.FC<Props> = ({ tabs }) => {
     const router = useRouter();
     const { show_again_game, show_free_game } = useSystemStore((state) => {
         return {
@@ -143,7 +141,7 @@ const HomeCateGory: React.FC<Props> = ({tabs}) => {
         }
         return true;
     });
-    const tabData = [...(tabs||[]), ...newButtonGroup];
+    const tabData = [...(tabs || []), ...newButtonGroup];
 
     const selectHandler = (item: TabItemType, index: number) => {
         if (item.bet_type === 2 || item.bet_type === 3) {

+ 0 - 1
src/app/[locale]/(enter)/login/layout.tsx

@@ -14,7 +14,6 @@ export default async function Layout({
     children: ReactNode;
     params: { locale: string };
 }) {
-    const t = await getTranslations("ProfilePage");
     return (
         <div className="h-[100%] bg-[url('/bg.png')]">
             <HeaderBack showBack={false} useBg={true} />

+ 7 - 4
src/app/[locale]/template.tsx

@@ -10,10 +10,13 @@ const Template = ({ children }: { children: ReactNode }) => {
             <motion.div
                 layout
                 key={key}
-                initial={{ y: 30, opacity: 0 }}
-                animate={{ y: 0, scale: 1, opacity: 1 }}
-                exit={{ y: -20, opacity: 0 }}
-                transition={{ duration: 0.3 }}
+                initial={{ x: 100, opacity: 0 }}
+                animate={{ x: 0, opacity: 1 }}
+                exit={{ x: 100, opacity: 0 }}
+                transition={{
+                    duration: 0.3,
+                    ease: [0, 0.71, 0.2, 1.01],
+                }}
                 className={"h-[100%]"}
             >
                 {children}