feat: login whatever

This commit is contained in:
chashaobao
2025-06-15 01:09:30 +08:00
parent 5acc25c8c9
commit 80c0d71921
6 changed files with 26 additions and 10 deletions

View File

@ -12,6 +12,7 @@ import './index.less';
interface IProps {
title?: string;
onCancel: () => void;
disableCheck?: boolean;
needPhone?: IPhoneButtonProps['needPhone'];
onSuccess?: IPhoneButtonProps['onSuccess'];
onBindPhone?: IPhoneButtonProps['onBindPhone'];
@ -20,8 +21,15 @@ interface IProps {
const PREFIX = 'login-dialog';
export default function LoginDialog(props: IProps) {
const { title = '使用播络服务前,请先登录', needPhone, onSuccess, onCancel, onBindPhone } = props;
const [checked, setChecked] = useState(false);
const {
title = '使用播络服务前,请先登录',
disableCheck = false,
needPhone,
onSuccess,
onCancel,
onBindPhone,
} = props;
const [checked, setChecked] = useState(disableCheck);
const handleTipCheck = useCallback(() => {
Toast.info('请先阅读并同意协议');
@ -50,7 +58,9 @@ export default function LoginDialog(props: IProps) {
<Button className={`${PREFIX}__cancel-button`} onClick={onCancel}>
</Button>
<ProtocolPrivacyCheckbox checked={checked} onChange={setChecked} className={`${PREFIX}__checkbox`} />
{!disableCheck && (
<ProtocolPrivacyCheckbox checked={checked} onChange={setChecked} className={`${PREFIX}__checkbox`} />
)}
</div>
</Dialog.Content>
</Dialog>