feat:

This commit is contained in:
john 2024-07-16 17:53:55 +08:00
parent ef787f4b42
commit bf0de64b8e
23 changed files with 198 additions and 35 deletions

View File

@ -1,10 +1,11 @@
###
# @LastEditors: John
# @Date: 2024-06-18 10:12:21
# @LastEditTime: 2024-07-15 11:02:08
# @LastEditTime: 2024-07-16 17:26:50
# @Author: John
###
VITE_BASE_URL=
VITE_BASE_API_URL=/dev
VITE_TG_COMMUNITY=johntest_bot
VITE_TG_BOT_NAME=johntest_bot
VITE_TG_BOT_WEBAPP_NAME=shortname

View File

@ -1,10 +1,11 @@
###
# @LastEditors: John
# @Date: 2024-06-26 15:04:10
# @LastEditTime: 2024-07-15 11:01:57
# @LastEditTime: 2024-07-16 17:46:44
# @Author: John
###
VITE_BASE_URL=
VITE_BASE_URL=https://campaign.pineer.cc
VITE_BASE_API_URL=/api
VITE_TG_BOT_NAME=
VITE_TG_COMMUNITY=+Juxrx7_My5czYjE1
VITE_TG_BOT_NAME=Pioneerer_bot
VITE_TG_BOT_WEBAPP_NAME=

View File

@ -1,19 +1,19 @@
<!--
* @LastEditors: John
* @Date: 2024-07-13 10:21:58
* @LastEditTime: 2024-07-13 17:14:14
* @LastEditTime: 2024-07-16 17:51:58
* @Author: John
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" type="image/svg+xml" href="/pioneer.svg" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0,maximum-scale=1, minimum-scale=1, user-scalable=no"
/>
<title>Vite + React + TS</title>
<title>Pioneerer bot</title>
</head>
<body>
<div id="root"></div>

1
public/pioneer.svg Normal file
View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1721123338744" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4804" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M0 512a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#25133A" p-id="4805"></path><path d="M240.919273 258.699636h436.084363a141.032727 141.032727 0 0 1 141.032728 141.032728v20.619636a246.597818 246.597818 0 0 1-246.597819 246.644364h-45.707636l-26.158545 98.304H385.489455l86.295272-343.04h115.432728l-36.305455 148.48q130.327273 14.987636 156.020364-115.432728c19.223273-101.515636-63.069091-96.162909-102.632728-96.162909h-230.865454q-106.868364 2.141091-132.514909-100.445091z" fill="#FCB44B" p-id="4806"></path><path d="M370.222545 564.363636h-115.432727l-49.152 200.936728h115.432727l49.152-200.936728z" fill="#FCB44B" p-id="4807"></path><path d="M407.645091 422.213818h-115.432727l-19.223273 79.127273h115.432727l19.223273-79.127273z" fill="#593B8B" p-id="4808"></path></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -2,7 +2,7 @@ body,
html,
#root {
height: var(--tg-viewport-height);
background-color: black;
background-color: #261138;
}
@font-face {

View File

@ -1,7 +1,7 @@
/*
* @LastEditors: John
* @Date: 2024-07-13 10:21:58
* @LastEditTime: 2024-07-15 15:37:43
* @LastEditTime: 2024-07-16 17:14:10
* @Author: John
*/
import { Route, Routes, useNavigate } from "react-router-dom";
@ -28,8 +28,8 @@ function App() {
console.log("initData:", initData);
console.log("window.location", window.location);
WebApp.setBackgroundColor("#000000");
WebApp.setHeaderColor("#000000");
WebApp.setBackgroundColor("#261138");
WebApp.setHeaderColor("#261138");
useEffect(() => {
// navigate("/guide");

View File

@ -1 +1,73 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="375" height="65" viewBox="0 0 375 65"><defs><mask id="master_svg0_1_1782" style="mask-type:alpha" maskUnits="userSpaceOnUse"><g><rect x="0" y="0" width="375" height="65" rx="0" fill="#FFFFFF" fill-opacity="1"/></g></mask></defs><g mask="url(#master_svg0_1_1782)"><g><g><rect x="-260" y="0" width="635" height="109" rx="0" fill="#000000" fill-opacity="1"/></g><g><path d="M-136.387,0L-260,0C-225.86430000000001,0,-198.1944,28.5306,-198.1944,63.7231C-198.1944,28.5306,-170.5223,0,-136.387,0Z" fill="#489149" fill-opacity="1"/></g><g><path d="M0,26.184616088867188L0,45.84581608886719C11.0392,45.84581608886719,19.9882,54.64841608886719,19.9881,65.50691608886719C19.9869,76.36711608886719,11.0382,85.17041608886719,0,85.17041608886719L0,104.83151608886719C22.0796,104.83151608886719,39.9786,87.22531608886719,39.9786,65.50691608886719C39.9748,43.78871608886719,22.0769,26.184616088867188,0,26.184616088867188Z" fill="#489149" fill-opacity="1"/></g><g><path d="M-114.01179572753907,90.58208044433593C-102.69459572753905,79.45108044433593,-102.69459572753905,61.40308044433594,-114.01179572753907,50.27214044433594C-125.32789572753907,39.14006044433594,-143.67599572753906,39.14006044433594,-154.99207572753906,50.27214044433594C-166.30929572753905,61.40308044433594,-166.30929572753905,79.45108044433593,-154.99207572753906,90.58208044433593C-143.67599572753906,101.71418044433594,-125.32789572753907,101.71418044433594,-114.01179572753907,90.58208044433593ZM-134.49049572753907,86.68818044433593L-151.02199572753906,70.42708044433594L-134.49049572753907,54.16378044433594L-117.95899572753906,70.42488044433594L-134.49049572753907,86.68818044433593Z" fill="#489149" fill-opacity="1"/></g><g><path d="M158.9656,118.9656C176.34480000000002,101.5881,176.34480000000002,73.4119,158.9656,56.0344C141.5881,38.65519,113.4118,38.65519,96.0344,56.0344C78.65519,73.4119,78.65519,101.5882,96.0344,118.9656C113.4118,136.34480000000002,141.5881,136.34480000000002,158.9656,118.9656ZM127.5176,112.8865L102.1311,87.5L127.5176,62.11L152.9041,87.4965L127.5176,112.8865Z" fill="#489149" fill-opacity="1"/></g><g><path d="M282.9656,118.9656C300.3448,101.5881,300.3448,73.4119,282.9656,56.0344C265.5881,38.65519,237.4118,38.65519,220.0344,56.0344C202.65519,73.4119,202.65519,101.5882,220.0344,118.9656C237.4118,136.34480000000002,265.5881,136.34480000000002,282.9656,118.9656ZM251.51760000000002,112.8865L226.1311,87.5L251.51760000000002,62.11L276.90409999999997,87.4965L251.51760000000002,112.8865Z" fill="#489149" fill-opacity="1"/></g><g><ellipse cx="251.5" cy="65.5" rx="12.5" ry="12.5" fill="#489149" fill-opacity="1"/></g><g><ellipse cx="123.5" cy="65.5" rx="12.5" ry="12.5" fill="#489149" fill-opacity="1"/></g><g><path d="M-9.387,0L-133,0C-98.8643,0,-71.1944,28.5306,-71.1944,63.7231C-71.1944,28.5306,-43.5223,0,-9.387,0Z" fill="#489149" fill-opacity="1"/></g><g><path d="M127.77334594726562,0L0.773345947265625,0C35.84424594726563,0,64.27224594726562,28.5306,64.27224594726562,63.7231C64.27224594726562,28.5306,92.70244594726563,0,127.77334594726562,0Z" fill="#489149" fill-opacity="1"/></g><g><path d="M251.38634594726562,0L127.77334594726562,0C161.9090459472656,0,189.57894594726562,28.5306,189.57894594726562,63.7231C189.57894594726562,28.5306,217.25104594726562,0,251.38634594726562,0Z" fill="#489149" fill-opacity="1"/></g><g><path d="M374.9996882324219,0L251.38668823242188,0C285.52238823242186,0,313.1922882324219,28.5306,313.1922882324219,63.7231C313.1922882324219,28.5306,340.8643882324219,0,374.9996882324219,0Z" fill="#489149" fill-opacity="1"/></g><g transform="matrix(-1,0,0,1,750,0)"><path d="M375,26.184616088867188L375,45.84581608886719C386.0392,45.84581608886719,394.9882,54.64841608886719,394.9881,65.50691608886719C394.9869,76.36711608886719,386.0382,85.17041608886719,375,85.17041608886719L375,104.83151608886719C397.0796,104.83151608886719,414.97860000000003,87.22531608886719,414.97860000000003,65.50691608886719C414.9748,43.78871608886719,397.0769,26.184616088867188,375,26.184616088867188Z" fill="#489149" fill-opacity="1"/></g></g></g></svg>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none"
version="1.1" width="375" height="65" viewBox="0 0 375 65">
<defs>
<mask id="master_svg0_1_1782" style="mask-type:alpha" maskUnits="userSpaceOnUse">
<g>
<rect x="0" y="0" width="375" height="65" rx="0" fill="#FFFFFF" fill-opacity="1" />
</g>
</mask>
</defs>
<g mask="url(#master_svg0_1_1782)">
<g>
<g>
<rect x="-260" y="0" width="635" height="109" rx="0" fill="#000000" fill-opacity="1" />
</g>
<g>
<path
d="M-136.387,0L-260,0C-225.86430000000001,0,-198.1944,28.5306,-198.1944,63.7231C-198.1944,28.5306,-170.5223,0,-136.387,0Z"
fill=" #F9B85B" fill-opacity="1" />
</g>
<g>
<path
d="M0,26.184616088867188L0,45.84581608886719C11.0392,45.84581608886719,19.9882,54.64841608886719,19.9881,65.50691608886719C19.9869,76.36711608886719,11.0382,85.17041608886719,0,85.17041608886719L0,104.83151608886719C22.0796,104.83151608886719,39.9786,87.22531608886719,39.9786,65.50691608886719C39.9748,43.78871608886719,22.0769,26.184616088867188,0,26.184616088867188Z"
fill=" #F9B85B" fill-opacity="1" />
</g>
<g>
<path
d="M-114.01179572753907,90.58208044433593C-102.69459572753905,79.45108044433593,-102.69459572753905,61.40308044433594,-114.01179572753907,50.27214044433594C-125.32789572753907,39.14006044433594,-143.67599572753906,39.14006044433594,-154.99207572753906,50.27214044433594C-166.30929572753905,61.40308044433594,-166.30929572753905,79.45108044433593,-154.99207572753906,90.58208044433593C-143.67599572753906,101.71418044433594,-125.32789572753907,101.71418044433594,-114.01179572753907,90.58208044433593ZM-134.49049572753907,86.68818044433593L-151.02199572753906,70.42708044433594L-134.49049572753907,54.16378044433594L-117.95899572753906,70.42488044433594L-134.49049572753907,86.68818044433593Z"
fill=" #F9B85B" fill-opacity="1" />
</g>
<g>
<path
d="M158.9656,118.9656C176.34480000000002,101.5881,176.34480000000002,73.4119,158.9656,56.0344C141.5881,38.65519,113.4118,38.65519,96.0344,56.0344C78.65519,73.4119,78.65519,101.5882,96.0344,118.9656C113.4118,136.34480000000002,141.5881,136.34480000000002,158.9656,118.9656ZM127.5176,112.8865L102.1311,87.5L127.5176,62.11L152.9041,87.4965L127.5176,112.8865Z"
fill=" #F9B85B" fill-opacity="1" />
</g>
<g>
<path
d="M282.9656,118.9656C300.3448,101.5881,300.3448,73.4119,282.9656,56.0344C265.5881,38.65519,237.4118,38.65519,220.0344,56.0344C202.65519,73.4119,202.65519,101.5882,220.0344,118.9656C237.4118,136.34480000000002,265.5881,136.34480000000002,282.9656,118.9656ZM251.51760000000002,112.8865L226.1311,87.5L251.51760000000002,62.11L276.90409999999997,87.4965L251.51760000000002,112.8865Z"
fill=" #F9B85B" fill-opacity="1" />
</g>
<g>
<ellipse cx="251.5" cy="65.5" rx="12.5" ry="12.5" fill=" #F9B85B" fill-opacity="1" />
</g>
<g>
<ellipse cx="123.5" cy="65.5" rx="12.5" ry="12.5" fill=" #F9B85B" fill-opacity="1" />
</g>
<g>
<path
d="M-9.387,0L-133,0C-98.8643,0,-71.1944,28.5306,-71.1944,63.7231C-71.1944,28.5306,-43.5223,0,-9.387,0Z"
fill=" #F9B85B" fill-opacity="1" />
</g>
<g>
<path
d="M127.77334594726562,0L0.773345947265625,0C35.84424594726563,0,64.27224594726562,28.5306,64.27224594726562,63.7231C64.27224594726562,28.5306,92.70244594726563,0,127.77334594726562,0Z"
fill=" #F9B85B" fill-opacity="1" />
</g>
<g>
<path
d="M251.38634594726562,0L127.77334594726562,0C161.9090459472656,0,189.57894594726562,28.5306,189.57894594726562,63.7231C189.57894594726562,28.5306,217.25104594726562,0,251.38634594726562,0Z"
fill=" #F9B85B" fill-opacity="1" />
</g>
<g>
<path
d="M374.9996882324219,0L251.38668823242188,0C285.52238823242186,0,313.1922882324219,28.5306,313.1922882324219,63.7231C313.1922882324219,28.5306,340.8643882324219,0,374.9996882324219,0Z"
fill=" #F9B85B" fill-opacity="1" />
</g>
<g transform="matrix(-1,0,0,1,750,0)">
<path
d="M375,26.184616088867188L375,45.84581608886719C386.0392,45.84581608886719,394.9882,54.64841608886719,394.9881,65.50691608886719C394.9869,76.36711608886719,386.0382,85.17041608886719,375,85.17041608886719L375,104.83151608886719C397.0796,104.83151608886719,414.97860000000003,87.22531608886719,414.97860000000003,65.50691608886719C414.9748,43.78871608886719,397.0769,26.184616088867188,375,26.184616088867188Z"
fill=" #F9B85B" fill-opacity="1" />
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

@ -7,7 +7,7 @@
width: 100%;
height: 83px;
padding: 0 39px;
background-color: #000000;
background-color: #261138;
z-index: 999;
li {
display: flex;

View File

@ -1,7 +1,7 @@
/*
* @LastEditors: John
* @Date: 2024-07-13 10:21:58
* @LastEditTime: 2024-07-13 17:20:53
* @LastEditTime: 2024-07-16 17:52:30
* @Author: John
*/
import ReactDOM from "react-dom/client";
@ -11,10 +11,11 @@ import { WebAppProvider } from "@vkruglikov/react-telegram-web-app";
import { MemoryRouter } from "react-router-dom";
import VConsole from "vconsole";
import flexible from "./utils/flexible.ts";
import { getUrlParameterByName } from "./utils/index.ts";
// if (getUrlParameterByName("vconsole") === "1") {
new VConsole();
// }
if (getUrlParameterByName("vconsole") === "1") {
new VConsole();
}
flexible(window, document);
ReactDOM.createRoot(document.getElementById("root")!).render(
// <WebAppProvider>

View File

@ -119,7 +119,7 @@
padding: 17px 15px;
position: fixed;
bottom: 83px;
background-color: #000000;
background-color: #261138;
z-index: 999;
button {
width: 345px;

View File

@ -1,3 +1,9 @@
/*
* @LastEditors: John
* @Date: 2024-07-13 16:08:30
* @LastEditTime: 2024-07-16 16:19:37
* @Author: John
*/
/*
* @LastEditors: John
* @Date: 2024-07-13 16:08:30
@ -38,7 +44,7 @@ export default function () {
<ul className={classes.frends_list}>
<span className={classes.frends_list_title}>0 friends</span>
{frends?.map((v, i) => (
<FrendsItem key={i} userName={v.account} point={"0"} />
<FrendsItem key={i} userName={v.account} point={v.amount} />
))}
</ul>
<div className={classes.bottom_btn}>

View File

@ -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;

View File

@ -168,12 +168,12 @@ function Proccess({
<li className={classes.process}>
<div>
<span>{title}</span>
<CheckCircleFill color={finish ? "#489149" : "#666666"} />
<CheckCircleFill color={finish ? "#F9B85B" : "#666666"} />
</div>
<ProgressBar
percent={percent}
style={{
"--fill-color": "#489149",
"--fill-color": "#F9B85B",
}}
/>
</li>

View File

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

View File

@ -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<string | undefined>();
const [signReward, setSignReward] = useState<string | undefined>();
const [tgReward, setTgReward] = useState<string | undefined>();
const [xReward, setXReward] = useState<string | undefined>();
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 (
<>
<div className={classes.home}>
@ -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 () {
</Button>
</div>
<div className={classes.join_card}>
<span>Join X</span>
<span>Join X To Get Reward</span>
<Button
fill="none"
onClick={async () => {
await api_follow_twitter().send({});
WebApp.openLink(`https://x.com/pioneerportal`);
UpdateHomeData();
}}
>
join
</Button>
</div>
<div className={classes.rewards}>
<span className={classes.rewards_title}>Your rewards</span>
@ -71,6 +99,12 @@ export default function () {
<span>Telegram Premium</span>
<span>{tgReward || 0}</span>
</div>
<div className={classes.reward_list}>
<CheckOutline color="#ffffff" />
<span>Join X</span>
<span>{xReward || 0}</span>
</div>
</div>
</div>
</>

View File

@ -103,7 +103,7 @@
display: flex;
padding: 12px 115px;
background: #489149;
background: #261138;
> span {
display: flex;
align-items: center;

View File

@ -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<any, {}>({
url: "/api/reward/followTwitter",
});
}

View File

@ -30,6 +30,7 @@ export type userBenefits = {
export type subordinatesUsers = {
account: string;
amount: string;
accountType: number;
allPid: string;
chainType: number;

7
src/vite-env.d.ts vendored
View File

@ -1,8 +1,15 @@
/*
* @LastEditors: John
* @Date: 2024-07-13 10:21:58
* @LastEditTime: 2024-07-16 16:27:31
* @Author: John
*/
/// <reference types="vite/client" />
interface ImportMetaEnv {
readonly VITE_BASE_URL: string;
readonly VITE_BASE_API_URL: string;
readonly VITE_TG_COMMUNITY: string;
readonly VITE_TG_BOT_NAME: string;
readonly VITE_TG_BOT_WEBAPP_NAME: string;
// 更多环境变量...

File diff suppressed because one or more lines are too long

2
vite.config.d.ts vendored Normal file
View File

@ -0,0 +1,2 @@
declare const _default: import("vite").UserConfig;
export default _default;

29
vite.config.js Normal file
View File

@ -0,0 +1,29 @@
/*
* @LastEditors: John
* @Date: 2024-07-13 10:21:58
* @LastEditTime: 2024-07-15 11:02:27
* @Author: John
*/
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import path from "path";
// https://vitejs.dev/config/
export default defineConfig({
server: {
host: "192.168.10.167",
proxy: {
"/dev": {
target: "http://192.168.10.100:8096",
changeOrigin: true,
rewrite: function (path) { return path.replace(/^\/dev/, ""); },
},
},
},
plugins: [react()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
css: {},
});