|
|
|
@ -5,7 +5,7 @@ import { useStore } from '@/stores/StoreContext.js';
|
|
|
|
|
|
|
|
|
|
function Login() {
|
|
|
|
|
|
|
|
|
|
const { authStore } = useStore();
|
|
|
|
|
const { authStore,noticeStore } = useStore();
|
|
|
|
|
const { notification } = App.useApp();
|
|
|
|
|
const navigate = useNavigate();
|
|
|
|
|
const [form] = Form.useForm();
|
|
|
|
@ -13,6 +13,7 @@ function Login() {
|
|
|
|
|
const onFinish = (values) => {
|
|
|
|
|
authStore.valdateUserPassword(values.username, values.password)
|
|
|
|
|
.then((userId) => {
|
|
|
|
|
noticeStore.getBulletinUnReadCount(userId);
|
|
|
|
|
authStore.fetchUserDetail(userId)
|
|
|
|
|
.then((user) => {
|
|
|
|
|
// navigate(-1) is equivalent to hitting the back button.
|
|
|
|
|