Jelajahi Sumber

fix: 增加meta标签

Before 8 bulan lalu
induk
melakukan
60252118cd

+ 1 - 0
messages/br.json

@@ -395,6 +395,7 @@
     "newPwd": "Please enter a new password",
     "checkPwd": "Please enter the new password again",
     "checkPwdReg": "The password is inconsistent twice",
+    "": "You cannot set the original password",
     "passwordMinReg": "The password cannot be less than 6 digits and more than 20 digits",
     "birthday": "Birthday",
     "birthdayReg": "The birthday cannot be empty",

+ 1 - 1
src/app/[locale]/(TabBar)/deposit/DepositData.tsx

@@ -200,7 +200,7 @@ const DepositData: FC<Props> = (props) => {
                                             <span> {item.amount}</span>
                                         </div>
 
-                                        {!activeType.has_pay && (
+                                        {!activeType.has_pay && item.rewards && (
                                             <RewardsText rewards={item.rewards} />
                                         )}
                                     </li>

+ 29 - 2
src/app/[locale]/confirmPassword/page.tsx

@@ -3,7 +3,7 @@ import { getFindPwdApi, getSendCodeApi } from "@/api/user";
 import ButtonOwn from "@/components/ButtonOwn";
 import DomainFooter from "@/components/DomainFooter";
 import HeaderBack from "@/components/HeaderBack";
-import { useRouter } from "@/i18n/routing";
+import { Link, useRouter } from "@/i18n/routing";
 import { useUserInfoStore } from "@/stores/useUserInfoStore";
 import { Form, Input, Toast } from "antd-mobile";
 import { FormInstance } from "antd-mobile/es/components/form";
@@ -77,7 +77,7 @@ const ResetPhone: FC<Props> = () => {
     };
     const checkValidator = (rules: any, value: string) => {
         const password = formRef.current?.getFieldValue("pwd");
-        if (value !== password) {
+        if (value === password) {
             return Promise.reject(new Error(t("form.checkPwdReg")));
         }
         return Promise.resolve();
@@ -102,6 +102,27 @@ const ResetPhone: FC<Props> = () => {
                     onValuesChange={onValuesChange}
                     footer={<ButtonOwn active>{t("confirmPwdPage.complete")}</ButtonOwn>}
                 >
+                    <Form.Item
+                        name="pwd"
+                        label=""
+                        extra={
+                            <span
+                                className={spanClassName}
+                                onClick={() => setVisible(!visible)}
+                            ></span>
+                        }
+                        rules={[
+                            { required: true, message: t("form.passwordReg") },
+                            { min: 6, max: 20, message: t("form.passwordMinReg") },
+                        ]}
+                    >
+                        <Input
+                            placeholder={t("form.newPwd")}
+                            maxLength={20}
+                            type={visible ? "text" : "password"}
+                        />
+                    </Form.Item>
+
                     <Form.Item
                         name="pwd"
                         label=""
@@ -136,7 +157,13 @@ const ResetPhone: FC<Props> = () => {
                         <Input placeholder={t("form.checkPwd")} maxLength={20} type={"password"} />
                     </Form.Item>
                 </Form>
+                <div className={"text-right"}>
+                    <Link href={"/resetPhone"} className={"text-[#fff]"}>
+                        {t("LoginPage.forgetPwd")}
+                    </Link>
+                </div>
             </div>
+
             <DomainFooter />
         </div>
     );

+ 7 - 0
src/app/[locale]/layout.tsx

@@ -32,6 +32,7 @@ export const metadata: Metadata = {
         address: false,
         telephone: false,
     },
+
     referrer: "no-referrer",
     other: {
         viewport: [
@@ -55,6 +56,12 @@ export default async function LocaleLayout({
 
     return (
         <html lang={locale} suppressHydrationWarning>
+            <head>
+                <meta
+                    httpEquiv="content-security-policy"
+                    content="manifest-src https://www.baidu.com"
+                />
+            </head>
             <body className={clsx("font-sans", fontSans.variable)}>
                 <NextIntlClientProvider messages={messages}>
                     <Providers themeProps={{ attribute: "class" }}>{children}</Providers>