diff --git a/sheep/components/s-auth-modal/s-auth-modal.vue b/sheep/components/s-auth-modal/s-auth-modal.vue index 204f703..41a7dbb 100644 --- a/sheep/components/s-auth-modal/s-auth-modal.vue +++ b/sheep/components/s-auth-modal/s-auth-modal.vue @@ -10,7 +10,11 @@ /> - + @@ -32,7 +36,11 @@ 还没有账号? - @@ -81,17 +89,13 @@ /> 我已阅读并遵守 - - 《用户协议》 - + 《用户协议》 - - 《隐私协议》 - + 《隐私协议》 - + @@ -107,8 +111,6 @@ import mpAuthorization from './components/mp-authorization.vue'; import { closeAuthModal, showAuthModal } from '@/sheep/hooks/useModal'; - const appInfo = computed(() => sheep.$store('app').info); - const modalStore = sheep.$store('modal'); // 授权弹窗类型 const authType = computed(() => modalStore.auth); @@ -154,9 +156,11 @@ if (loginRes) { const userInfo = await sheep.$store('user').getInfo(); closeAuthModal(); - // 如果用户已经有头像和昵称,不要每次登录都要重新上传头像。 - if(userInfo.avatar && userInfo.nickname) return; - + // 如果用户已经有头像和昵称,不需要再次授权 + if (userInfo.avatar && userInfo.nickname) { + return; + } + // 触发小程序授权信息弹框 // #ifdef MP-WEIXIN showAuthModal('mpAuthorization');