Files
boluo-app-main/src/components/message-dialog/index.tsx
2025-06-27 22:46:24 +08:00

73 lines
2.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { Button } from '@tarojs/components';
import { Dialog } from '@taroify/core';
import './index.less';
const PREFIX = 'message-dialog';
const HELP = `${PREFIX}__help`;
const NO_TIMES = `${PREFIX}__no-times`;
interface IHelpProps {
open: boolean;
onClose: () => void;
}
interface INoTimesProps {
open: boolean;
times: number;
onClick: () => void;
onClose: () => void;
}
export function MessageHelpDialog(props: IHelpProps) {
const { open, onClose } = props;
return (
<Dialog onClose={onClose} open={open}>
<Dialog.Content>
<div className={HELP}>
<div className={`${HELP}__title`}></div>
<div className={`${HELP}__body`}>
<div className={`${HELP}__tips`}>
{`离开小程序后,如果有用户向你发送消息,我们将通过微信的"服务通知"提醒你。\n由于微信服务通知有次数限制次数使用完则无法收到通知。`}
</div>
<div className={`${HELP}__tips`}>
<div className="highlight"></div>
</div>
<div className={`${HELP}__tips`}>
<div className="highlight"></div>
</div>
</div>
<Button className={`${HELP}__btn`} onClick={onClose}>
</Button>
</div>
</Dialog.Content>
</Dialog>
);
}
export function MessageNoTimesDialog(props: INoTimesProps) {
const { open, times = 0, onClick, onClose } = props;
return (
<Dialog className={NO_TIMES} onClose={onClose} open={open}>
<Dialog.Content>
<div className={`${NO_TIMES}__title`}></div>
<div className={`${NO_TIMES}__tips`}>
<span className="highlight"></span>
</div>
<div className={`${NO_TIMES}__body`}>
<div className={`${NO_TIMES}__times`}>{`未读消息提醒剩余:${times}`}</div>
<Button className={`${NO_TIMES}__btn`} onClick={onClick}>
</Button>
</div>
</Dialog.Content>
</Dialog>
);
}