From af1c2b27cd23e4a1c9c71d59b6e1a36a78afdbeb Mon Sep 17 00:00:00 2001 From: Hx <2294602187@qq.com> Date: Tue, 1 Apr 2025 09:14:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/votingElection/index.vue | 37 +++++++++++------------------- 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/src/pages/votingElection/index.vue b/src/pages/votingElection/index.vue index e6f4fcb..1af0bc4 100644 --- a/src/pages/votingElection/index.vue +++ b/src/pages/votingElection/index.vue @@ -3,6 +3,8 @@ import { getVoteprogress, voteMember } from '../../api/votingElection' import useUserStore from '@/store/user' const userStore = useUserStore() +const showDialogRef = ref() + const xjList = ref({}) const doSearch = (_formData: { page: number; limit: number }, onSuccess: Function) => { @@ -98,7 +100,6 @@ const submit = () => { } } -const showDialog = ref(false) const navto = (url: string, mode: pageMode = 'navigateTo') => uni.$util.goToPage({ url: url ?? 'pages/index/index', mode }) const isEmptyObject = (obj: any) => { if (obj == null) return true @@ -107,13 +108,15 @@ const isEmptyObject = (obj: any) => { } onShow(() => { - if (userStore.mobile === '') { - uni.navigateTo({ - url: '/pages/login/login' - }) - } else if (isEmptyObject(userStore.userInfo)) { - showDialog.value = true - } + nextTick(() => { + if (userStore.mobile === '') { + uni.navigateTo({ + url: '/pages/login/login' + }) + } else if (isEmptyObject(userStore.userInfo)) { + showDialogRef.value.show = true + } + }) }) @@ -160,25 +163,13 @@ onShow(() => { 提交投票 + 暂时没有选举 请刷新重试 - - 请您签到之后再进行投票! - + + 请您签到之后再进行投票!