Sfoglia il codice sorgente

fix:5916 【bcwin网站】多端支持_pwa 移动端安卓无法正常进入

Before 7 mesi fa
parent
commit
ca888502e8

+ 15 - 15
src/app/[locale]/providers.tsx

@@ -3,7 +3,7 @@ import Sidebar from "@/components/Layout/Sidebar";
 import Loading from "@/components/Loading";
 import { useSystemStore } from "@/stores/useSystemStore";
 import { setHtmlFontSize } from "@/utils";
-import { ConfigProvider, Dialog } from "antd-mobile";
+import { ConfigProvider } from "antd-mobile";
 import enUS from "antd-mobile/es/locales/en-US";
 import { useLocale } from "next-intl";
 import { ThemeProviderProps } from "next-themes/dist/types";
@@ -23,20 +23,20 @@ const initFirebase = () => {
     if (document.location.protocol.indexOf("https") === -1) return;
     //  浏览器是否支持 且是 pwa
     if (!window.Notification) {
-        Dialog.alert({
-            getContainer: null,
-            bodyStyle: { background: "#fff" },
-            title: "提示",
-            confirmText: "我知道了",
-            content: (
-                <>
-                    <div className={"text-center"}>
-                        <p>当前版本浏览器不支持通知</p>
-                        <p>请更换或升级浏览器获得更好使用体验</p>
-                    </div>
-                </>
-            ),
-        });
+        // Dialog.alert({
+        //     getContainer: null,
+        //     bodyStyle: { background: "#fff" },
+        //     title: "提示",
+        //     confirmText: "我知道了",
+        //     content: (
+        //         <>
+        //             <div className={"text-center"}>
+        //                 <p>当前版本浏览器不支持通知</p>
+        //                 <p>请更换或升级浏览器获得更好使用体验</p>
+        //             </div>
+        //         </>
+        //     ),
+        // });
         return;
     }
     //  是否开启通知

+ 3 - 4
src/components/Box/WheelModal.tsx

@@ -200,11 +200,10 @@ export const WheelClient: FC<WheelProps> = (props) => {
         } else {
             setButtonText(`${current.can || 0}`);
         }
-        // setTimeout(() => {
-        //     setButtonText(`${current.can || 0}`);
-        // }, 3000);
 
-        onRotateEnd && onRotateEnd();
+        setTimeout(() => {
+            onRotateEnd && onRotateEnd();
+        }, 2000);
     };
 
     useEffect(() => {

+ 5 - 2
src/components/Box/index.tsx

@@ -48,13 +48,16 @@ const openWindow = (url: string) => {
  * @description 红包雨验证
  */
 const isStartPacketsHandler = async () => {
+    let packets = [];
     if (getToken()) {
         let redPacketInfo = await lredPacketApi();
-        return redPacketInfo.data?.red_packets || [];
+        packets = redPacketInfo.data?.red_packets || [];
     } else {
         let redPacketInfo = await redPacketApi();
-        return redPacketInfo.data || [];
+        packets = redPacketInfo.data || [];
     }
+    console.log(`🚀🚀🚀🚀🚀-> in index.tsx on 59`, packets);
+    return packets;
 };
 
 const Box: FC<PropsWithChildren<Props>> = (props) => {