feat: entry debug
This commit is contained in:
@@ -5,14 +5,15 @@ import React, {
|
||||
forwardRef,
|
||||
memo,
|
||||
} from "react";
|
||||
import { Button, Input, View, Text } from "@tarojs/components";
|
||||
import { Button, Input, View, Text, Image } from "@tarojs/components";
|
||||
import Taro from "@tarojs/taro";
|
||||
import CommonPopup from "../CommonPopup";
|
||||
import { getCurrentFullPath } from "@/utils";
|
||||
import evaluateService from "@/services/evaluateService";
|
||||
import NTRPTestEntryCard from "../NTRPTestEntryCard";
|
||||
import NtrpPopupGuide from "../NTRPPopupGuide";
|
||||
import style from "./index.module.scss";
|
||||
import CloseIcon from "@/static/ntrp/ntrp_popup_close.svg";
|
||||
import styles from "./index.module.scss";
|
||||
|
||||
export enum EvaluateType {
|
||||
EDIT = "edit",
|
||||
@@ -56,6 +57,7 @@ const NTRPEvaluatePopup = (props: NTRPEvaluatePopupProps, ref) => {
|
||||
} = props;
|
||||
const [visible, setVisible] = useState(true);
|
||||
const [ntrp, setNtrp] = useState<undefined | string>();
|
||||
const [guideShow, setGuideShow] = useState(() => props.showGuide);
|
||||
|
||||
useImperativeHandle(ref, () => ({
|
||||
show: () => setVisible(true),
|
||||
@@ -90,21 +92,38 @@ const NTRPEvaluatePopup = (props: NTRPEvaluatePopupProps, ref) => {
|
||||
? showCondition(scene, ntrp)
|
||||
: displayCondition === "always";
|
||||
|
||||
function handleClose() {
|
||||
setVisible(false);
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<CommonPopup
|
||||
title="NTRP评估"
|
||||
visible={visible}
|
||||
onClose={() => setVisible(false)}
|
||||
onClose={handleClose}
|
||||
showHeader={false}
|
||||
hideFooter
|
||||
enableDragToClose={false}
|
||||
>
|
||||
{showGuide ? (
|
||||
<NtrpPopupGuide />
|
||||
{guideShow ? (
|
||||
<NtrpPopupGuide
|
||||
close={handleClose}
|
||||
skipGuide={() => {
|
||||
setGuideShow(false);
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
<View className={style.container}>
|
||||
<NTRPTestEntryCard />
|
||||
<View className={styles.container}>
|
||||
<View className={styles.header}>
|
||||
<Text>选择 NTRP 自评水平</Text>
|
||||
<View className={styles.closeBtn} onClick={handleClose}>
|
||||
<Image className={styles.closeIcon} src={CloseIcon} />
|
||||
</View>
|
||||
</View>
|
||||
<View className={styles.entryCard}>
|
||||
<NTRPTestEntryCard />
|
||||
</View>
|
||||
</View>
|
||||
)}
|
||||
</CommonPopup>
|
||||
|
||||
Reference in New Issue
Block a user