Browse Source

修改BUG

dev
沈明 1 year ago
parent
commit
439550cb17
  1. 1
      src/pages/login/login.vue
  2. 13
      src/pages/votingElection/index.vue
  3. 2
      src/store/user.ts

1
src/pages/login/login.vue

@ -63,6 +63,7 @@ const onLoginSuccess = () => {
icon: 'none',
success: () => {
setTimeout(() => {
userStore.showtoast = false
uni.reLaunch({ url: '/pages/votingElection/index' })
}, 1000)
}

13
src/pages/votingElection/index.vue

@ -114,15 +114,12 @@ onShow(() => {
})
} else if (isEmptyObject(userStore.userInfo)) {
showDialogRef.value.show = true
} else {
uni.showToast({
title: '签到成功,等待投票!',
icon: 'success',
duration: 1000,
complete: () => {
} else if (!userStore.showtoast) {
userStore.showtoast = true
uni.showToast({ title: '签到成功,等待投票!', icon: 'success', duration: 1000 })
setTimeout(() => reListRef.value.refreshFn(), 1100)
}
})
} else {
reListRef.value.refreshFn()
}
})
})

2
src/store/user.ts

@ -12,6 +12,7 @@ export default defineStore(
() => {
const openId = ref('')
const mobile = ref('')
const showtoast = ref(false)
const userInfo = ref<userInfoStoreInt>({})
function getopenid(params: { code: string }) {
@ -74,6 +75,7 @@ export default defineStore(
return {
openId,
mobile,
showtoast,
userInfo,
getopenid,
bindUser,

Loading…
Cancel
Save