Commit 651818a2 authored by Chunchi Che's avatar Chunchi Che

update

parent 201e3158
Pipeline #21105 failed with stages
in 6 minutes and 37 seconds
...@@ -64,7 +64,7 @@ export const fetchEsHintMeta = createAsyncThunk( ...@@ -64,7 +64,7 @@ export const fetchEsHintMeta = createAsyncThunk(
const location = param.location; const location = param.location;
if (param.cardID) { if (param.cardID) {
const cardMeta = await fetchCard(param.cardID); const cardMeta = await fetchCard(param.cardID, true);
return { originMsg, cardMeta, location }; return { originMsg, cardMeta, location };
} else { } else {
......
...@@ -18,7 +18,7 @@ export default (hint: MsgHint, dispatch: AppDispatch) => { ...@@ -18,7 +18,7 @@ export default (hint: MsgHint, dispatch: AppDispatch) => {
break; break;
} }
case MsgHint.HintType.HINT_SELECTMSG: { case MsgHint.HintType.HINT_SELECTMSG: {
dispatch(fetchSelectHintMeta({ selectHintData: hint.hint_data })); dispatch(fetchSelectHintMeta({ selectHintData: hint.hint_data, esHint: "" }));
break; break;
} }
default: { default: {
......
...@@ -6,5 +6,5 @@ export default ( ...@@ -6,5 +6,5 @@ export default (
_: ygopro.StocGameMessage.MsgSpSummoned, _: ygopro.StocGameMessage.MsgSpSummoned,
dispatch: AppDispatch dispatch: AppDispatch
) => { ) => {
dispatch(fetchEsHintMeta({ originMsg: 1604 })); dispatch(fetchEsHintMeta({ originMsg: 1606 }));
}; };
...@@ -34,8 +34,9 @@ const CheckCardModal = () => { ...@@ -34,8 +34,9 @@ const CheckCardModal = () => {
const cancelResponse = useAppSelector(selectCheckCardModalCacnelResponse); const cancelResponse = useAppSelector(selectCheckCardModalCacnelResponse);
const [response, setResponse] = useState<number[]>([]); const [response, setResponse] = useState<number[]>([]);
const defaultValue: number[] = []; const defaultValue: number[] = [];
const selectHintMsg = const hint = useAppSelector(selectHint);
useAppSelector(selectHint)?.esSelectHint || "请选择卡片"; const preHintMsg = hint?.esHint || "";
const selectHintMsg = hint?.esSelectHint || "请选择卡片";
// TODO: 这里可以考虑更好地封装 // TODO: 这里可以考虑更好地封装
const sendResponseHandler = ( const sendResponseHandler = (
...@@ -58,7 +59,7 @@ const CheckCardModal = () => { ...@@ -58,7 +59,7 @@ const CheckCardModal = () => {
return ( return (
<DragModal <DragModal
title={`${selectHintMsg} ${min}-${max}`} title={`${preHintMsg} ${selectHintMsg} ${min}-${max}`}
open={isOpen} open={isOpen}
closable={false} closable={false}
footer={ footer={
......
...@@ -33,8 +33,9 @@ const CheckCardModalV2 = () => { ...@@ -33,8 +33,9 @@ const CheckCardModalV2 = () => {
); );
const selectedOptions = useAppSelector(selectCheckCardModalV2SelectedOptions); const selectedOptions = useAppSelector(selectCheckCardModalV2SelectedOptions);
const responseable = useAppSelector(selectCheckCardModalV2ResponseAble); const responseable = useAppSelector(selectCheckCardModalV2ResponseAble);
const selectHintMsg = const hint = useAppSelector(selectHint);
useAppSelector(selectHint)?.esSelectHint || "请选择卡片"; const preHintMsg = hint?.esHint || "";
const selectHintMsg = hint?.esSelectHint || "请选择卡片";
const onFinishOrCancel = () => { const onFinishOrCancel = () => {
sendSelectUnselectCardResponse({ cancel_or_finish: true }); sendSelectUnselectCardResponse({ cancel_or_finish: true });
...@@ -45,7 +46,7 @@ const CheckCardModalV2 = () => { ...@@ -45,7 +46,7 @@ const CheckCardModalV2 = () => {
return ( return (
<DragModal <DragModal
title={`${selectHintMsg} ${min}-${max}`} title={`${preHintMsg} ${selectHintMsg} ${min}-${max}`}
open={isOpen} open={isOpen}
closable={false} closable={false}
footer={ footer={
......
...@@ -33,8 +33,9 @@ const CheckCardModalV3 = () => { ...@@ -33,8 +33,9 @@ const CheckCardModalV3 = () => {
.concat(selectedOptions) .concat(selectedOptions)
.map((option) => option.level2) .map((option) => option.level2)
.reduce((sum, current) => sum + current, 0); .reduce((sum, current) => sum + current, 0);
const selectHintMsg = const hint = useAppSelector(selectHint);
useAppSelector(selectHint)?.esSelectHint || "请选择卡片"; const preHintMsg = hint?.esHint || "";
const selectHintMsg = hint?.esSelectHint || "请选择卡片";
const responseable = const responseable =
(overflow (overflow
...@@ -53,7 +54,7 @@ const CheckCardModalV3 = () => { ...@@ -53,7 +54,7 @@ const CheckCardModalV3 = () => {
return ( return (
<DragModal <DragModal
title={`${selectHintMsg} ${min}-${max}`} title={`${preHintMsg} ${selectHintMsg} ${min}-${max}`}
open={isOpen} open={isOpen}
closable={false} closable={false}
footer={ footer={
......
...@@ -9,15 +9,18 @@ import { ...@@ -9,15 +9,18 @@ import {
} from "../../reducers/duel/modal/mod"; } from "../../reducers/duel/modal/mod";
import { setYesNoModalIsOpen } from "../../reducers/duel/mod"; import { setYesNoModalIsOpen } from "../../reducers/duel/mod";
import DragModal from "./dragModal"; import DragModal from "./dragModal";
import { selectHint } from "../../reducers/duel/hintSlice";
const YesNoModal = () => { const YesNoModal = () => {
const dispatch = store.dispatch; const dispatch = store.dispatch;
const isOpen = useAppSelector(selectYesNoModalIsOpen); const isOpen = useAppSelector(selectYesNoModalIsOpen);
const msg = useAppSelector(selectYesNOModalMsg); const msg = useAppSelector(selectYesNOModalMsg);
const hint = useAppSelector(selectHint);
const preHintMsg = hint?.esHint || "";
return ( return (
<DragModal <DragModal
title={msg} title={`${preHintMsg} ${msg}`}
open={isOpen} open={isOpen}
closable={false} closable={false}
footer={ footer={
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment