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', icon: 'none',
success: () => { success: () => {
setTimeout(() => { setTimeout(() => {
userStore.showtoast = false
uni.reLaunch({ url: '/pages/votingElection/index' }) uni.reLaunch({ url: '/pages/votingElection/index' })
}, 1000) }, 1000)
} }

13
src/pages/votingElection/index.vue

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

2
src/store/user.ts

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

Loading…
Cancel
Save