登录后检查未读公告

release
YCC 2 years ago
parent f745492a12
commit 2775a53bb7

@ -42,7 +42,7 @@ class Notice {
.then(json => {
console.log(json);
runInAction(() => {
this.noticeUnRead = json.Result.CCP_BulletinCount;
this.noticeInfo = json.Result;
});
})
.catch(error => {
@ -59,7 +59,7 @@ class Notice {
.then(json => {
console.log(json);
runInAction(() => {
this.noticeInfo = json.Result;
this.noticeUnRead = json.Result.CCP_BulletinCount;
});
})
.catch(error => {

@ -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.

Loading…
Cancel
Save