feat:

This commit is contained in:
john 2024-07-22 13:56:28 +08:00
parent f96183a35f
commit 828841c2cc
33 changed files with 454 additions and 216 deletions

View File

@ -1,11 +1,11 @@
### ###
# @LastEditors: John # @LastEditors: John
# @Date: 2024-06-18 10:12:21 # @Date: 2024-06-18 10:12:21
# @LastEditTime: 2024-07-18 14:49:49 # @LastEditTime: 2024-07-22 13:52:06
# @Author: John # @Author: John
### ###
VITE_BASE_URL= VITE_BASE_URL=
VITE_BASE_API_URL=/dev VITE_BASE_API_URL=/dev
VITE_TG_COMMUNITY=johntest_bot VITE_TG_COMMUNITY=johntest_bot
VITE_TG_BOT_NAME=johntest_bot VITE_TG_BOT_NAME=johntest_bot
VITE_TG_BOT_WEBAPP_NAME=starcraft VITE_TG_BOT_WEBAPP_NAME=penguin_coop

View File

@ -1,7 +1,7 @@
/* /*
* @LastEditors: John * @LastEditors: John
* @Date: 2024-07-13 10:21:58 * @Date: 2024-07-13 10:21:58
* @LastEditTime: 2024-07-19 17:54:47 * @LastEditTime: 2024-07-22 13:55:00
* @Author: John * @Author: John
*/ */
import { MemoryRouter, Route, Routes } from "react-router-dom"; import { MemoryRouter, Route, Routes } from "react-router-dom";
@ -16,11 +16,6 @@ import Guide from "./pages/Guide";
import useUserStore from "./store/User"; import useUserStore from "./store/User";
import { useEffect } from "react"; import { useEffect } from "react";
import Index from "./pages/Index"; import Index from "./pages/Index";
import {
api_get_user_information,
api_login,
api_query_whether_the_user_receives_the_registration_reward,
} from "./server/api";
function App() { function App() {
const WebApp = useWebApp(); const WebApp = useWebApp();

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><defs><clipPath id="master_svg0_2_1259"><rect x="0" y="0" width="24" height="24" rx="0"/></clipPath><clipPath id="master_svg1_2_1261"><rect x="22.5" y="2" width="21" height="21" rx="0"/></clipPath><clipPath id="master_svg2_2_1262"><rect x="44.5" y="1" width="22" height="22" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_2_1259)"><g><g transform="matrix(-1,0,0,1,45,0)" clip-path="url(#master_svg1_2_1261)"><g transform="matrix(-1,0,0,1,89,0)" clip-path="url(#master_svg2_2_1262)"><g><path d="M62.922799999999995,22L49.07715,22C47.65566,22,46.5,20.8535,46.5,19.443199999999997L46.5,6.556760000000001C46.5,5.14653,47.65566,4,49.07715,4L62.922799999999995,4C64.3443,4,65.5,5.14651,65.5,6.55674L65.5,19.4433C65.5,20.8535,64.3421,22,62.922799999999995,22ZM49.07715,5.43262C48.45088,5.43262,47.94177,5.93765,47.94177,6.55896L47.94177,19.4454C47.94177,20.0667,48.45088,20.5719,49.07715,20.5719L62.922799999999995,20.5719C63.549099999999996,20.5719,64.0582,20.0668,64.0582,19.4455L64.0582,6.55674C64.0582,5.93544,63.549099999999996,5.43035,62.922799999999995,5.43035L49.07715,5.4303L49.07715,5.43262Z" fill="#ADADAD" fill-opacity="1"/></g><g><path d="M59.797560000000004,10L52.202439,10C51.816098,10,51.5,10.318349,51.5,10.707443C51.5,11.096540000000001,51.816098,11.41489,52.202439,11.41489L59.797560000000004,11.41489C60.1839,11.41489,60.5,11.096540000000001,60.5,10.707443C60.5,10.318349,60.1839,10,59.797560000000004,10ZM59.797560000000004,14.58511L52.202439,14.58511C51.816098,14.58511,51.5,14.903459999999999,51.5,15.29256C51.5,15.681650000000001,51.816098,16,52.202439,16L59.797560000000004,16C60.1839,16,60.5,15.681650000000001,60.5,15.29256C60.5,14.903459999999999,60.1839,14.58511,59.797560000000004,14.58511Z" fill="#ADADAD" fill-opacity="1"/></g><g><path d="M51.235632,2C50.831034,2,50.5,2.35122,50.5,2.780488L50.5,6.21951C50.5,6.64878,50.831034,7,51.235632,7C51.64023,7,51.97126,6.64878,51.97126,6.21951L51.97126,2.780488C51.97126,2.35122,51.64023,2,51.235632,2ZM59.76437,2C59.35977,2,59.02874,2.35122,59.02874,2.780488L59.02874,6.21951C59.02874,6.64878,59.35977,7,59.76437,7C60.16897,7,60.5,6.64878,60.5,6.21951L60.5,2.780488C60.5,2.35122,60.16897,2,59.76437,2Z" fill="#ADADAD" fill-opacity="1"/></g></g></g></g></g></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><defs><clipPath id="master_svg0_2_1305"><rect x="0" y="0" width="24" height="24" rx="0"/></clipPath><clipPath id="master_svg1_2_1307"><rect x="22.5" y="2" width="21" height="21" rx="0"/></clipPath><clipPath id="master_svg2_2_1309"><rect x="44.5" y="1" width="22" height="22" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_2_1305)"><g><g transform="matrix(-1,0,0,1,45,0)" clip-path="url(#master_svg1_2_1307)"><g transform="matrix(-1,0,0,1,89,0)" clip-path="url(#master_svg2_2_1309)"><g><path d="M62.922799999999995,22L49.07715,22C47.65566,22,46.5,20.8535,46.5,19.443199999999997L46.5,6.556760000000001C46.5,5.14653,47.65566,4,49.07715,4L62.922799999999995,4C64.3443,4,65.5,5.14651,65.5,6.55674L65.5,19.4433C65.5,20.8535,64.3421,22,62.922799999999995,22ZM49.07715,5.43262C48.45088,5.43262,47.94177,5.93765,47.94177,6.55896L47.94177,19.4454C47.94177,20.0667,48.45088,20.5719,49.07715,20.5719L62.922799999999995,20.5719C63.549099999999996,20.5719,64.0582,20.0668,64.0582,19.4455L64.0582,6.55674C64.0582,5.93544,63.549099999999996,5.43035,62.922799999999995,5.43035L49.07715,5.4303L49.07715,5.43262Z" fill="#E2C72D" fill-opacity="1"/></g><g><path d="M59.797560000000004,10L52.202439,10C51.816098,10,51.5,10.318349,51.5,10.707443C51.5,11.096540000000001,51.816098,11.41489,52.202439,11.41489L59.797560000000004,11.41489C60.1839,11.41489,60.5,11.096540000000001,60.5,10.707443C60.5,10.318349,60.1839,10,59.797560000000004,10ZM59.797560000000004,14.58511L52.202439,14.58511C51.816098,14.58511,51.5,14.903459999999999,51.5,15.29256C51.5,15.681650000000001,51.816098,16,52.202439,16L59.797560000000004,16C60.1839,16,60.5,15.681650000000001,60.5,15.29256C60.5,14.903459999999999,60.1839,14.58511,59.797560000000004,14.58511Z" fill="#E2C72D" fill-opacity="1"/></g><g><path d="M51.235632,2C50.831034,2,50.5,2.35122,50.5,2.780488L50.5,6.21951C50.5,6.64878,50.831034,7,51.235632,7C51.64023,7,51.97126,6.64878,51.97126,6.21951L51.97126,2.780488C51.97126,2.35122,51.64023,2,51.235632,2ZM59.76437,2C59.35977,2,59.02874,2.35122,59.02874,2.780488L59.02874,6.21951C59.02874,6.64878,59.35977,7,59.76437,7C60.16897,7,60.5,6.64878,60.5,6.21951L60.5,2.780488C60.5,2.35122,60.16897,2,59.76437,2Z" fill="#E2C72D" fill-opacity="1"/></g></g></g></g></g></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.6 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="25" viewBox="0 0 24 25"><defs><clipPath id="master_svg0_2_1272"><rect x="0" y="0" width="24" height="25" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_2_1272)"><g><g><path d="M3.75 11.75C3.75 11.197715250169207 4.197715250169207 10.75 4.75 10.75L9.25 10.75C9.25 10.75 9.25 10.75 9.25 10.75L9.25 21.25C9.25 21.25 9.25 21.25 9.25 21.25L3.75 21.25C3.75 21.25 3.75 21.25 3.75 21.25Z" fill-opacity="0" stroke-opacity="1" stroke="#E2C72D" fill="none" stroke-width="1.5"/></g><g transform="matrix(1,0,0,-1,0,44)"><path d="M9.75 22.75C9.75 22.75 9.75 22.75 9.75 22.75L15.25 22.75C15.25 22.75 15.25 22.75 15.25 22.75L15.25 39.25C15.25 39.8022847498308 14.802284749830793 40.25 14.25 40.25L10.75 40.25C10.197715250169207 40.25 9.75 39.8022847498308 9.75 39.25Z" fill-opacity="0" stroke-opacity="1" stroke="#E2C72D" fill="none" stroke-width="1.5"/></g><g><path d="M15.75 8.75C15.75 8.75 15.75 8.75 15.75 8.75L20.25 8.75C20.802284749830793 8.75 21.25 9.197715250169207 21.25 9.75L21.25 21.25C21.25 21.25 21.25 21.25 21.25 21.25L15.75 21.25C15.75 21.25 15.75 21.25 15.75 21.25Z" fill-opacity="0" stroke-opacity="1" stroke="#E2C72D" fill="none" stroke-width="1.5"/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="25" viewBox="0 0 24 25"><defs><clipPath id="master_svg0_2_0660"><rect x="0" y="0" width="24" height="25" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_2_0660)"><g><g><path d="M3.75 11.75C3.75 11.197715250169207 4.197715250169207 10.75 4.75 10.75L9.25 10.75C9.25 10.75 9.25 10.75 9.25 10.75L9.25 21.25C9.25 21.25 9.25 21.25 9.25 21.25L3.75 21.25C3.75 21.25 3.75 21.25 3.75 21.25Z" fill-opacity="0" stroke-opacity="1" stroke="#ADADAD" fill="none" stroke-width="1.5"/></g><g transform="matrix(1,0,0,-1,0,44)"><path d="M9.75 22.75C9.75 22.75 9.75 22.75 9.75 22.75L15.25 22.75C15.25 22.75 15.25 22.75 15.25 22.75L15.25 39.25C15.25 39.8022847498308 14.802284749830793 40.25 14.25 40.25L10.75 40.25C10.197715250169207 40.25 9.75 39.8022847498308 9.75 39.25Z" fill-opacity="0" stroke-opacity="1" stroke="#ADADAD" fill="none" stroke-width="1.5"/></g><g><path d="M15.75 8.75C15.75 8.75 15.75 8.75 15.75 8.75L20.25 8.75C20.802284749830793 8.75 21.25 9.197715250169207 21.25 9.75L21.25 21.25C21.25 21.25 21.25 21.25 21.25 21.25L15.75 21.25C15.75 21.25 15.75 21.25 15.75 21.25Z" fill-opacity="0" stroke-opacity="1" stroke="#ADADAD" fill="none" stroke-width="1.5"/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="44" height="44" viewBox="0 0 44 44"><defs><clipPath id="master_svg0_1_154"><rect x="10" y="10" width="24" height="24" rx="0"/></clipPath><clipPath id="master_svg1_1_27"><rect x="11" y="11" width="22" height="22" rx="0"/></clipPath></defs><g><g><rect x="0" y="0" width="44" height="44" rx="22" fill="#27272A" fill-opacity="1"/></g><g clip-path="url(#master_svg0_1_154)"><g clip-path="url(#master_svg1_1_27)"><g><path d="M28.240329296875,30.249937890625L16.016029296875,30.249937890625C14.644519296875,30.250537890625,13.531851066875,29.139837890625,13.530029296875,27.768337890625L13.530029296875,17.852937890625C13.531850646875,16.481427890625,14.644519296875,15.370729865625,16.016029296875,15.371337890625L16.914729296875,15.371337890625C17.279239296875,15.371337890625,17.574729296875,15.666829890625,17.574729296875,16.031337890625C17.574729296875,16.395847890625,17.279239296875,16.691337890625,16.914729296875,16.691337890625L16.016029296875,16.691337890625C15.373279296875,16.690117890625,14.851239296875,17.210187890625,14.850029296875,17.852937890625L14.850029296875,27.767237890624997C14.850639296875,28.410437890624998,15.372849296875,28.931137890625,16.016029296875,28.929937890625L28.240329296875,28.929937890625C28.881329296875002,28.928737890625,29.400729296875,28.409337890625,29.401929296875,27.768337890625L29.401929296875,17.852937890625C29.400729296875,17.211907890625,28.881329296875002,16.692547890625,28.240329296875,16.691337890625L27.408729296875002,16.691337890625C27.044229296875002,16.691337890625,26.748729296875,16.395847890625,26.748729296875,16.031337890625C26.748729296875,15.666829890625,27.044229296875002,15.371337890625,27.408729296875002,15.371337890625L28.240329296875,15.371337890625C29.610529296875,15.372548900625,30.721229296875,16.482707890625,30.723029296875,17.852937890625L30.723029296875,27.767237890624997C30.721829296875,29.137937890625,29.611029296875,30.248737890625,28.240329296875,30.249937890625Z" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M24.120819140625002,16.6914390625L20.050819140625002,16.6914390625C19.686309140625,16.6914390625,19.390819140625,16.3959490625,19.390819140625,16.0314390625C19.390819140625,15.6669290625,19.686309140625,15.3714390625,20.050819140625002,15.3714390625L24.120819140625002,15.3714390625C24.485319140625002,15.3714390625,24.780819140625,15.6669290625,24.780819140625,16.0314390625C24.780819140625,16.3959490625,24.485319140625002,16.6914390625,24.120819140625002,16.6914390625ZM29.861719140625,21.3620390625L14.394619140625,21.3620390625C14.030111140625,21.3620390625,13.734619140625,21.066549062500002,13.734619140625,20.7020390625C13.734619140625,20.3375290625,14.030111140625,20.0420390625,14.394619140625,20.0420390625L29.861719140625,20.0420390625C30.226219140625,20.0420390625,30.521719140625,20.3375290625,30.521719140625,20.7020390625C30.521719140625,21.066549062500002,30.226219140625,21.3620390625,29.861719140625,21.3620390625ZM18.462419140625002,18.4492390625C18.097909140625,18.4492390625,17.802419140625,18.1537490625,17.802419140625,17.789239062500002L17.802419140625,14.5750390625C17.802419140625,14.2105310625,18.097909140625,13.9150390625,18.462419140625002,13.9150390625C18.826929140625,13.9150390625,19.122419140625,14.2105310625,19.122419140625,14.5750390625L19.122419140625,17.789239062500002C19.122419140625,18.1537490625,18.826929140625,18.4492390625,18.462419140625002,18.4492390625ZM25.793919140625,18.4492390625C25.429419140625,18.4492390625,25.133919140625,18.1537490625,25.133919140625,17.789239062500002L25.133919140625,14.5750390625C25.133919140625,14.2105310625,25.429419140625,13.9150390625,25.793919140625,13.9150390625C26.158419140625,13.9150390625,26.453919140625,14.2105310625,26.453919140625,14.5750390625L26.453919140625,17.789239062500002C26.453919140625,18.1537490625,26.158419140625,18.4492390625,25.793919140625,18.4492390625Z" fill="#FFFFFF" fill-opacity="1"/></g></g></g></g></svg>

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><defs><clipPath id="master_svg0_2_270"><rect x="24" y="0" width="24" height="24" rx="0"/></clipPath></defs><g transform="matrix(0,1,-1,0,24,-24)" clip-path="url(#master_svg0_2_270)"><g><path d="M35.29289,4.292893C35.68342,3.9023689,36.31658,3.9023689,36.70711,4.292893C36.70711,4.292893,43.7071,11.29289,43.7071,11.29289C44.0976,11.68342,44.0976,12.31658,43.7071,12.70711C43.3166,13.09763,42.6834,13.09763,42.2929,12.70711C42.2929,12.70711,37,7.414210000000001,37,7.414210000000001C37,7.414210000000001,37,19,37,19C37,19.552300000000002,36.552279999999996,20,36,20C35.447720000000004,20,35,19.552300000000002,35,19C35,19,35,7.414210000000001,35,7.414210000000001C35,7.414210000000001,29.70711,12.70711,29.70711,12.70711C29.316580000000002,13.09763,28.683417,13.09763,28.292893,12.70711C27.9023689,12.31658,27.9023689,11.68342,28.292893,11.29289C28.292893,11.29289,35.29289,4.292893,35.29289,4.292893C35.29289,4.292893,35.29289,4.292893,35.29289,4.292893Z" fill-rule="evenodd" fill="#000000" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><defs><clipPath id="master_svg0_2_1114"><rect x="0" y="0" width="24" height="24" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_2_1114)"><g><path d="M21.74999976158142,9.490525850982667L21.74999976158142,9.489995850982666Q21.75039976158142,8.633795850982665,21.07439976158142,8.107975850982665L13.074499761581421,1.886019850982666Q11.999999761581421,1.050165850982666,10.925549761581422,1.8859778509826661L2.925499361581421,8.108015850982666Q2.2494047615814208,8.633955850982666,2.249999761581421,9.489995850982666L2.249999761581421,20.000005850982667Q2.249999761581421,21.750005850982667,3.999999761581421,21.750005850982667L19.99999976158142,21.750005850982667Q20.724899761581423,21.750005850982667,21.237399761581422,21.237405850982665Q21.74999976158142,20.724905850982665,21.74999976158142,20.000005850982667L21.74999976158142,9.490525850982667ZM20.15359976158142,9.292025850982666Q20.25009976158142,9.367115850982666,20.24999976158142,9.489475850982666L20.24999976158142,9.489995850982666L20.24999976158142,20.000005850982667Q20.24999976158142,20.250005850982667,19.99999976158142,20.250005850982667L3.999999761581421,20.250005850982667Q3.749999761581421,20.250005850982667,3.749999761581421,20.000005850982667L3.749999761581421,9.489995850982666Q3.749914761581421,9.367115850982666,3.846500761581421,9.291975850982666L11.846449761581422,3.0700218509826662Q11.999999761581421,2.950571850982666,12.15349976158142,3.069978850982666L20.15359976158142,9.292025850982666Z" fill-rule="evenodd" fill="#E2C72D" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

1
src/assets/home-fill.svg Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><defs><clipPath id="master_svg0_2_1280"><rect x="0" y="0" width="24" height="24" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_2_1280)"><g><path d="M21.74999976158142,9.490525850982667L21.74999976158142,9.489995850982666Q21.75039976158142,8.633795850982665,21.07439976158142,8.107975850982665L13.074499761581421,1.886019850982666Q11.999999761581421,1.050165850982666,10.925549761581422,1.8859778509826661L2.925499361581421,8.108015850982666Q2.2494047615814208,8.633955850982666,2.249999761581421,9.489995850982666L2.249999761581421,20.000005850982667Q2.249999761581421,21.750005850982667,3.999999761581421,21.750005850982667L19.99999976158142,21.750005850982667Q20.724899761581423,21.750005850982667,21.237399761581422,21.237405850982665Q21.74999976158142,20.724905850982665,21.74999976158142,20.000005850982667L21.74999976158142,9.490525850982667ZM20.15359976158142,9.292025850982666Q20.25009976158142,9.367115850982666,20.24999976158142,9.489475850982666L20.24999976158142,9.489995850982666L20.24999976158142,20.000005850982667Q20.24999976158142,20.250005850982667,19.99999976158142,20.250005850982667L3.999999761581421,20.250005850982667Q3.749999761581421,20.250005850982667,3.749999761581421,20.000005850982667L3.749999761581421,9.489995850982666Q3.749914761581421,9.367115850982666,3.846500761581421,9.291975850982666L11.846449761581422,3.0700218509826662Q11.999999761581421,2.950571850982666,12.15349976158142,3.069978850982666L20.15359976158142,9.292025850982666Z" fill-rule="evenodd" fill="#ADADAD" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="44" height="44" viewBox="0 0 44 44"><defs><clipPath id="master_svg0_1_0555"><rect x="10" y="10" width="24" height="24" rx="0"/></clipPath></defs><g><g><rect x="0" y="0" width="44" height="44" rx="22" fill="#27272A" fill-opacity="1"/></g><g clip-path="url(#master_svg0_1_0555)"><g><g><path d="M19.207114699935914,20.09606C19.617544699935912,20.09606,20.026404699935913,20.00808,20.403594699935912,19.84606C20.127554699935914,19.364440000000002,19.974484699935914,18.811410000000002,19.974484699935914,18.25566C19.974484699935914,17.423470000000002,20.316154699935915,16.59635,20.902994699935913,16.00796C21.15201469993591,15.75831,21.444164699935914,15.55345,21.761014699935913,15.39972C21.644614699935914,15.21695,21.509654699935915,15.04616,21.356674699935912,14.892739C20.793934699935914,14.32847,20.002964699935912,14,19.207114699935914,14C18.41129469993591,14,17.620484699935915,14.32847,17.05762569993591,14.892739C16.494872699935915,15.456949999999999,16.167264699935913,16.25007,16.167264699935913,17.04806C16.167264699935913,17.846049999999998,16.494872699935915,18.63897,17.05762569993591,19.20334C17.620504699935914,19.76755,18.41129469993591,20.09606,19.207114699935914,20.09606Z" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M22.30954,22.186686732635497C21.39678,21.626411732635496,20.337229999999998,21.305701732635498,19.20707,21.305701732635498C15.77911,21.305701732635498,13,24.255491732635498,13,27.8942717326355L16.865009999999998,27.8942717326355C17.55928,24.948061732635498,20.34623,22.505791732635497,22.30954,22.186686732635497Z" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M22.285242183166503,20.9363493265152C22.872236183166503,21.524739326515196,23.696946183166503,21.8673593265152,24.526886183166503,21.8673593265152C25.356836183166504,21.8673593265152,26.181726183166504,21.5247593265152,26.768556183166503,20.9363493265152C27.355346183166503,20.347789326515198,27.697046183166503,19.520859326515197,27.697046183166503,18.688659326515197C27.697046183166503,17.8564793265152,27.355356183166503,17.0293493265152,26.768556183166503,16.440955326515198C26.181726183166504,15.852540326515198,25.356836183166504,15.509949326515198,24.526886183166503,15.509949326515198C24.049066183166502,15.509949326515198,23.573256183166503,15.624071326515198,23.143266183166503,15.832697326515198C22.826396183166505,15.986444326515198,22.534286183166504,16.191283326515197,22.285241183166505,16.440934326515197C21.698407183166506,17.029329326515196,21.356736183166504,17.856459326515196,21.356736183166504,18.688639326515197C21.356736183166504,19.244409326515196,21.509824183166504,19.797399326515198,21.785862183166504,20.279039326515196C21.923124183166504,20.5186393265152,22.090336183166503,20.7408593265152,22.285242183166503,20.9363493265152Z" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M24.52674607406616,23.128984451293945C24.48599607406616,23.128984451293945,24.44546607406616,23.129828376293947,24.40492607406616,23.130589791293946C21.427396074066163,23.189009151293945,18.941451074066162,25.381204451293947,18.24720807406616,28.327424451293943C18.120992974066162,28.862884451293944,18.053636074066162,29.423094451293945,18.053636074066162,30.000004451293947L31.000036074066163,30.000004451293947C31.000036074066163,26.205224451293944,28.101836074066163,23.128984451293945,24.52674607406616,23.128984451293945Z" fill="#FFFFFF" fill-opacity="1"/></g></g></g></g></svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 93 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="44" height="44" viewBox="0 0 44 44"><defs><clipPath id="master_svg0_1_0525"><rect x="10" y="10" width="24" height="24" rx="0"/></clipPath></defs><g><g><rect x="0" y="0" width="44" height="44" rx="22" fill="#27272A" fill-opacity="1"/></g><g clip-path="url(#master_svg0_1_0525)"><g><path d="M19.999986328125,25.172003906249998L29.191986328124997,15.97900390625L30.606986328125,17.39300390625L19.999986328125,28.00000390625L13.635986328125,21.63600390625L15.049986328125,20.222003906250002L19.999986328125,25.172003906249998Z" fill="#FFFFFF" fill-opacity="1"/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 691 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 4.9 KiB

1
src/assets/user-fill.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@ -1,13 +1,23 @@
/* /*
* @LastEditors: John * @LastEditors: John
* @Date: 2024-07-13 18:07:43 * @Date: 2024-07-13 18:07:43
* @LastEditTime: 2024-07-19 15:42:36 * @LastEditTime: 2024-07-22 11:03:20
* @Author: John * @Author: John
*/ */
import { useLocation, useNavigate } from "react-router-dom"; import { useLocation, useNavigate } from "react-router-dom";
import classes from "./BottomTab-m.module.css"; import classes from "./BottomTab-m.module.css";
import { AppOutline, HistogramOutline, TeamFill } from "antd-mobile-icons"; import { AppOutline, HistogramOutline, TeamFill } from "antd-mobile-icons";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import home_fill from "@/assets/home-fill.svg";
import home_fill_active from "@/assets/home-fill-active.svg";
import Leaderboard_fill from "@/assets/Leaderboard-fill.svg";
import Leaderboard_fill_active from "@/assets/Leaderboard-fill-active.svg";
import user_fill from "@/assets/user-fill.svg";
import user_fill_active from "@/assets/user-fill-active.svg";
import Launchpool_fill from "@/assets/Launchpool-fill.svg";
import Launchpool_fill_active from "@/assets/Launchpool-fill-active.svg";
import Earns_fill from "@/assets/Earns-fill.svg";
import Earns_fill_active from "@/assets/Earns-fill-active.svg";
export default function () { export default function () {
const navigate = useNavigate(); const navigate = useNavigate();
const { pathname } = useLocation(); const { pathname } = useLocation();
@ -22,30 +32,58 @@ export default function () {
<> <>
<ul className={classes.bottomTab}> <ul className={classes.bottomTab}>
<li onClick={() => navigate("/")}> <li onClick={() => navigate("/")}>
<AppOutline color={currentpathname == "/" ? "#ffffff" : "#adadad"} /> {currentpathname == "/" ? (
<span className={currentpathname == "/" ? classes.active : ""}> <>
Home <img src={home_fill_active} alt="" />
</span> <span className={classes.active}>Home</span>
</li> </>
) : (
<li onClick={() => navigate("/friends")}> <img src={home_fill} alt="" />
<TeamFill )}
color={currentpathname == "/friends" ? "#ffffff" : "#adadad"}
/>
<span className={currentpathname == "/friends" ? classes.active : ""}>
Friends
</span>
</li> </li>
<li onClick={() => navigate("/leaderboard")}> <li onClick={() => navigate("/leaderboard")}>
<HistogramOutline {currentpathname == "/leaderboard" ? (
color={currentpathname == "/leaderboard" ? "#ffffff" : "#adadad"} <>
/> <img src={Leaderboard_fill_active} alt="" />
<span <span className={classes.active}>Leaderboard</span>
className={currentpathname == "/leaderboard" ? classes.active : ""} </>
> ) : (
Leaderboard <img src={Leaderboard_fill} alt="" />
</span> )}
</li>
<li onClick={() => navigate("/launchpool")}>
{currentpathname == "/launchpool" ? (
<>
<img src={Launchpool_fill} alt="" />
<span className={classes.active}>Launchpool</span>
</>
) : (
<img src={Launchpool_fill_active} alt="" />
)}
</li>
<li onClick={() => navigate("/earns")}>
{currentpathname == "/earns" ? (
<>
<img src={Earns_fill} alt="" />
<span className={classes.active}>Earns</span>
</>
) : (
<img src={Earns_fill_active} alt="" />
)}
</li>
<li onClick={() => navigate("/friends")}>
{currentpathname == "/friends" ? (
<>
<img src={user_fill_active} alt="" />
<span className={classes.active}>Friends</span>
</>
) : (
<img src={user_fill} alt="" />
)}
</li> </li>
</ul> </ul>
</> </>

View File

@ -0,0 +1,189 @@
.Earns {
display: flex;
flex-direction: column;
align-items: center;
padding-top: 24px;
.Earns_title {
opacity: 1;
width: 311px;
font-family: Roboto;
font-size: 24px;
font-weight: 600;
line-height: normal;
text-align: center;
letter-spacing: 0em;
font-variation-settings: "opsz" auto;
font-feature-settings: "kern" on;
color: #ffffff;
}
.Earns_list {
display: flex;
flex-direction: column;
gap: 16px;
margin-top: 16px;
.Earns_box {
width: 345px;
/* height: 303px; */
border-radius: 12px;
opacity: 1;
background: #18181b;
box-sizing: border-box;
border: 1px solid #27272a;
padding: 15px;
.Earns_box_title {
display: flex;
align-items: center;
gap: 10px;
> div {
width: 40px;
height: 40px;
opacity: 1;
background: #09090b;
}
> span {
opacity: 1;
font-family: Roboto;
font-size: 20px;
font-weight: 600;
line-height: 24px;
letter-spacing: 0em;
font-variation-settings: "opsz" auto;
font-feature-settings: "kern" on;
color: #ffffff;
}
}
.Earns_box_list {
display: flex;
flex-direction: column;
gap: 8px;
margin-top: 10px;
.Earns_box_list_item {
width: 315px;
height: 108px;
border-radius: 12px;
opacity: 1;
background: #09090b;
padding: 0 10px;
display: flex;
flex-direction: column;
.Earns_box_list_item_top {
border-bottom: 1px solid #27272a;
display: flex;
align-items: center;
gap: 6px;
height: 59px;
.platform_icon {
width: 32px;
height: 32px;
}
> span {
opacity: 1;
font-family: Roboto;
font-size: 16px;
font-weight: normal;
line-height: 24px;
letter-spacing: 0em;
font-variation-settings: "opsz" auto;
font-feature-settings: "kern" on;
color: #ffffff;
}
> button {
width: 68px;
height: 32px;
border-radius: 30px;
opacity: 1;
background: #e2c72d;
margin-left: auto;
display: flex;
align-items: center;
.Earns_box_list_item_top_btn {
display: flex;
align-items: center;
gap: 6px;
> span {
opacity: 1;
font-family: Roboto;
font-size: 16px;
font-weight: normal;
line-height: 24px;
letter-spacing: 0em;
font-variation-settings: "opsz" auto;
font-feature-settings: "kern" on;
color: #000000;
}
> img {
width: 24px;
height: 24px;
}
}
}
}
.Earns_box_list_item_bottom {
display: flex;
align-items: center;
gap: 4px;
flex: 1;
> span {
&:nth-of-type(1) {
opacity: 1;
font-family: Roboto;
font-size: 14px;
font-weight: normal;
line-height: 24px;
letter-spacing: 0em;
font-variation-settings: "opsz" auto;
font-feature-settings: "kern" on;
color: #adadad;
}
&:nth-of-type(2) {
display: block;
width: 14px;
height: 14px;
border-radius: 38px;
opacity: 1;
background: #ffffff;
margin-left: auto;
}
&:nth-of-type(3) {
opacity: 1;
font-family: Roboto;
font-size: 14px;
font-weight: bold;
line-height: 24px;
text-align: right;
letter-spacing: 0em;
font-variation-settings: "opsz" auto;
font-feature-settings: "kern" on;
color: #ffffff;
}
}
}
}
}
}
}
}

60
src/pages/Earns.tsx Normal file
View File

@ -0,0 +1,60 @@
import { Button } from "antd-mobile";
import classes from "./Earns-m.module.css";
import tuite_white from "@/assets/tuite_white.svg";
import arrow_right from "@/assets/arrow_right.svg";
export default function () {
return (
<>
<div className={classes.Earns}>
<span className={classes.Earns_title}>
Complete tasks to earn more DUCKS
</span>
<ul className={classes.Earns_list}>
<EarnsBox />
<EarnsBox />
<EarnsBox />
</ul>
</div>
</>
);
}
function EarnsBox() {
return (
<li className={classes.Earns_box}>
<div className={classes.Earns_box_title}>
<div></div>
<span>Quote this tweet</span>
</div>
<ul className={classes.Earns_box_list}>
<EarnsBoxItem />
<EarnsBoxItem />
</ul>
</li>
);
}
function EarnsBoxItem() {
return (
<li className={classes.Earns_box_list_item}>
<div className={classes.Earns_box_list_item_top}>
<img src={tuite_white} className={classes.platform_icon} alt="" />
<span>Quote this tweet</span>
<Button fill="none">
<div className={classes.Earns_box_list_item_top_btn}>
<span>Go</span>
<img src={arrow_right} alt="" />
</div>
</Button>
</div>
<div className={classes.Earns_box_list_item_bottom}>
<span>Reward</span>
<span></span>
<span>+1,000 PENS</span>
</div>
</li>
);
}

View File

@ -5,6 +5,7 @@
.top_title { .top_title {
/* 自动布局子元素 */ /* 自动布局子元素 */
opacity: 1; opacity: 1;
width: 209px;
font-family: Roboto; font-family: Roboto;
font-size: 28px; font-size: 28px;
@ -25,16 +26,13 @@
/* width: 141px; */ /* width: 141px; */
height: 149px; height: 149px;
margin-top: 31px; margin-top: 31px;
background-image: url("../assets/kuang.svg");
background-repeat: no-repeat;
background-size: contain;
} }
.tip { .tip {
/* 自动布局子元素 */ /* 自动布局子元素 */
opacity: 1; opacity: 1;
font-family: Roboto; font-family: Roboto;
font-size: 22px; font-size: 16px;
font-weight: normal; font-weight: normal;
line-height: normal; line-height: normal;
text-align: center; text-align: center;
@ -42,9 +40,7 @@
font-variation-settings: "opsz" auto; font-variation-settings: "opsz" auto;
font-feature-settings: "kern" on; font-feature-settings: "kern" on;
color: #ffffff; color: #adadad;
z-index: 0;
margin-top: 61px; margin-top: 61px;
} }
@ -136,9 +132,9 @@
height: 48px; height: 48px;
border-radius: 0px; border-radius: 0px;
opacity: 1; opacity: 1;
background-image: url("../assets/big_buttom_bg.svg");
background-repeat: no-repeat; border-radius: 470px;
background-size: contain; background: #e2c72d;
> span { > span {
opacity: 1; opacity: 1;

View File

@ -1,7 +1,7 @@
/* /*
* @LastEditors: John * @LastEditors: John
* @Date: 2024-07-13 16:08:30 * @Date: 2024-07-13 16:08:30
* @LastEditTime: 2024-07-19 15:57:27 * @LastEditTime: 2024-07-22 13:42:24
* @Author: John * @Author: John
*/ */
/* /*
@ -10,13 +10,12 @@
* @LastEditTime: 2024-07-15 15:31:58 * @LastEditTime: 2024-07-15 15:31:58
* @Author: John * @Author: John
*/ */
import logo from "@/assets/logo.png"; import logo from "@/assets/logo.svg";
import { Avatar, Button } from "antd-mobile"; import { Avatar, Button } from "antd-mobile";
import classes from "./Frends-m.module.css"; import classes from "./Frends-m.module.css";
import { useWebApp } from "@vkruglikov/react-telegram-web-app"; import { useWebApp } from "@vkruglikov/react-telegram-web-app";
import useUserStore from "@/store/User"; import useUserStore from "@/store/User";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { api_homepage_subordinates_users } from "@/server/api";
import { subordinatesUsers } from "@/server/module"; import { subordinatesUsers } from "@/server/module";
import { cn } from "@/utils"; import { cn } from "@/utils";
export default function () { export default function () {
@ -32,24 +31,21 @@ export default function () {
return () => {}; return () => {};
}, []); }, []);
async function updateFriends(level: number) { async function updateFriends(level: number) {}
const { data } = await api_homepage_subordinates_users().send({
queryParams: { level },
});
setFrends(data?.data);
}
return ( return (
<> <>
<div className={classes.frends}> <div className={classes.frends}>
<span className={classes.top_title}> <span className={classes.top_title}>
Invite friends and get more SCTT Invite friends and get more PENS
</span> </span>
{!frends || frends?.length == 0 ? (
<>
<img className={classes.logo} src={logo} alt="" /> <img className={classes.logo} src={logo} alt="" />
{frends?.length == 0 ? (
<span className={classes.tip}> <span className={classes.tip}>
Tap on the button to invite your friends Tap on the button to invite your friends
</span> </span>
</>
) : ( ) : (
<ul className={classes.frends_list}> <ul className={classes.frends_list}>
<div className={classes.frends_list_tabs}> <div className={classes.frends_list_tabs}>

View File

@ -1,5 +1,5 @@
.guide { .guide {
height: 100%; height: 100vh;
background-image: url("../assets/guide_bg.svg"); background-image: url("../assets/guide_bg.svg");
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: cover;

View File

@ -1,7 +1,7 @@
/* /*
* @LastEditors: John * @LastEditors: John
* @Date: 2024-07-18 14:42:58 * @Date: 2024-07-18 14:42:58
* @LastEditTime: 2024-07-19 17:53:42 * @LastEditTime: 2024-07-22 13:53:06
* @Author: John * @Author: John
*/ */
import { import {
@ -16,7 +16,6 @@ import dianbao from "@/assets/dianbao.svg";
import youguang from "@/assets/youguang.svg"; import youguang from "@/assets/youguang.svg";
import tuite from "@/assets/tuite.svg"; import tuite from "@/assets/tuite.svg";
import logo from "@/assets/logo.svg"; import logo from "@/assets/logo.svg";
import { api_login } from "@/server/api";
import useUserStore from "@/store/User"; import useUserStore from "@/store/User";
export default function () { export default function () {

View File

@ -2,7 +2,6 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
padding-bottom: 94px;
.home_top { .home_top {
display: flex; display: flex;
align-items: center; align-items: center;

View File

@ -1,7 +1,7 @@
/* /*
* @LastEditors: John * @LastEditors: John
* @Date: 2024-07-13 10:50:24 * @Date: 2024-07-13 10:50:24
* @LastEditTime: 2024-07-19 18:46:32 * @LastEditTime: 2024-07-22 13:42:32
* @Author: John * @Author: John
*/ */
import classes from "./Home-m.module.css"; import classes from "./Home-m.module.css";
@ -9,6 +9,9 @@ import { Routes, useNavigate } from "react-router-dom";
import home_top_bg from "@/assets/home_top_bg.svg"; import home_top_bg from "@/assets/home_top_bg.svg";
import tg_white from "@/assets/tg_white.svg"; import tg_white from "@/assets/tg_white.svg";
import tuite_white from "@/assets/tuite_white.svg"; import tuite_white from "@/assets/tuite_white.svg";
import account_age_icon from "@/assets/account_age_icon.svg";
import telegram_premium_icon from "@/assets/telegram_premium_icon.svg";
import invited_friends_icon from "@/assets/invited_friends_icon.svg";
import logo from "@/assets/logo.svg"; import logo from "@/assets/logo.svg";
import { import {
CheckOutline, CheckOutline,
@ -18,13 +21,7 @@ import {
} from "antd-mobile-icons"; } from "antd-mobile-icons";
import { Button } from "antd-mobile"; import { Button } from "antd-mobile";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { import {} from "@/server/api";
api_follow_twitter,
api_homepage_query_user_income,
api_query_task_configuration_list,
api_query_whether_the_user_receives_the_registration_reward,
api_start_task,
} from "@/server/api";
import { useWebApp } from "@vkruglikov/react-telegram-web-app"; import { useWebApp } from "@vkruglikov/react-telegram-web-app";
import IconFont from "@/components/iconfont"; import IconFont from "@/components/iconfont";
import { taskConfigurationListItem } from "@/server/module"; import { taskConfigurationListItem } from "@/server/module";
@ -51,20 +48,9 @@ export default function () {
return () => {}; return () => {};
}, []); }, []);
async function UpdateHomeData() { async function UpdateHomeData() {}
const { data: incomeRes } = await api_homepage_query_user_income().send({});
setMyReward(incomeRes?.data.wordRewar);
setInviteReward(incomeRes?.data.teamRewar);
setTotalPoint(
parseInt(`${incomeRes?.data.wordRewar || 0}`) +
parseInt(`${incomeRes?.data.teamRewar || 0}`)
);
}
async function UpdateTaskList() { async function UpdateTaskList() {}
const { data } = await api_query_task_configuration_list().send({});
setTasksList(data?.data);
}
return ( return (
<> <>
<div className={classes.home}> <div className={classes.home}>
@ -74,7 +60,7 @@ export default function () {
</div> </div>
<img src={logo} alt="" className={classes.logo} /> <img src={logo} alt="" className={classes.logo} />
<span className={classes.pens}>{totalPoint || 0} SCTT</span> <span className={classes.pens}>{totalPoint || 0} PENS</span>
<div className={classes.community}> <div className={classes.community}>
<span className={classes.community_title}>PenguinCoop Community</span> <span className={classes.community_title}>PenguinCoop Community</span>
<ul> <ul>
@ -92,15 +78,21 @@ export default function () {
<span className={classes.rewards_title}>Your rewards</span> <span className={classes.rewards_title}>Your rewards</span>
<div className={classes.reward_list_item}> <div className={classes.reward_list_item}>
<StarOutline color="#ffffff" /> <img src={account_age_icon} alt="" />
<span>Your rewards</span> <span>Account Age</span>
<span>+{myReward || 0} SCTT</span> <span>+{myReward || 0} PENS</span>
</div> </div>
<div className={classes.reward_list_item}> <div className={classes.reward_list_item}>
<IconFont name="dianbao" color="#ffffff" /> <img src={telegram_premium_icon} alt="" />
<span>Invite friends</span> <span>Telegram Premium</span>
<span>{inviteReward || 0}</span> <span>+{inviteReward || 0} PENS</span>
</div>
<div className={classes.reward_list_item}>
<img src={invited_friends_icon} alt="" />
<span>Invited Friends</span>
<span>+{inviteReward || 0} PENS</span>
</div> </div>
</div> </div>
</div> </div>

View File

@ -5,5 +5,6 @@
.container { .container {
flex: auto; flex: auto;
position: relative; position: relative;
padding-bottom: 94px;
} }
} }

View File

@ -1,3 +1,15 @@
/*
* @LastEditors: John
* @Date: 2024-07-19 17:08:37
* @LastEditTime: 2024-07-22 11:04:13
* @Author: John
*/
/*
* @LastEditors: John
* @Date: 2024-07-19 17:08:37
* @LastEditTime: 2024-07-22 11:00:28
* @Author: John
*/
import { Route, Routes, useNavigate } from "react-router-dom"; import { Route, Routes, useNavigate } from "react-router-dom";
import Home from "./Home"; import Home from "./Home";
import { Badge, TabBar } from "antd-mobile"; import { Badge, TabBar } from "antd-mobile";
@ -12,6 +24,8 @@ import classes from "./Index-m.module.css";
import Leaderboard from "./Leaderboard"; import Leaderboard from "./Leaderboard";
import Frends from "./Frends"; import Frends from "./Frends";
import BottomTab from "@/components/BottomTab"; import BottomTab from "@/components/BottomTab";
import Launchpool from "./Launchpool";
import Earns from "./Earns";
const tabs = [ const tabs = [
{ {
key: "0", key: "0",
@ -38,6 +52,8 @@ export default function () {
<Routes> <Routes>
<Route path="/" element={<Home />} /> <Route path="/" element={<Home />} />
<Route path="/leaderboard" element={<Leaderboard />} /> <Route path="/leaderboard" element={<Leaderboard />} />
<Route path="/launchpool" element={<Launchpool />} />
<Route path="/earns" element={<Earns />} />
<Route path="/friends" element={<Frends />} /> <Route path="/friends" element={<Frends />} />
</Routes> </Routes>
</div> </div>

View File

@ -0,0 +1,22 @@
.Launchpool {
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 13px;
> span {
opacity: 1;
font-family: Roboto;
font-size: 18px;
font-weight: normal;
line-height: 24px;
text-transform: capitalize;
letter-spacing: 0em;
font-variation-settings: "opsz" auto;
font-feature-settings: "kern" on;
color: #adadad;
}
}

18
src/pages/Launchpool.tsx Normal file
View File

@ -0,0 +1,18 @@
/*
* @LastEditors: John
* @Date: 2024-07-22 10:59:37
* @LastEditTime: 2024-07-22 11:11:20
* @Author: John
*/
import logo from "@/assets/logo.svg";
import classes from "./Launchpool-m.module.css";
export default function () {
return (
<>
<div className={classes.Launchpool}>
<img src={logo} alt="" />
<span>Coming Soon!</span>
</div>
</>
);
}

View File

@ -25,16 +25,16 @@
border-radius: 12px; border-radius: 12px;
opacity: 1; opacity: 1;
/* 自动布局 */ background: #18181b;
box-sizing: border-box;
border: 1px solid #27272a;
display: flex; display: flex;
align-items: center; align-items: center;
padding: 13px 15px;
/* background: #1e1e1e; */ padding: 0 13px;
background-image: url("../assets/user_rank_bg.svg");
background-repeat: no-repeat;
background-size: contain;
border-radius: 0px;
gap: 12px; gap: 12px;
margin-top: 38px; margin-top: 38px;
> div { > div {
@ -157,7 +157,6 @@
.rank_list { .rank_list {
width: 100%; width: 100%;
padding: 0 15px; padding: 0 15px;
padding-bottom: 94px;
margin-top: 32px; margin-top: 32px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -165,6 +164,19 @@
.rank_item { .rank_item {
display: flex; display: flex;
align-items: center; align-items: center;
width: 345px;
height: 68px;
border-radius: 12px;
opacity: 1;
background: #18181b;
box-sizing: border-box;
border: 1px solid #27272a;
padding: 0 12px;
gap: 12px; gap: 12px;
> svg { > svg {

View File

@ -1,7 +1,7 @@
/* /*
* @LastEditors: John * @LastEditors: John
* @Date: 2024-07-13 16:08:04 * @Date: 2024-07-13 16:08:04
* @LastEditTime: 2024-07-19 14:55:57 * @LastEditTime: 2024-07-22 13:42:56
* @Author: John * @Author: John
*/ */
import { Avatar, Button } from "antd-mobile"; import { Avatar, Button } from "antd-mobile";
@ -12,19 +12,19 @@ import rank2 from "@/assets/rank2.svg";
import rank3 from "@/assets/rank3.svg"; import rank3 from "@/assets/rank3.svg";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { api_ranking } from "@/server/api";
import { RewardVo } from "@/server/module"; import { RewardVo } from "@/server/module";
export default function () { export default function () {
const [userRank, setUserRank] = useState<RewardVo>(); const [userRank, setUserRank] = useState<RewardVo>();
const [ranks, setRanks] = useState<RewardVo[]>(); const [ranks, setRanks] = useState<RewardVo[]>([
{
tgName: "LAW.D",
amount: "49,055,319",
ranking: 1,
},
]);
const [totalUser, setTotalUser] = useState<number>(); const [totalUser, setTotalUser] = useState<number>();
useEffect(() => { useEffect(() => {
(async () => { (async () => {})();
const { data } = await api_ranking().send({});
setUserRank(data?.data.rewardVo);
setRanks(data?.data.rewardVos);
setTotalUser(data?.data.numberOfUsers);
})();
return () => {}; return () => {};
}, []); }, []);
@ -32,7 +32,7 @@ export default function () {
return ( return (
<> <>
<div className={classes.leaderboard}> <div className={classes.leaderboard}>
<span className={classes.top_title}>Telegram Wall of Fame</span> <span className={classes.top_title}>Penguin Champs</span>
<div className={classes.rank_data}> <div className={classes.rank_data}>
<Avatar src="" /> <Avatar src="" />
<div> <div>

View File

@ -1,7 +1,7 @@
/* /*
* @LastEditors: John * @LastEditors: John
* @Date: 2024-07-15 10:35:20 * @Date: 2024-07-15 10:35:20
* @LastEditTime: 2024-07-19 15:50:19 * @LastEditTime: 2024-07-22 13:42:07
* @Author: John * @Author: John
*/ */
import { GET, POST } from "./client"; import { GET, POST } from "./client";
@ -11,112 +11,3 @@ import {
taskConfigurationListItem, taskConfigurationListItem,
userBenefits, userBenefits,
} from "./module"; } from "./module";
// 登录
export function api_login() {
return POST<
{
initData: string;
invitationCode?: string;
},
{ token: string }
>({
url: "/api/account/signIn",
});
}
// 查询用户是否领取注册奖励
export function api_query_whether_the_user_receives_the_registration_reward() {
return GET<any, string>({
url: "/api/reward/signUpForIncentives",
});
}
// 领取奖励
export function api_receive_rewards() {
return POST<any, { reward: string; year: number }, { status?: number }>({
url: "/api/reward/claimYourRewards",
});
}
// 排行
export function api_ranking() {
return GET<
any,
{
rewardVo: RewardVo;
rewardVos: RewardVo[];
numberOfUsers: number;
}
>({
url: "/api/reward/rankingWalletLog",
});
}
// 首页查询用户收益
export function api_homepage_query_user_income() {
return GET<any, { wordRewar: string; teamRewar: string }>({
url: "/api/reward/userBenefits",
});
}
// 获取用户信息
export function api_get_user_information() {
return GET<
any,
{
account: string;
accountType: number;
allPid: string;
chainType: number;
codePrompt: number;
createTime: string;
flag: number;
id: string;
level: number;
minLevel: number;
mintNumber: number;
passwordLogin: string;
passwordPay: string;
presidentNumber: number;
referId: string;
shareCode: string;
shareNum: number;
teamNum: number;
uid: string;
updateTime: string;
userImg: string;
userType: number;
}
>({
url: "/api/user/findUser",
});
}
// 首页下级用户
export function api_homepage_subordinates_users() {
return GET<{ level: number }, subordinatesUsers[]>({
url: "/api/reward/subordinateUsers",
});
}
// 关注推特
export function api_follow_twitter() {
return POST<any, {}>({
url: "/api/reward/followTwitter",
});
}
// 查询任务配置列表
export function api_query_task_configuration_list() {
return GET<any, taskConfigurationListItem[]>({
url: "/api/task-config",
});
}
export function api_start_task() {
return POST<any, {}, { id: string }>({
url: "/api/task-config",
});
}