|
@@ -1,9 +1,14 @@
|
|
|
-import { useTranslations } from "next-intl";
|
|
|
+"use server";
|
|
|
+import { getServicesApi } from "@/api/customservice";
|
|
|
+import { Link } from "@/i18n/routing";
|
|
|
+import { getTranslations } from "next-intl/server";
|
|
|
import Form from "../components/Form";
|
|
|
import GoogleCom from "../components/GoogleCom";
|
|
|
|
|
|
-const Login = () => {
|
|
|
- const t = useTranslations("LoginPage");
|
|
|
+const Login = async () => {
|
|
|
+ const t = await getTranslations("LoginPage");
|
|
|
+ const services = await getServicesApi();
|
|
|
+ const defaultService = services?.find((item) => item.register_show === 1);
|
|
|
return (
|
|
|
<>
|
|
|
<GoogleCom />
|
|
@@ -12,6 +17,27 @@ const Login = () => {
|
|
|
<span className={"mr-[20px] text-[14px] text-[#fff]"}>{t("childTips")}</span>
|
|
|
<span className={"iconfont icon-a-18 text-[red]"}></span>
|
|
|
</div>
|
|
|
+
|
|
|
+ <div
|
|
|
+ className={`absolute bottom-[0.84rem] right-[0.12rem] z-50 flex w-[0.6944rem] flex-col items-center justify-center`}
|
|
|
+ >
|
|
|
+ {defaultService && (
|
|
|
+ <Link
|
|
|
+ href={defaultService.url}
|
|
|
+ className={
|
|
|
+ "flex h-[0.54rem] w-[0.54rem] items-center justify-center rounded-[50%]" +
|
|
|
+ " bg-gradient-to-t from-[#ff611b] to-[#ffcf35]"
|
|
|
+ }
|
|
|
+ target={"_blank"}
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ className={"h-[0.3889rem] w-[0.3889rem] object-contain"}
|
|
|
+ src={defaultService.icon_url}
|
|
|
+ alt={""}
|
|
|
+ ></img>
|
|
|
+ </Link>
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
</>
|
|
|
);
|
|
|
};
|