diff --git a/src/pages/Guide-m.module.css b/src/pages/Guide-m.module.css
index f7e2306..b3f99b0 100644
--- a/src/pages/Guide-m.module.css
+++ b/src/pages/Guide-m.module.css
@@ -273,7 +273,7 @@
padding: 12px 89px;
- background: #489149;
+ background: #f9b85b;
/* 自动布局子元素 */
span {
@@ -286,7 +286,7 @@
font-variation-settings: "opsz" auto;
font-feature-settings: "kern" on;
- color: #ffffff;
+ color: #261138;
z-index: 0;
diff --git a/src/pages/Guide.tsx b/src/pages/Guide.tsx
index 6d9dd2b..2246670 100644
--- a/src/pages/Guide.tsx
+++ b/src/pages/Guide.tsx
@@ -168,12 +168,12 @@ function Proccess({
{title}
-
+
diff --git a/src/pages/Home-m.module.css b/src/pages/Home-m.module.css
index 723508d..e0a9d9a 100644
--- a/src/pages/Home-m.module.css
+++ b/src/pages/Home-m.module.css
@@ -2,6 +2,7 @@
display: flex;
flex-direction: column;
align-items: center;
+ padding-bottom: 94px;
.home_top {
display: flex;
align-items: center;
diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx
index bf7265a..8a07e1e 100644
--- a/src/pages/Home.tsx
+++ b/src/pages/Home.tsx
@@ -1,7 +1,7 @@
/*
* @LastEditors: John
* @Date: 2024-07-13 10:50:24
- * @LastEditTime: 2024-07-15 15:32:17
+ * @LastEditTime: 2024-07-16 16:27:46
* @Author: John
*/
import classes from "./Home-m.module.css";
@@ -11,26 +11,39 @@ import logo from "@/assets/logo.png";
import { CheckOutline, PlayOutline, StarOutline } from "antd-mobile-icons";
import { Button } from "antd-mobile";
import { useEffect, useState } from "react";
-import { api_homepage_query_user_income } from "@/server/api";
+import {
+ api_follow_twitter,
+ api_homepage_query_user_income,
+ api_query_whether_the_user_receives_the_registration_reward,
+} from "@/server/api";
import { useWebApp } from "@vkruglikov/react-telegram-web-app";
export default function () {
const WebApp = useWebApp();
const navigate = useNavigate();
- const [totalPoint, setTotalPoint] = useState(0);
+ const [totalPoint, setTotalPoint] = useState
();
const [signReward, setSignReward] = useState();
const [tgReward, setTgReward] = useState();
+ const [xReward, setXReward] = useState();
useEffect(() => {
(async () => {
- const { data } = await api_homepage_query_user_income().send({});
- const list = data?.data || [];
- setTotalPoint(list.reduce((acc, cur) => acc + parseInt(cur.opValue), 0));
- setSignReward(list.find((v) => v.opType == 4)?.opValue);
- setTgReward(list.find((v) => v.opType == 5)?.opValue);
+ UpdateHomeData();
})();
return () => {};
}, []);
+ async function UpdateHomeData() {
+ const { data: totalDataRes } =
+ await api_query_whether_the_user_receives_the_registration_reward().send(
+ {}
+ );
+ setTotalPoint(totalDataRes?.data);
+ const { data: incomeRes } = await api_homepage_query_user_income().send({});
+ const list = incomeRes?.data || [];
+ setSignReward(list.find((v) => v.opType == 4)?.opValue);
+ setTgReward(list.find((v) => v.opType == 5)?.opValue);
+ setXReward(list.find((v) => v.opType == 6)?.opValue);
+ }
return (
<>
@@ -49,7 +62,7 @@ export default function () {
fill="none"
onClick={() => {
WebApp.openTelegramLink(
- `https://t.me/${import.meta.env.VITE_TG_BOT_NAME}`
+ `https://t.me/${import.meta.env.VITE_TG_COMMUNITY}`
);
}}
>
@@ -57,6 +70,21 @@ export default function () {
+
+ Join X
+ Join X To Get Reward
+
+
+
Your rewards
@@ -71,6 +99,12 @@ export default function () {
Telegram Premium
{tgReward || 0}
+
+
+
+ Join X
+ {xReward || 0}
+
>
diff --git a/src/pages/Leaderboard-m.module.css b/src/pages/Leaderboard-m.module.css
index 2b4c26f..74a2239 100644
--- a/src/pages/Leaderboard-m.module.css
+++ b/src/pages/Leaderboard-m.module.css
@@ -103,7 +103,7 @@
display: flex;
padding: 12px 115px;
- background: #489149;
+ background: #261138;
> span {
display: flex;
align-items: center;
diff --git a/src/server/api.ts b/src/server/api.ts
index 4dd237d..09bb2c0 100644
--- a/src/server/api.ts
+++ b/src/server/api.ts
@@ -1,7 +1,7 @@
/*
* @LastEditors: John
* @Date: 2024-07-15 10:35:20
- * @LastEditTime: 2024-07-15 15:25:54
+ * @LastEditTime: 2024-07-16 16:04:49
* @Author: John
*/
import { GET, POST } from "./client";
@@ -94,3 +94,10 @@ export function api_homepage_subordinates_users() {
url: "/api/reward/subordinateUsers",
});
}
+
+// 关注推特
+export function api_follow_twitter() {
+ return POST