Browse Source

feat: process相关

year 1 day ago
parent
commit
2392578c1d

+ 2 - 2
src/app/[locale]/(navbar)/vip/page.tsx

@@ -186,7 +186,7 @@ const Page = () => {
                                 return (
                                 return (
                                     <div
                                     <div
                                         key={item.coin_type}
                                         key={item.coin_type}
-                                        className="mt-[.06rem] text-[.18rem] font-black text-[var(--textColor4)]"
+                                        className="mt-[.06rem] text-[.18rem] font-black leading-[1] text-[var(--textColor4)]"
                                     >
                                     >
                                         R$ {formatAmount(item.amount)}
                                         R$ {formatAmount(item.amount)}
                                     </div>
                                     </div>
@@ -217,7 +217,7 @@ const Page = () => {
                                 return (
                                 return (
                                     <div
                                     <div
                                         key={item.coin_type}
                                         key={item.coin_type}
-                                        className="mt-[.06rem] text-[.32rem] font-black text-[var(--textColor4)]"
+                                        className="mt-[.06rem] text-[.32rem] font-black leading-[1] text-[var(--textColor4)]"
                                     >
                                     >
                                         {formatAmount(
                                         {formatAmount(
                                             (item.amount || 0) * (curReward.current?.multiple || 0)
                                             (item.amount || 0) * (curReward.current?.multiple || 0)

+ 1 - 1
src/app/[locale]/layout.tsx

@@ -92,7 +92,7 @@ export default async function LocaleLayout({
     const messages = await getMessages();
     const messages = await getMessages();
 
 
     return (
     return (
-        <html lang={locale} suppressHydrationWarning>
+        <html lang={locale} suppressHydrationWarning data-returnid={process.env.RENTER_ID}>
             <head>
             <head>
                 <script defer={true} src={"/iconfont.js"} />
                 <script defer={true} src={"/iconfont.js"} />
             </head>
             </head>

+ 2 - 0
src/utils/client/axios.ts

@@ -76,6 +76,8 @@ export default class Request {
                     // header请求头添加token
                     // header请求头添加token
                     config.headers["Token"] = getToken() || "";
                     config.headers["Token"] = getToken() || "";
                     config.headers["language"] = getCookies("language") || defaultLocale;
                     config.headers["language"] = getCookies("language") || defaultLocale;
+                    config.headers["x-return-id"] =
+                        document?.querySelector("html")?.dataset?.returnid;
                     if (config && config?.toast) {
                     if (config && config?.toast) {
                         Toast.show({
                         Toast.show({
                             icon: "loading",
                             icon: "loading",

+ 4 - 0
src/utils/server/index.ts

@@ -5,6 +5,10 @@ import { cookies } from "next/headers";
 import { ServerOptions } from "./type";
 import { ServerOptions } from "./type";
 
 
 const requestInterceptor = (options: ServerOptions) => {
 const requestInterceptor = (options: ServerOptions) => {
+    if (!options.headers) {
+        options.headers = {};
+    }
+    options.headers["x-return-id"] = process.env.RENTER_ID;
     // 判断token
     // 判断token
     if (options.checkToken) {
     if (options.checkToken) {
         const token = cookies().has("Token");
         const token = cookies().has("Token");