✨ feat:
This commit is contained in:
parent
cb5f785a24
commit
9ce033624f
|
@ -0,0 +1,11 @@
|
|||
###
|
||||
# @LastEditors: John
|
||||
# @Date: 2024-07-19 17:45:49
|
||||
# @LastEditTime: 2024-07-19 18:14:36
|
||||
# @Author: John
|
||||
###
|
||||
VITE_BASE_URL=
|
||||
VITE_BASE_API_URL=
|
||||
VITE_TG_COMMUNITY=sctSCT_bot
|
||||
VITE_TG_BOT_NAME=sctSCT_bot
|
||||
VITE_TG_BOT_WEBAPP_NAME=SCT
|
|
@ -6,6 +6,7 @@
|
|||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc -b && vite build",
|
||||
"build:test": "tsc -b && vite build --mode test",
|
||||
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
||||
"preview": "vite preview",
|
||||
"iconfont": "npx iconfont-h5"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
body,
|
||||
html,
|
||||
#root {
|
||||
height: var(--tg-viewport-height);
|
||||
min-height: var(--tg-viewport-height);
|
||||
background-image: url("./assets/home_bg.svg");
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* @LastEditors: John
|
||||
* @Date: 2024-07-13 10:21:58
|
||||
* @LastEditTime: 2024-07-19 14:15:42
|
||||
* @LastEditTime: 2024-07-19 19:10:34
|
||||
* @Author: John
|
||||
*/
|
||||
import { MemoryRouter, Route, Routes } from "react-router-dom";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* @LastEditors: John
|
||||
* @Date: 2024-07-13 16:08:30
|
||||
* @LastEditTime: 2024-07-19 15:57:27
|
||||
* @LastEditTime: 2024-07-19 19:06:35
|
||||
* @Author: John
|
||||
*/
|
||||
/*
|
||||
|
@ -63,7 +63,7 @@ export default function () {
|
|||
updateFriends(1);
|
||||
}}
|
||||
>
|
||||
Level 1
|
||||
Level 1 friends
|
||||
</span>
|
||||
<span
|
||||
className={cn(
|
||||
|
@ -75,7 +75,7 @@ export default function () {
|
|||
updateFriends(2);
|
||||
}}
|
||||
>
|
||||
Level 2
|
||||
Level 2 friends
|
||||
</span>
|
||||
</div>
|
||||
{frends?.map((v, i) => (
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
.guide {
|
||||
height: 100%;
|
||||
height: var(--tg-viewport-height);
|
||||
background-image: url("../assets/guide_bg.svg");
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* @LastEditors: John
|
||||
* @Date: 2024-07-18 14:42:58
|
||||
* @LastEditTime: 2024-07-18 17:07:14
|
||||
* @LastEditTime: 2024-07-19 19:13:27
|
||||
* @Author: John
|
||||
*/
|
||||
import {
|
||||
|
@ -15,7 +15,7 @@ import guide_icon from "@/assets/guide_icon.svg";
|
|||
import dianbao from "@/assets/dianbao.svg";
|
||||
import youguang from "@/assets/youguang.svg";
|
||||
import tuite from "@/assets/tuite.svg";
|
||||
import { api_login } from "@/server/api";
|
||||
import { api_get_user_information, api_login } from "@/server/api";
|
||||
import useUserStore from "@/store/User";
|
||||
|
||||
export default function () {
|
||||
|
@ -66,6 +66,9 @@ export default function () {
|
|||
},
|
||||
});
|
||||
if (data?.data.token) UpdateToken(data?.data.token);
|
||||
|
||||
const { data: userData } = await api_get_user_information().send({});
|
||||
UpdateInvitationCode(userData?.data.shareCode || "");
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* @LastEditors: John
|
||||
* @Date: 2024-07-13 10:50:24
|
||||
* @LastEditTime: 2024-07-19 17:05:08
|
||||
* @LastEditTime: 2024-07-19 19:03:45
|
||||
* @Author: John
|
||||
*/
|
||||
import classes from "./Home-m.module.css";
|
||||
|
@ -91,6 +91,7 @@ export default function () {
|
|||
title="Follow starcraft Telegram"
|
||||
buttom_text="Follow"
|
||||
button_disable={v.taskType == 1}
|
||||
reward={v.opValue}
|
||||
onTaskSuccess={() => {
|
||||
UpdateHomeData();
|
||||
UpdateTaskList();
|
||||
|
@ -105,6 +106,7 @@ export default function () {
|
|||
title="Join starcraft Telegram"
|
||||
buttom_text="Joined"
|
||||
button_disable={v.taskType == 1}
|
||||
reward={v.opValue}
|
||||
onTaskSuccess={() => {
|
||||
UpdateHomeData();
|
||||
UpdateTaskList();
|
||||
|
@ -119,6 +121,7 @@ export default function () {
|
|||
title="Follow @starcraft Twitter"
|
||||
buttom_text="Follow"
|
||||
button_disable={v.taskType == 1}
|
||||
reward={v.opValue}
|
||||
onTaskSuccess={() => {
|
||||
UpdateHomeData();
|
||||
UpdateTaskList();
|
||||
|
@ -133,6 +136,7 @@ export default function () {
|
|||
title="Like on @starcraft Twitter"
|
||||
buttom_text="Like"
|
||||
button_disable={v.taskType == 1}
|
||||
reward={v.opValue}
|
||||
onTaskSuccess={() => {
|
||||
UpdateHomeData();
|
||||
UpdateTaskList();
|
||||
|
@ -147,6 +151,7 @@ export default function () {
|
|||
title="Retweet @starcraft Twitter"
|
||||
buttom_text="Follow"
|
||||
button_disable={v.taskType == 1}
|
||||
reward={v.opValue}
|
||||
onTaskSuccess={() => {
|
||||
UpdateHomeData();
|
||||
UpdateTaskList();
|
||||
|
@ -161,6 +166,7 @@ export default function () {
|
|||
title="Quote @starcraft Twitter"
|
||||
buttom_text="Quote"
|
||||
button_disable={v.taskType == 1}
|
||||
reward={v.opValue}
|
||||
onTaskSuccess={() => {
|
||||
UpdateHomeData();
|
||||
UpdateTaskList();
|
||||
|
@ -198,6 +204,7 @@ function TaskItem({
|
|||
task_url,
|
||||
type,
|
||||
buttom_text,
|
||||
reward,
|
||||
button_disable,
|
||||
onTaskSuccess,
|
||||
}: {
|
||||
|
@ -206,6 +213,7 @@ function TaskItem({
|
|||
title: string;
|
||||
type: taskConfigurationListItem["type"];
|
||||
buttom_text: string;
|
||||
reward: string;
|
||||
button_disable?: boolean;
|
||||
onTaskSuccess?: () => void;
|
||||
}) {
|
||||
|
@ -232,7 +240,7 @@ function TaskItem({
|
|||
</div>
|
||||
<div className={classes.social_task_item_bottom}>
|
||||
<span>Reward</span>
|
||||
<span>+1,000 SCTT</span>
|
||||
<span>+{reward} SCTT</span>
|
||||
</div>
|
||||
</li>
|
||||
);
|
||||
|
|
|
@ -7,5 +7,5 @@
|
|||
"allowSyntheticDefaultImports": true,
|
||||
"strict": true
|
||||
},
|
||||
"include": ["vite.config.ts"]
|
||||
"include": ["./vite.config.ts"]
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -9,24 +9,24 @@ import react from "@vitejs/plugin-react";
|
|||
import path from "path";
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
server: {
|
||||
host: "192.168.10.167",
|
||||
port: 8082,
|
||||
proxy: {
|
||||
"/dev": {
|
||||
target: "http://192.168.10.100:8096",
|
||||
changeOrigin: true,
|
||||
rewrite: function (path) {
|
||||
return path.replace(/^\/dev/, "");
|
||||
server: {
|
||||
host: "192.168.10.167",
|
||||
port: 8082,
|
||||
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"),
|
||||
plugins: [react()],
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": path.resolve(__dirname, "./src"),
|
||||
},
|
||||
},
|
||||
},
|
||||
css: {},
|
||||
css: {},
|
||||
});
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* @LastEditors: John
|
||||
* @Date: 2024-07-13 10:21:58
|
||||
* @LastEditTime: 2024-07-18 14:47:48
|
||||
* @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",
|
||||
port: 8082,
|
||||
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: {},
|
||||
});
|
Loading…
Reference in New Issue