diff --git a/sheep/hooks/useModal.js b/sheep/hooks/useModal.js index 003fe80..5b4d163 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 } // 关闭授权弹框