From da9588c263c8f2c597bd5d01a25c509ca4bc8a31 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 28 Apr 2025 00:22:41 +0800 Subject: [PATCH] =?UTF-8?q?sync=EF=BC=9A=E5=8D=95=E8=AF=8D=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=8C=E6=8E=88=E6=9D=83=E5=BC=B9=E6=A1=86=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=20https://gitee.com/sheepjs/shopro-uniapp/commit/decd?= =?UTF-8?q?3a5108e16313feb9a67d4637651fc98adb18=20sync=EF=BC=9A=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E3=80=81h5=E7=99=BB=E5=BD=95=E5=BC=B9?= =?UTF-8?q?=E6=A1=86=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9=20https://gitee.c?= =?UTF-8?q?om/sheepjs/shopro-uniapp/commit/4aaf21084b20a4fb29093a53fe333ca?= =?UTF-8?q?9ff2dca8d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sheep/hooks/useModal.js | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/sheep/hooks/useModal.js b/sheep/hooks/useModal.js index 003fe809..5b4d1633 100644 --- a/sheep/hooks/useModal.js +++ b/sheep/hooks/useModal.js @@ -8,19 +8,20 @@ import AuthUtil from '@/sheep/api/member/auth'; // 打开授权弹框 export function showAuthModal(type = 'smsLogin') { const modal = $store('modal'); - if (modal.auth !== '') { - // 注意:延迟修改,保证下面的 closeAuthModal 先执行掉 - setTimeout(() => { - modal.$patch((state) => { - state.auth = type; - }); - }, 500); - closeAuthModal(); - } else { + // #ifdef H5 + closeAuthModal(); + setTimeout(() => { modal.$patch((state) => { state.auth = type; }); - } + }, 200); + // #endif + + // #ifndef H5 + modal.$patch((state) => { + state.auth = type; + }); + // #endif } // 关闭授权弹框