feat: 分享的文案 + 点击头像看模卡 + 提现文案 + 协议弹窗 + 进群限制

This commit is contained in:
chashaobao
2025-06-17 00:03:58 +08:00
parent 828497fcd6
commit 0ec366cc2e
14 changed files with 140 additions and 100 deletions

View File

@ -19,7 +19,7 @@ export interface IPhoneButtonProps extends ButtonProps {
message?: string;
// 绑定后是否需要刷新接口获取手机号
needPhone?: boolean;
onBindPhone?: (status: BindPhoneStatus) => void;
onBindPhone?: (status: BindPhoneStatus, e: ITouchEvent) => void;
onSuccess?: (e: ITouchEvent) => void;
}
@ -44,17 +44,17 @@ export default function PhoneButton(props: IPhoneButtonProps) {
const encryptedData = e.detail.encryptedData;
const iv = e.detail.iv;
if (!encryptedData || !iv) {
onBindPhone?.(BindPhoneStatus.Cancel);
onBindPhone?.(BindPhoneStatus.Cancel, e as ITouchEvent);
return Toast.error('取消授权');
}
try {
await setPhoneNumber({ encryptedData, iv });
needPhone && (await requestUserInfo());
Toast.success(message);
onBindPhone?.(BindPhoneStatus.Success);
onBindPhone?.(BindPhoneStatus.Success, e as ITouchEvent);
onSuccess?.(e as ITouchEvent);
} catch (err) {
onBindPhone?.(BindPhoneStatus.Error);
onBindPhone?.(BindPhoneStatus.Error, e as ITouchEvent);
Toast.error('绑定失败');
log('bind phone fail', err);
}