Compare commits

..

No commits in common. "middle-school-ai" and "master" have entirely different histories.

3 changed files with 29 additions and 6 deletions

View File

@ -1,5 +1,6 @@
import AntechamberHeader from "@/components/AntechamberHeader"; import AntechamberHeader from "@/components/AntechamberHeader";
import InvokeButton from "@/components/AntechamberButton"; import InvokeButton from "@/components/AntechamberButton";
import AntechamberScore from "@/components/AntechamberScore";
import { useContext, useEffect, useState } from "react"; import { useContext, useEffect, useState } from "react";
import { RealtimeClientContext } from "@/components/Provider/RealtimeClientProvider"; import { RealtimeClientContext } from "@/components/Provider/RealtimeClientProvider";
@ -75,6 +76,7 @@ export default function Antechamber() {
return ( return (
<div className="flex flex-col items-center h-full overflow-y-auto relative"> <div className="flex flex-col items-center h-full overflow-y-auto relative">
<AntechamberHeader /> <AntechamberHeader />
<AntechamberScore />
<AntechamberWishList handleLoading={setIsLoading} /> <AntechamberWishList handleLoading={setIsLoading} />
<AntechamberFile handleLoading={setIsLoading} /> <AntechamberFile handleLoading={setIsLoading} />
<AntechamberReport handleLoading={setIsLoading} /> <AntechamberReport handleLoading={setIsLoading} />

View File

@ -5,6 +5,8 @@ import WhatsThing from "/icons/whatsThing.png";
import CircleIcon from "/icons/circle.png"; import CircleIcon from "/icons/circle.png";
import RightIcon from "/icons/right.png"; import RightIcon from "/icons/right.png";
import styles from "./index.module.css"; import styles from "./index.module.css";
import { fetchQuestions } from "@/apis/questions";
import { useAbortController } from "@/hooks/useAbortController";
import { RealtimeClientContext } from "../Provider/RealtimeClientProvider"; import { RealtimeClientContext } from "../Provider/RealtimeClientProvider";
// import Countdown from "../Countdown"; // import Countdown from "../Countdown";
@ -15,6 +17,7 @@ export default function HeaderGroup() {
const { handleConnect } = useContext(RealtimeClientContext); const { handleConnect } = useContext(RealtimeClientContext);
const { getSignal } = useAbortController();
// 随机获取4个问题的函数 // 随机获取4个问题的函数
const getRandomQuestions = () => { const getRandomQuestions = () => {
@ -31,7 +34,12 @@ export default function HeaderGroup() {
}; };
const getQuestion = async () => { const getQuestion = async () => {
setAllQuestions(["济南500分还能上哪些高中", "第二批志愿怎么填最稳", "指标生和统招生区别"]); const { result, message } = await fetchQuestions({ options: { signal:getSignal() } });
if (message) {
console.log(message);
} else {
setAllQuestions(result as string[]);
}
}; };
useEffect(() => { useEffect(() => {
@ -70,13 +78,26 @@ export default function HeaderGroup() {
<div className={styles.main} onClick={handleClick}> <div className={styles.main} onClick={handleClick}>
<img className={styles.thing} src={WhatsThing} alt="whatsThing" /> <img className={styles.thing} src={WhatsThing} alt="whatsThing" />
<div className={styles.circle}> <div className={styles.circle}>
<img src={CircleIcon} className={isRotating ? styles.rotating : ""} alt="circle" /> <img
src={CircleIcon}
className={isRotating ? styles.rotating : ""}
alt="circle"
/>
<div className={styles.change}></div>
</div> </div>
</div> </div>
{displayQuestions.map((item, index) => ( {displayQuestions.map((item, index) => (
<div className={styles.tip} key={index} onClick={() => handleQuestion(item)}> <div
className={styles.tip}
key={index}
onClick={() => handleQuestion(item)}
>
<div className="text-[14px] text-[#000]">{item}</div> <div className="text-[14px] text-[#000]">{item}</div>
<img src={RightIcon} alt="right-icon" className={styles.rightIcon} /> <img
src={RightIcon}
alt="right-icon"
className={styles.rightIcon}
/>
</div> </div>
))} ))}
</div> </div>

View File

@ -3,7 +3,7 @@
# 服务器信息 # 服务器信息
SERVER_USER="root" SERVER_USER="root"
SERVER_HOST="106.14.30.150" SERVER_HOST="106.14.30.150"
SERVER_PATH="/opt/1panel/apps/openresty/openresty/www/sites/aizk.ycymedu.com/index" SERVER_PATH="/opt/1panel/apps/openresty/openresty/www/sites/chat.ycymedu.com/index"
PRIVATE_KEY="ALIYUN.pem" PRIVATE_KEY="ALIYUN.pem"
BACKUP_PATH="${SERVER_PATH}-backup-$(date +%Y%m%d%H%M%S).zip" BACKUP_PATH="${SERVER_PATH}-backup-$(date +%Y%m%d%H%M%S).zip"
DINGDING_WEBHOOK="https://oapi.dingtalk.com/robot/send?access_token=fca104958fea6273c9c7ef3f08b3d552645c214f929066785e8caf6e1885a5a6" DINGDING_WEBHOOK="https://oapi.dingtalk.com/robot/send?access_token=fca104958fea6273c9c7ef3f08b3d552645c214f929066785e8caf6e1885a5a6"