修改了一下弹窗

main
expressgy 3 months ago
parent 14c914a30e
commit 9e98eea8f4
  1. 1
      src/assets/pacman.css
  2. 4
      src/components/Pacman/index.vue
  3. 12
      src/views/SignIn/index.vue

@ -8,7 +8,6 @@
align-items: center;
justify-content: center;
z-index: 10000;
border: 2px solid #cdcdcd;
}
.ear{

@ -4,8 +4,8 @@ defineProps(['loading']);
</script>
<template>
<div class="pacmanBox">
<div v-if="loading" class="pacmanLoader">
<div v-if="loading" class="pacmanBox">
<div class="pacmanLoader">
<div class="pacman">
<div></div>
<div></div>

@ -7,7 +7,7 @@ import user from '@/components/icons/user.vue';
import { NSwitch } from 'naive-ui';
import { Sign } from '@/api/index.js';
import { useRouter } from 'vue-router';
import Pacman from '@/components/Pacman/index.vue'
import Pacman from '@/components/Pacman/index.vue';
const systemStore = useSystemStore();
@ -29,7 +29,7 @@ const userTarget = ref(false);
const passTarget = ref(false);
// !
const isLoading = ref(false)
const isLoading = ref(false);
// !
const restrictUsername = (event) => {
@ -58,12 +58,16 @@ const handleSignIn = async () => {
return passTarget.value = true;
}
isLoading.value = true;
try {
const resd = await Sign.signIn(username.value, password.value);
systemStore.setToken({
...resd,
remember: toValue(remember),
});
// router.push(systemStore.defaultRoute);
router.push(systemStore.defaultRoute);
}catch(err) {
isLoading.value = false;
}
};
// !
@ -79,6 +83,7 @@ const handleFocus = (name) => {
<template>
<div class="SignIn">
<div class="maskLayer">
<Pacman :loading="isLoading"/>
<div class="container">
<header>{{ systemStore.title }}</header>
<main>
@ -86,7 +91,6 @@ const handleFocus = (name) => {
<div><img :src="hutao" alt="" /></div>
</div>
<div class="right">
<Pacman :loading="isLoading"/>
<header>
<div>登录</div>
</header>

Loading…
Cancel
Save