feat: entry debug
This commit is contained in:
@@ -7,6 +7,49 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 20px;
|
// padding: 20px;
|
||||||
box-sizing: border-box;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,14 +5,15 @@ import React, {
|
|||||||
forwardRef,
|
forwardRef,
|
||||||
memo,
|
memo,
|
||||||
} from "react";
|
} 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 Taro from "@tarojs/taro";
|
||||||
import CommonPopup from "../CommonPopup";
|
import CommonPopup from "../CommonPopup";
|
||||||
import { getCurrentFullPath } from "@/utils";
|
import { getCurrentFullPath } from "@/utils";
|
||||||
import evaluateService from "@/services/evaluateService";
|
import evaluateService from "@/services/evaluateService";
|
||||||
import NTRPTestEntryCard from "../NTRPTestEntryCard";
|
import NTRPTestEntryCard from "../NTRPTestEntryCard";
|
||||||
import NtrpPopupGuide from "../NTRPPopupGuide";
|
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 {
|
export enum EvaluateType {
|
||||||
EDIT = "edit",
|
EDIT = "edit",
|
||||||
@@ -56,6 +57,7 @@ const NTRPEvaluatePopup = (props: NTRPEvaluatePopupProps, ref) => {
|
|||||||
} = props;
|
} = props;
|
||||||
const [visible, setVisible] = useState(true);
|
const [visible, setVisible] = useState(true);
|
||||||
const [ntrp, setNtrp] = useState<undefined | string>();
|
const [ntrp, setNtrp] = useState<undefined | string>();
|
||||||
|
const [guideShow, setGuideShow] = useState(() => props.showGuide);
|
||||||
|
|
||||||
useImperativeHandle(ref, () => ({
|
useImperativeHandle(ref, () => ({
|
||||||
show: () => setVisible(true),
|
show: () => setVisible(true),
|
||||||
@@ -90,22 +92,39 @@ const NTRPEvaluatePopup = (props: NTRPEvaluatePopupProps, ref) => {
|
|||||||
? showCondition(scene, ntrp)
|
? showCondition(scene, ntrp)
|
||||||
: displayCondition === "always";
|
: displayCondition === "always";
|
||||||
|
|
||||||
|
function handleClose() {
|
||||||
|
setVisible(false);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<CommonPopup
|
<CommonPopup
|
||||||
title="NTRP评估"
|
title="NTRP评估"
|
||||||
visible={visible}
|
visible={visible}
|
||||||
onClose={() => setVisible(false)}
|
onClose={handleClose}
|
||||||
showHeader={false}
|
showHeader={false}
|
||||||
hideFooter
|
hideFooter
|
||||||
enableDragToClose={false}
|
enableDragToClose={false}
|
||||||
>
|
>
|
||||||
{showGuide ? (
|
{guideShow ? (
|
||||||
<NtrpPopupGuide />
|
<NtrpPopupGuide
|
||||||
|
close={handleClose}
|
||||||
|
skipGuide={() => {
|
||||||
|
setGuideShow(false);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
) : (
|
) : (
|
||||||
<View className={style.container}>
|
<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 />
|
<NTRPTestEntryCard />
|
||||||
</View>
|
</View>
|
||||||
|
</View>
|
||||||
)}
|
)}
|
||||||
</CommonPopup>
|
</CommonPopup>
|
||||||
{showEntry ? props.children : ""}
|
{showEntry ? props.children : ""}
|
||||||
|
|||||||
@@ -1,3 +1,144 @@
|
|||||||
|
.container {
|
||||||
|
width: 100%;
|
||||||
|
height: 540px;
|
||||||
|
border-radius: 20px 20px 0 0;
|
||||||
|
background: linear-gradient(180deg, #bfffef 0%, #f2fffc 100%), #fafafa;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.top {
|
||||||
|
width: 100%;
|
||||||
|
padding: 0 24px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin-bottom: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom {
|
||||||
|
width: 100%;
|
||||||
|
padding: 0 10px 40px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 10px;
|
||||||
|
|
||||||
|
.jump,
|
||||||
|
.direct {
|
||||||
|
width: 100%;
|
||||||
|
height: 50px;
|
||||||
|
border-radius: 16px;
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.06);
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.button {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 8px;
|
||||||
|
background: #fff;
|
||||||
|
color: #000;
|
||||||
|
font-feature-settings: "liga" off, "clig" off;
|
||||||
|
font-family: "PingFang SC";
|
||||||
|
font-size: 16px;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: normal;
|
||||||
|
|
||||||
|
&.primary {
|
||||||
|
color: #fff;
|
||||||
|
background: #000;
|
||||||
|
|
||||||
|
.jumpIcon {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
height: 72px;
|
||||||
|
width: 100%;
|
||||||
|
padding: 16px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.guideMsg {
|
||||||
|
padding-bottom: 20px;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
color: #2a4d44;
|
||||||
|
font-family: "Noto Sans SC";
|
||||||
|
font-size: 32px;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 900;
|
||||||
|
line-height: 48px;
|
||||||
|
|
||||||
|
.colorTip {
|
||||||
|
color: #00e5ad;
|
||||||
|
font-family: "Noto Sans SC";
|
||||||
|
font-size: 32px;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 900;
|
||||||
|
line-height: 48px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.strongTip {
|
||||||
|
color: #00e5ad;
|
||||||
|
font-family: "Noto Sans SC";
|
||||||
|
font-size: 32px;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 900;
|
||||||
|
line-height: 48px;
|
||||||
|
text-decoration-line: underline;
|
||||||
|
text-decoration-style: solid;
|
||||||
|
text-decoration-skip-ink: auto;
|
||||||
|
text-decoration-thickness: auto;
|
||||||
|
text-underline-offset: auto;
|
||||||
|
text-underline-position: from-font;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.desc {
|
||||||
|
color: #2a4d44;
|
||||||
|
font-family: "Noto Sans SC";
|
||||||
|
font-size: 16px;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 900;
|
||||||
|
line-height: 28px;
|
||||||
|
}
|
||||||
|
|
||||||
@mixin commonAvatarStyle($multiple: 1) {
|
@mixin commonAvatarStyle($multiple: 1) {
|
||||||
.avatar {
|
.avatar {
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
@@ -52,6 +193,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.avatarWrap {
|
.avatarWrap {
|
||||||
|
width: 100%;
|
||||||
|
padding-bottom: 20px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { View, Text, Button, Image } from "@tarojs/components";
|
import { View, Text, Button, Image } from "@tarojs/components";
|
||||||
import Taro from "@tarojs/taro";
|
import Taro from "@tarojs/taro";
|
||||||
|
import classnames from "classnames";
|
||||||
import { useUserInfo } from "@/store/userStore";
|
import { useUserInfo } from "@/store/userStore";
|
||||||
import ArrwoRight from "@/static/ntrp/ntrp_arrow_right.svg";
|
import ArrwoRight from "@/static/ntrp/ntrp_arrow_right.svg";
|
||||||
import CloseIcon from "@/static/ntrp/ntrp_popup_close.svg";
|
import CloseIcon from "@/static/ntrp/ntrp_popup_close.svg";
|
||||||
@@ -18,12 +19,12 @@ function NtrpPopupGuide(props: { close: () => void; skipGuide: () => void }) {
|
|||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<View className={styles.container}>
|
<View className={styles.container}>
|
||||||
<View className={styles.top}>
|
|
||||||
<View className={styles.header}>
|
<View className={styles.header}>
|
||||||
<View className={styles.closeBtn} onClick={close}>
|
<View className={styles.closeBtn} onClick={close}>
|
||||||
<Image className={styles.closeIcon} src={CloseIcon} />
|
<Image className={styles.closeIcon} src={CloseIcon} />
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
<View className={styles.top}>
|
||||||
<View className={styles.avatarWrap}>
|
<View className={styles.avatarWrap}>
|
||||||
<View className={styles.avatar}>
|
<View className={styles.avatar}>
|
||||||
<Image
|
<Image
|
||||||
@@ -41,7 +42,7 @@ function NtrpPopupGuide(props: { close: () => void; skipGuide: () => void }) {
|
|||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View>
|
<View className={styles.guideMsg}>
|
||||||
<View className={styles.title}>
|
<View className={styles.title}>
|
||||||
<Text>快速测一测✏️</Text>
|
<Text>快速测一测✏️</Text>
|
||||||
</View>
|
</View>
|
||||||
@@ -59,13 +60,16 @@ function NtrpPopupGuide(props: { close: () => void; skipGuide: () => void }) {
|
|||||||
</View>
|
</View>
|
||||||
<View className={styles.bottom}>
|
<View className={styles.bottom}>
|
||||||
<View className={styles.jump}>
|
<View className={styles.jump}>
|
||||||
<Button onClick={handleTest}>
|
<Button
|
||||||
|
className={classnames(styles.button, styles.primary)}
|
||||||
|
onClick={handleTest}
|
||||||
|
>
|
||||||
<Text>快速测试</Text>
|
<Text>快速测试</Text>
|
||||||
<Image className={styles.jumpIcon} src={ArrwoRight} />
|
<Image className={styles.jumpIcon} src={ArrwoRight} />
|
||||||
</Button>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.direct}>
|
<View className={styles.direct}>
|
||||||
<Button onClick={skipGuide}>
|
<Button className={classnames(styles.button)} onClick={skipGuide}>
|
||||||
<Text>我了解我的水平,无需测试</Text>
|
<Text>我了解我的水平,无需测试</Text>
|
||||||
</Button>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ function NTRPTestEntryCard(props) {
|
|||||||
// fetchUserInfo()
|
// fetchUserInfo()
|
||||||
// }, [])
|
// }, [])
|
||||||
const { type } = props;
|
const { type } = props;
|
||||||
return type !== "list" ? (
|
return type === "list" ? (
|
||||||
<View className={styles.higher}>
|
<View className={styles.higher}>
|
||||||
<View className={styles.desc}>
|
<View className={styles.desc}>
|
||||||
<View>
|
<View>
|
||||||
|
|||||||
@@ -313,8 +313,8 @@ function StickyButton(props) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const displayPrice = is_organizer ? 0 : price;
|
const displayPrice = is_organizer ? 0 : price;
|
||||||
// user_action_status.can_assess = true;
|
user_action_status.can_assess = true;
|
||||||
// user_action_status.can_join = false;
|
user_action_status.can_join = false;
|
||||||
// console.log(user_action_status, "user_action");
|
// console.log(user_action_status, "user_action");
|
||||||
const {
|
const {
|
||||||
can_assess,
|
can_assess,
|
||||||
@@ -391,7 +391,7 @@ function StickyButton(props) {
|
|||||||
types={[EvaluateType.EDIT, EvaluateType.EVALUATE]}
|
types={[EvaluateType.EDIT, EvaluateType.EVALUATE]}
|
||||||
scene={SceneType.DETAIL}
|
scene={SceneType.DETAIL}
|
||||||
displayCondition={DisplayConditionType.AUTO}
|
displayCondition={DisplayConditionType.AUTO}
|
||||||
showGuide
|
showGuide={false}
|
||||||
>
|
>
|
||||||
<Text>¥{displayPrice} 立即加入</Text>
|
<Text>¥{displayPrice} 立即加入</Text>
|
||||||
</NTRPEvaluatePopup>
|
</NTRPEvaluatePopup>
|
||||||
|
|||||||
Reference in New Issue
Block a user