feat: entry debug

This commit is contained in:
2025-09-30 15:36:39 +08:00
parent 003df3005f
commit 17cfb1ce81
6 changed files with 229 additions and 20 deletions

View File

@@ -7,6 +7,49 @@
flex-direction: column;
align-items: center;
justify-content: space-between;
padding: 20px;
// padding: 20px;
box-sizing: border-box;
.entryCard {
width: 100%;
box-sizing: border-box;
padding: 0 20px;
}
}
.header {
height: 72px;
width: 100%;
padding: 16px;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-between;
color: #000;
text-align: center;
font-family: "PingFang SC";
font-size: 22px;
font-style: normal;
font-weight: 600;
line-height: 28px;
.closeBtn {
display: flex;
width: 40px;
height: 40px;
justify-content: center;
align-items: center;
gap: 6px;
flex-shrink: 0;
border-radius: 999px;
border: 1px solid rgba(0, 0, 0, 0.06);
background: #fff;
box-shadow: 0 4px 36px 0 rgba(0, 0, 0, 0.06);
.closeIcon {
width: 24px;
height: 24px;
flex-shrink: 0;
}
}
}

View File

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