{caseAssets.length === 0 ? (
{
const resultCode = params.get('resultCode') || '';
const isSuccess = successStatuses.has(status) || resultCode === '10000';
+ const handleClose = () => {
+ const isWeChat = /MicroMessenger/i.test(navigator.userAgent);
+ const isAlipay = /AlipayClient/i.test(navigator.userAgent);
+ const isMobile = /Android|iPhone|iPad/i.test(navigator.userAgent);
+
+ if (isWeChat) {
+ try {
+ window.opener = null;
+ window.open('', '_self');
+ window.close();
+ } catch {
+ message.info('请点击右上角关闭按钮');
+ }
+ } else if (isAlipay) {
+ try {
+ window.close();
+ } catch {
+ message.info('请点击左上角返回');
+ }
+ } else if (isMobile) {
+ try {
+ window.history.back();
+ } catch {
+ window.location.href = '/';
+ }
+ } else {
+ try {
+ window.close();
+ } catch {
+ window.location.href = '/';
+ }
+ }
+ };
+
return (
@@ -17,11 +51,11 @@ const PrivatePortraitAuthorizeResult: React.FC = () => {
title={isSuccess ? '真人认证已完成' : '真人认证未完成'}
subTitle={isSuccess ? '请回到电脑端查看,项目组已创建成功。' : '请回到电脑端重新发起创建项目组。'}
extra={[
- ,
+ ,
]}
/>
-
- 当前状态:{status || '-'},结果码:{resultCode || '-'}
+
+ 如无法自动关闭,请手动关闭页面