username 1 年間 前
コミット
d891e45ad8

ファイルの差分が大きいため隠しています
+ 2969 - 108
pnpm-lock.yaml


+ 7 - 1
src/app/[locale]/(ordinary)/profile/page.scss

@@ -13,7 +13,7 @@
       background: -webkit-linear-gradient(top, #ffaa30, #ffe6be);
       background: -o-linear-gradient(top, #ffaa30 0, #ffe6be 100%);
       background: linear-gradient(180deg, #ffaa30, #ffe6be);
-      min-height: .93rem;
+      height: auto;
     }
 
     .userInfo {
@@ -28,6 +28,12 @@
       padding: .11rem .18rem;
       -webkit-box-sizing: border-box;
       box-sizing: border-box;
+      margin-bottom: .23rem;
+
+      &.active {
+        margin-bottom: 0;
+      }
+
       & > div {
         display: flex;
         -webkit-box-pack: justify;

+ 14 - 10
src/app/[locale]/(ordinary)/profile/page.tsx

@@ -54,10 +54,12 @@ const Profile: FC<Props> = () => {
     };
 
     const divClassName = clsx("bgImg", token && "default");
+    const divClassName2 = clsx("userContent", token && "active");
+    const divClassName3 = clsx("userInfo", token && "active");
     return (
         <div className="profile-box">
-            <div className="userContent">
-                <div className="userInfo">
+            <div className={divClassName2}>
+                <div className={divClassName3}>
                     <div>
                         <div className={divClassName}></div>
                         {token && (
@@ -67,12 +69,15 @@ const Profile: FC<Props> = () => {
                             </div>
                         )}
                     </div>
-                    {!token && (
-                        <div className="goto" onClick={() => goPage("/login")}>
-                            <span>{t("Login")}</span>
-                            <span className="iconfont icon-xiangzuo1"></span>
-                        </div>
-                    )}
+                    {
+                        !token && 
+                        (
+                            <div className="goto" onClick={() => goPage("/login")}>
+                                <span>{t("Login")}</span>
+                                <span className="iconfont icon-xiangzuo1"></span>
+                            </div>
+                        )
+                    }
                 </div>
                 {token && (
                     <div className="coin">
@@ -90,7 +95,6 @@ const Profile: FC<Props> = () => {
                             <span className="iconfont icon-gift2"></span>
                             <div>
                                 <span onClick={() => setVisible(true)}>
-                                    {" "}
                                     {t("Bônus")} <img className="a" src="/img/a.png" alt="" />
                                 </span>
                                 <div className="num">
@@ -105,7 +109,7 @@ const Profile: FC<Props> = () => {
 
             <div className="link">
                 <span onClick={() => goPage("/deposit")}>{t("Depósito")}</span>
-                <span onClick={() => goPage(token ? "/withdraw" : `/login?redirect=withdraw`)}>
+                <span onClick={() => goPage(token ? "/withdraw" : `/login?redirect=/withdraw`)}>
                     {t("Sacar")}
                 </span>
             </div>

+ 7 - 0
src/components/Footer/index.tsx

@@ -3,6 +3,7 @@ import { usePathname, useRouter } from "@/i18n";
 import clsx from "clsx";
 import { FC, PropsWithChildren, ReactNode } from "react";
 import "./style.scss";
+import { useGlobalStore } from "@/stores";
 
 /**
  * @description 底部Tab组件
@@ -14,6 +15,8 @@ export interface FooterProps {
 }
 
 const Footer: FC<PropsWithChildren> = () => {
+    const { token } = useGlobalStore();
+
     const tabList = [
         {
             iconSpanName: "icon-home",
@@ -46,6 +49,10 @@ const Footer: FC<PropsWithChildren> = () => {
 
     const router = useRouter();
     const goPage = (path = "/") => {
+        if(!token && (path == '/deposit' || path == "/profile")) {
+            router.replace(`/login?redirect=${path}`)
+            return
+        }
         router.push(path);
     };
 

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません