fix: 问题修复

This commit is contained in:
2025-11-15 19:08:19 +08:00
parent 93f08d5a9f
commit 79b2e9869f
24 changed files with 872 additions and 529 deletions

View File

@@ -8,6 +8,7 @@ import evaluateService, {
LastTimeTestResult,
Question,
TestResultData,
StageType,
} from "@/services/evaluateService";
import { useUserInfo, useUserActions } from "@/store/userStore";
import { useEvaluate, EvaluateScene } from "@/store/evaluateStore";
@@ -24,12 +25,6 @@ import DownloadIcon from "@/static/ntrp/ntrp_download.svg";
import ReTestIcon from "@/static/ntrp/ntrp_re-action.svg";
import styles from "./index.module.scss";
enum StageType {
INTRO = "intro",
TEST = "test",
RESULT = "result",
}
const sourceTypeToTextMap = new Map([
[EvaluateScene.detail, "继续加入球局"],
[EvaluateScene.publish, "继续发布球局"],
@@ -174,20 +169,17 @@ function Intro() {
}
function handleNext(type) {
setCallback({
type: EvaluateScene.share,
next: () => {
Taro.redirectTo({ url: "/main_pages/index" });
},
onCancel: () => {
Taro.redirectTo({ url: "/main_pages/index" });
// if (userInfo.id) {
// Taro.redirectTo({ url: "/game_pages/list/index" });
// } else {
// Taro.exitMiniProgram();
// }
},
});
if (!id) {
setCallback({
type: EvaluateScene.share,
next: () => {
Taro.redirectTo({ url: "/main_pages/index" });
},
onCancel: () => {
Taro.redirectTo({ url: "/main_pages/index" });
},
});
}
Taro.redirectTo({
url: `/other_pages/ntrp-evaluate/index?stage=${type}${
type === StageType.RESULT ? `&id=${id}` : ""
@@ -497,7 +489,7 @@ function Result() {
async function handleGoon() {
if (type) {
next();
next({ flag: false, score: result?.ntrp_level as string });
await delay(1500);
clear();
} else {