diff --git a/pages/mine/mine.vue b/pages/mine/mine.vue index 7ae0dea..5cbcfff 100644 --- a/pages/mine/mine.vue +++ b/pages/mine/mine.vue @@ -67,6 +67,7 @@ import { phoneLoginRequest } from '@/api/user' import env from '@/config/env' import { setStorage, getStorage, removeStorage } from '@/utils/storage' + import { useNotificationStore } from '../../stores/notification' export default { data() { @@ -80,7 +81,8 @@ }, computed: { ...mapState(useUserStore, ['isLogin']), - ...mapState(useLockStore, ['lockSearch']) + ...mapState(useLockStore, ['lockSearch']), + ...mapState(useNotificationStore, ['notificationSearch']) }, async onLoad() { this.buttonInfo = await this.getButtonInfo() @@ -97,6 +99,7 @@ methods: { ...mapActions(useBasicStore, ['getButtonInfo', 'routeJump']), ...mapActions(useLockStore, ['getLockList', 'updateLockSearch']), + ...mapActions(useNotificationStore, ['getNotificationList', 'updateNotificationSearch']), ...mapActions(useUserStore, ['updateLoginStatus', 'phoneLogin', 'updateUserInfo', 'getUserInfo', 'checkSession']), selectEnv(env) { @@ -138,6 +141,10 @@ }) this.getUserInfo() this.getLockList(this.lockSearch) + this.updateNotificationSearch({ + pageNo: 1 + }) + this.getNotificationList(this.notificationSearch) uni.showToast({ title: '账号切换成功', icon: 'none'