feat: 分享的文案 + 点击头像看模卡 + 提现文案 + 协议弹窗 + 进群限制
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { Button } from '@tarojs/components';
|
||||
import { Button, ITouchEvent } from '@tarojs/components';
|
||||
|
||||
import { Popup } from '@taroify/core';
|
||||
import { useCallback } from 'react';
|
||||
@ -13,17 +13,18 @@ import './index.less';
|
||||
interface IProps {
|
||||
open: boolean;
|
||||
onCancel: () => void;
|
||||
onConfirm: () => void;
|
||||
onConfirm: (e: ITouchEvent) => void;
|
||||
needPhone?: boolean;
|
||||
needBindPhone?: boolean;
|
||||
}
|
||||
|
||||
const PREFIX = 'agreement-popup';
|
||||
|
||||
export function AgreementPopup({ open, onCancel, onConfirm, needPhone }: IProps) {
|
||||
export function AgreementPopup({ open, onCancel, onConfirm, needPhone, needBindPhone }: IProps) {
|
||||
const handleBindPhone = useCallback(
|
||||
status => {
|
||||
(status: BindPhoneStatus, e: ITouchEvent) => {
|
||||
if (status === BindPhoneStatus.Success) {
|
||||
onConfirm();
|
||||
onConfirm(e);
|
||||
} else {
|
||||
onCancel();
|
||||
}
|
||||
@ -48,8 +49,8 @@ export function AgreementPopup({ open, onCancel, onConfirm, needPhone }: IProps)
|
||||
<Button className={`${PREFIX}__cancel-button`} onClick={onCancel}>
|
||||
拒绝
|
||||
</Button>
|
||||
{needPhone ? (
|
||||
<PhoneButton className={`${PREFIX}__confirm-button`} needPhone onBindPhone={handleBindPhone}>
|
||||
{needBindPhone ? (
|
||||
<PhoneButton className={`${PREFIX}__confirm-button`} needPhone={needPhone} onBindPhone={handleBindPhone}>
|
||||
同意
|
||||
</PhoneButton>
|
||||
) : (
|
||||
|
Reference in New Issue
Block a user