| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="pc-login items-center justify-center" style="display: flex" v-show="state.isShowLogin"> |
| | | <div class="pc-login items-center justify-center" style="display: flex" v-show="isShowLogin"> |
| | | <div class="login_box"> |
| | | <div class="sign_in"> |
| | | <i class="ywifont ywicon-guanbi closes" @click="handleClose"></i> |
| | |
| | | import { computed, onMounted, reactive, ref, watchEffect } from 'vue'; |
| | | import { PostLogin, loginMessageUser, loginVerifyMessage } from '/@/api/ai/user'; |
| | | import router from '/@/router'; |
| | | import { isSharePage, isShowLogin } from '/@/stores/chatRoom'; |
| | | import emitter from '/@/utils/mitt'; |
| | | import { accessSessionKey, userNameKey } from '/@/utils/request'; |
| | | import { gotoRoute } from '/@/utils/route'; |
| | | import { Local, LoginInfo } from '/@/utils/storage'; |
| | | import { isSharePage } from '/@/stores/chatRoom'; |
| | | const loginFormRef = ref<FormInstance>(null); //账户密码登录 |
| | | const formPhoneRef = ref(); //手机号登录 |
| | | const isLoginStatus = ref(!!Local.get(accessSessionKey)); |
| | |
| | | routerName: 'AboutUs', |
| | | }, |
| | | ], |
| | | isShowLogin: false, |
| | | isShowExitLogin: false, |
| | | loginForm: { |
| | | account: '', |
| | |
| | | const openLoginDlg = async () => { |
| | | // 分享页不需要 |
| | | if (isSharePage.value) return; |
| | | state.isShowLogin = true; |
| | | isShowLogin.value = true; |
| | | }; |
| | | const handleClose = () => { |
| | | state.isShowLogin = false; |
| | | isShowLogin.value = false; |
| | | }; |
| | | const hasSended = computed(() => { |
| | | return countdown.value !== null; |
| | |
| | | LoginInfo.set(res.hswatersession, state.loginPhoneForm.phoneUser); |
| | | } |
| | | |
| | | state.isShowLogin = false; |
| | | isShowLogin.value = false; |
| | | isLoginStatus.value = true; |
| | | window.location.reload(); |
| | | }; |
| | |
| | | }; |
| | | onMounted(() => { |
| | | emitter.on('openLoginDlg', () => { |
| | | if (state.isShowLogin || isLoginStatus.value) return; |
| | | if (isShowLogin.value || isLoginStatus.value) return; |
| | | openLoginDlg(); |
| | | }); |
| | | |